345 lines
15 KiB
HTML
345 lines
15 KiB
HTML
{% extends 'applicant/partials/candidate_facing_base.html' %}
|
|
{% load static i18n %}
|
|
|
|
{% block title %}{% trans "Career Opportunities" %} | KAAUH{% endblock %}
|
|
|
|
{% block content %}
|
|
<style>
|
|
:root {
|
|
--kaauh-teal: #00636e;
|
|
--kaauh-teal-dark: #004a53;
|
|
--kaauh-teal-light: #e6f7f8;
|
|
--border: #e2e8f0;
|
|
--gray-text: #64748b;
|
|
--error-red: #ef4444;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 1. LAYOUT & RESPONSIVENESS */
|
|
/* ---------------------------------------------------------------------- */
|
|
.container {
|
|
max-width: 1300px;
|
|
margin: 0 auto;
|
|
padding-inline: 1.5rem;
|
|
}
|
|
|
|
.job-section-grid {
|
|
display: grid;
|
|
grid-template-columns: 320px 1fr;
|
|
gap: 2.5rem;
|
|
padding-block: 3rem;
|
|
align-items: start;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 2. HERO SECTION */
|
|
/* ---------------------------------------------------------------------- */
|
|
.hero-section {
|
|
background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
|
|
url('{% static "image/hospital-bg.jpg" %}') center/cover;
|
|
color: white;
|
|
padding-block: clamp(3rem, 10vw, 6rem);
|
|
text-align: center;
|
|
}
|
|
|
|
.hero-title {
|
|
font-size: clamp(1.75rem, 5vw, 3rem);
|
|
font-weight: 800;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.hero-lead {
|
|
font-size: clamp(1rem, 2vw, 1.2rem);
|
|
max-width: 700px;
|
|
margin: 0 auto 2rem;
|
|
color: #e5e7eb;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 3. MOBILE FILTER TRIGGER */
|
|
/* ---------------------------------------------------------------------- */
|
|
.mobile-filter-trigger {
|
|
display: none;
|
|
width: 100%;
|
|
padding: 1rem;
|
|
background: var(--kaauh-teal);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 0.75rem;
|
|
font-weight: 700;
|
|
margin-top: 1.5rem;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 4. FILTER SIDEBAR (MOBILE DRAWER) */
|
|
/* ---------------------------------------------------------------------- */
|
|
.filter-card {
|
|
background: white;
|
|
border: 1px solid var(--border);
|
|
border-radius: 1rem;
|
|
padding: 1.5rem;
|
|
position: sticky;
|
|
top: 20px;
|
|
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
|
|
}
|
|
|
|
.close-filters { display: none; } /* Hidden on desktop */
|
|
|
|
.filter-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
margin-bottom: 1.5rem;
|
|
padding-bottom: 0.75rem;
|
|
border-bottom: 2px solid var(--kaauh-teal-light);
|
|
}
|
|
|
|
.search-group { position: relative; margin-bottom: 1rem; }
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 0.75rem 0.75rem 0.75rem 2.5rem;
|
|
border-radius: 0.5rem;
|
|
border: 2px solid var(--border);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.filter-group { margin-bottom: 1.25rem; }
|
|
.filter-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--gray-text); text-transform: uppercase; margin-bottom: 0.4rem; }
|
|
.filter-select {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border-radius: 0.5rem;
|
|
border: 1px solid var(--border);
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 5. STICKY BAR & CHIPS */
|
|
/* ---------------------------------------------------------------------- */
|
|
.sticky-filter-bar {
|
|
background: #f8fafc;
|
|
padding: 1rem;
|
|
border-radius: 0.75rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 1.5rem;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.chip-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
|
|
.filter-chip {
|
|
background: white;
|
|
color: var(--kaauh-teal);
|
|
padding: 0.4rem 0.75rem;
|
|
border-radius: 2rem;
|
|
font-size: 0.8rem;
|
|
border: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4rem;
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 6. JOB CARDS */
|
|
/* ---------------------------------------------------------------------- */
|
|
.job-card {
|
|
background: white;
|
|
border: 1px solid var(--border);
|
|
border-inline-start: 5px solid var(--kaauh-teal);
|
|
border-radius: 0.75rem;
|
|
padding: 1.5rem;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
display: block;
|
|
transition: 0.2s;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.job-card:hover { transform: translateX(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
|
|
|
|
.job-meta-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; color: var(--gray-text); font-size: 0.85rem; }
|
|
.meta-item { display: flex; align-items: center; gap: 0.3rem; }
|
|
|
|
/* ---------------------------------------------------------------------- */
|
|
/* 7. RESPONSIVE BREAKPOINT (MOBILE) */
|
|
/* ---------------------------------------------------------------------- */
|
|
@media (max-width: 992px) {
|
|
.job-section-grid { grid-template-columns: 1fr; }
|
|
|
|
.mobile-filter-trigger { display: flex; }
|
|
|
|
.filter-sidebar {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.6);
|
|
z-index: 2000;
|
|
display: none;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.filter-sidebar.active { display: block; }
|
|
|
|
.filter-card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin: 2rem auto;
|
|
position: relative;
|
|
animation: slideUp 0.3s ease-out;
|
|
}
|
|
|
|
.close-filters {
|
|
display: block;
|
|
position: absolute;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.5rem;
|
|
color: var(--gray-text);
|
|
}
|
|
|
|
.sticky-filter-bar { flex-direction: column; align-items: flex-start; }
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from { transform: translateY(20px); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
|
|
.heroicon { width: 1.2rem; height: 1.2rem; stroke: currentColor; }
|
|
</style>
|
|
|
|
<div class="main-content-area">
|
|
<header class="hero-section">
|
|
<div class="container">
|
|
<h1 class="hero-title">{% trans "Build Your Future with KAAUH" %}</h1>
|
|
<p class="hero-lead">{% trans "Join a community of excellence in healthcare and research." %}</p>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
<button class="mobile-filter-trigger" onclick="toggleFilters()">
|
|
<svg class="heroicon" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"></path></svg>
|
|
{% trans "Filter Jobs" %}
|
|
</button>
|
|
|
|
<div class="job-section-grid">
|
|
<aside class="filter-sidebar" id="sidebar">
|
|
<div class="filter-card">
|
|
<button class="close-filters" onclick="toggleFilters()">×</button>
|
|
<h4 class="filter-title">{% trans "Refine Search" %}</h4>
|
|
|
|
<form method="GET">
|
|
<div class="search-group">
|
|
<svg class="heroicon" style="position:absolute; left:0.75rem; top:0.75rem; color:var(--gray-text)" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
|
|
<input type="text" name="q" class="search-input" placeholder="{% trans 'Keywords...' %}" value="{{ request.GET.q|default:'' }}">
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label class="filter-label">{% trans "Type" %}</label>
|
|
<select class="filter-select" name="employment_type">
|
|
<option value="">{% trans "All" %}</option>
|
|
{% for key in job_type_keys %}<option value="{{ key }}" {% if key == selected_job_type %}selected{% endif %}>{{ key }}</option>{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label class="filter-label">{% trans "Workplace" %}</label>
|
|
<select class="filter-select" name="workplace_type">
|
|
<option value="">{% trans "All" %}</option>
|
|
{% for key in workplace_type_keys %}<option value="{{ key }}" {% if key == selected_workplace_type %}selected{% endif %}>{{ key }}</option>{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="filter-group">
|
|
<label class="filter-label">{% trans "Department" %}</label>
|
|
<select class="filter-select" name="department">
|
|
<option value="">{% trans "All" %}</option>
|
|
{% for key in department_type_keys %}<option value="{{ key }}" {% if key == selected_department %}selected{% endif %}>{{ key }}</option>{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-teal" style="width:100%; padding:0.8rem; border-radius:0.5rem; border:none; cursor:pointer; color:white; font-weight:700; background-color:var(--kaauh-teal);">{% trans "Apply" %}</button>
|
|
</form>
|
|
</div>
|
|
</aside>
|
|
|
|
<main>
|
|
<div class="sticky-filter-bar">
|
|
<div style="font-weight: 700;">
|
|
<span style="color:var(--kaauh-teal)">{{ total_open_roles|default:"0" }}</span> {% trans "Roles Found" %}
|
|
</div>
|
|
|
|
<div class="chip-container">
|
|
{% if selected_job_type %}
|
|
<span class="filter-chip">
|
|
<strong>{% trans "Type" %}:</strong> {{ selected_job_type }}
|
|
<a href="?{% for key, value in request.GET.items %}{% if key != 'employment_type' %}{{ key }}={{ value }}&{% endif %}{% endfor %}" title="{% trans 'Remove' %}">
|
|
<svg class="heroicon" style="width:14px; height:14px; color: var(--kaauh-teal-dark)" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>
|
|
</a>
|
|
</span>
|
|
{% endif %}
|
|
|
|
{% if selected_workplace_type %}
|
|
<span class="filter-chip">
|
|
<strong>{% trans "Workplace" %}:</strong> {{ selected_workplace_type }}
|
|
<a href="?{% for key, value in request.GET.items %}{% if key != 'workplace_type' %}{{ key }}={{ value }}&{% endif %}{% endfor %}" title="{% trans 'Remove' %}">
|
|
<svg class="heroicon" style="width:14px; height:14px; color: var(--kaauh-teal-dark)" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>
|
|
</a>
|
|
</span>
|
|
{% endif %}
|
|
|
|
{% if selected_department %}
|
|
<span class="filter-chip">
|
|
<strong>{% trans "Dept" %}:</strong> {{ selected_department }}
|
|
<a href="?{% for key, value in request.GET.items %}{% if key != 'department' %}{{ key }}={{ value }}&{% endif %}{% endfor %}" title="{% trans 'Remove' %}">
|
|
<svg class="heroicon" style="width:14px; height:14px; color: var(--kaauh-teal-dark)" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg>
|
|
</a>
|
|
</span>
|
|
{% endif %}
|
|
|
|
{% if selected_job_type or selected_workplace_type or selected_department %}
|
|
<a href="?" style="font-size: 0.8rem; color: var(--error-red); text-decoration: none; align-self: center; margin-left: 0.5rem; font-weight: 600;">
|
|
{% trans "Clear All" %}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="job-list">
|
|
{% for job in active_jobs %}
|
|
<a href="{% url 'job_application_detail' job.slug %}" class="job-card">
|
|
<div style="display:flex; justify-content:space-between; flex-wrap:wrap; gap:0.5rem;">
|
|
<h4 style="color:var(--kaauh-teal-dark); font-weight:700; margin:0;">{{ job.title }}</h4>
|
|
<span style="font-size:0.75rem; color:var(--gray-text)">{% trans "Due" %}: {{ job.application_deadline }}</span>
|
|
</div>
|
|
<p style="margin:0.4rem 0; font-size:0.9rem;">{{ job.department }}</p>
|
|
<div class="job-meta-row">
|
|
<div class="meta-item"><svg class="heroicon" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"></path></svg> {{ job.location_city|default:"Riyadh" }}</div>
|
|
<div class="meta-item"><svg class="heroicon" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path d="M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg> {{ job.workplace_type }}</div>
|
|
</div>
|
|
</a>
|
|
{% empty %}
|
|
<div style="padding:4rem; text-align:center; border:1px dashed var(--border); border-radius:1rem;">{% trans "No jobs match your search." %}</div>
|
|
{% endfor %}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function toggleFilters() {
|
|
const sidebar = document.getElementById('sidebar');
|
|
sidebar.classList.toggle('active');
|
|
document.body.style.overflow = sidebar.classList.contains('active') ? 'hidden' : 'auto';
|
|
}
|
|
</script>
|
|
{% endblock %} |