fix positions
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user