fix positions
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 54s
Tests / PHPUnit (push) Successful in 1m22s

This commit is contained in:
root
2026-09-03 03:21:37 -04:00
parent 6936a822c8
commit c70f6bdc6e
12 changed files with 344 additions and 18 deletions
@@ -16,6 +16,7 @@
border-radius: 8px;
padding: 1rem;
background: #fff;
position: relative;
}
.volunteer-opening-card + .volunteer-opening-card {
@@ -26,6 +27,28 @@
color: #64748b;
font-size: 0.92rem;
}
.volunteer-opening-new-badge {
position: absolute;
top: 0;
right: 0;
display: inline-flex;
align-items: center;
gap: 0.3rem;
border-radius: 0 8px 0 8px;
background: #fef3c7;
color: #14532d;
border: 1px solid #facc15;
padding: 0.2rem 0.55rem;
font-size: 0.75rem;
font-weight: 700;
line-height: 1;
}
.volunteer-opening-new-badge i {
color: #ca8a04;
font-size: 0.72rem;
}
</style>
<?= $this->endSection() ?>
@@ -239,8 +262,13 @@
$position['location'] ?? '',
$position['employment_type'] ?? '',
]);
$postedAt = !empty($position['posted_at']) ? strtotime((string) $position['posted_at']) : false;
$isNewPosition = $postedAt !== false && $postedAt >= strtotime('-14 days');
?>
<div class="volunteer-opening-card">
<?php if ($isNewPosition): ?>
<span class="volunteer-opening-new-badge"><i class="fa fa-star" aria-hidden="true"></i> New</span>
<?php endif; ?>
<div class="d-flex flex-column flex-md-row justify-content-between gap-3">
<div>
<h6 class="mb-1"><?= esc($position['title'] ?? 'Volunteer position') ?></h6>