fix positions
This commit is contained in:
+41
-9
@@ -230,6 +230,28 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.opening-new-badge {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
border-radius: 0 0 0 8px;
|
||||
background: var(--accent-soft);
|
||||
color: var(--primary-dark);
|
||||
border: 1px solid rgba(198, 150, 60, 0.45);
|
||||
padding: 0.25rem 0.65rem;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.opening-new-badge i {
|
||||
color: var(--accent);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.opening-card h3 {
|
||||
color: var(--ink);
|
||||
font-size: 1.3rem;
|
||||
@@ -269,9 +291,7 @@
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<div class="navbar-nav mx-auto">
|
||||
<a href="<?= base_url('/') ?>" class="nav-item nav-link">Home Page</a>
|
||||
</div>
|
||||
<div class="navbar-nav mx-auto"></div>
|
||||
<div class="d-flex align-items-center">
|
||||
<?php if (session()->get('is_logged_in')): ?>
|
||||
<span class="navbar-text me-3">Welcome, <?= esc(session()->get('user_name')) ?></span>
|
||||
@@ -327,24 +347,36 @@
|
||||
<hr class="rule mx-auto">
|
||||
<h2>Current Open Positions</h2>
|
||||
<p class="mb-0">Review the available roles below and apply by creating an account.</p>
|
||||
<p class="mb-0 fw-bold">All positions bellow are taking place at ISGL: 5 Courthouse Lane, Chelmsford, MA 01824</p>
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
<?php if (!empty($positions)): ?>
|
||||
<?php foreach ($positions as $position): ?>
|
||||
<?php
|
||||
$postedAt = !empty($position['posted_at']) ? strtotime((string) $position['posted_at']) : false;
|
||||
$isNewPosition = $postedAt !== false && $postedAt >= strtotime('-14 days');
|
||||
?>
|
||||
<div class="col-lg-4">
|
||||
<article class="opening-card">
|
||||
<?php if ($isNewPosition): ?>
|
||||
<span class="opening-new-badge"><i class="fa fa-star" aria-hidden="true"></i> New</span>
|
||||
<?php endif; ?>
|
||||
<h3><?= esc($position['title']) ?></h3>
|
||||
<div class="opening-meta">
|
||||
<?= esc($position['department'] ?? '') ?>
|
||||
<?php if (!empty($position['location'])): ?> · <?= esc($position['location']) ?><?php endif; ?>
|
||||
<?php if (!empty($position['employment_type'])): ?> · <?= esc($position['employment_type']) ?><?php endif; ?>
|
||||
<?php if (!empty($position['posted_at'])): ?><br><?= esc(date('M j, Y', strtotime((string) $position['posted_at']))) ?><?php endif; ?>
|
||||
</div>
|
||||
<?php if (!empty($position['requirements'])): ?>
|
||||
<ul class="opening-list">
|
||||
<?php foreach (array_slice(array_filter(preg_split('/\r\n|\r|\n/', (string) $position['requirements'])), 0, 3) as $requirement): ?>
|
||||
<li><?= esc(preg_replace('/^\s*-\s*/', '', $requirement)) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php if (!empty($position['description'])): ?>
|
||||
<?php
|
||||
$descriptionPreview = trim(preg_replace('/\s+/', ' ', (string) $position['description']));
|
||||
$descriptionWords = preg_split('/\s+/', $descriptionPreview) ?: [];
|
||||
if (count($descriptionWords) > 32) {
|
||||
$descriptionPreview = implode(' ', array_slice($descriptionWords, 0, 32)) . '...';
|
||||
}
|
||||
?>
|
||||
<p class="mb-4"><?= esc($descriptionPreview) ?></p>
|
||||
<?php endif; ?>
|
||||
<a class="btn-brand-sm" href="<?= site_url('careers/' . $position['position_id']) ?>">View Details <i class="fa fa-arrow-right"></i></a>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user