This commit is contained in:
parent
e5727b5630
commit
ec72fa474c
10 changed files with 220 additions and 45 deletions
|
|
@ -296,6 +296,46 @@ $dateLocale = substr(is_array($locale) ? reset($locale) : $locale, 0, 5);
|
|||
</div> -->
|
||||
|
||||
|
||||
<?php
|
||||
$resourcesParent = site()->find('ressources');
|
||||
$resources = $resourcesParent ? $resourcesParent->children()->listed()->filter(function($resource) use ($page) {
|
||||
return $resource->linkedInvestigations()->toPages()->has($page);
|
||||
}) : null;
|
||||
?>
|
||||
|
||||
<?php if ($resources && $resources->isNotEmpty()): ?>
|
||||
<aside class="page__aside" id="methodologies">
|
||||
<h3 class="aside__title"><?= t('resources.methodologies') ?></h3>
|
||||
|
||||
<?php foreach ($resources as $resource): ?>
|
||||
<div class="card--block-small has-link">
|
||||
<div class="group-top">
|
||||
<p class="type"><?= t('resource.type') ?></p>
|
||||
<?php if ($resource->category()->isNotEmpty()): ?>
|
||||
<p class="category"><?= $resource->category()->esc() ?></p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<h4 class="title"><?= $resource->title()->esc() ?></h4>
|
||||
|
||||
<?php if ($resource->created()->isNotEmpty()): ?>
|
||||
<p class="date">
|
||||
<time datetime="<?= $resource->created()->toDate('yyyy-MM-dd') ?>"><?= $resource->created()->toDate('d MMMM yyyy', $dateLocale) ?></time>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<button class="btn--go-to">
|
||||
<a href="<?= $resource->url() ?>">
|
||||
<?= svg('assets/icons/arrow-left.svg') ?>
|
||||
</a>
|
||||
</button>
|
||||
|
||||
<a class="link-block" href="<?= $resource->url() ?>" aria-hidden="true"></a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
</aside>
|
||||
<?php endif ?>
|
||||
|
||||
<?php
|
||||
$impactsParent = site()->find('impacts');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue