fixes show only year in collections index

This commit is contained in:
buttle 2022-04-28 18:54:54 +02:00
parent 1ee3b85901
commit 24afe3a03a
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,9 @@ foreach($sites as $site){
if (!isset($site_data['currator'])) {
$site_data['currator'] = "";
}
if (isset($site_data['project_date'])) {
$site_data['project_date'] = substr($site_data['project_date'], 0, 4);
}
array_push($projects, $site_data);
}
//$collections = json_encode($collections, JSON_UNESCAPED_SLASHES);

View File

@ -22,7 +22,7 @@ $summary = $showSummary ? $site->summary() : null;
</li>
<li class="date">
<?php if ($site_meta_values != null): ?>
<?= substr($site_meta_values['project_date'], 0, 4); ?>
<?= $site_meta_values['project_date']; ?>
<?php endif; ?>
</li>
</ul>