1
0
cms11/resources/views/term.blade.php

73 lines
2.8 KiB
PHP

@extends('layouts.main')
@section('main')
<article id="article-main">
<header>
@if (empty($bundle->metadata()->get('hide_title')))
<h1>{{ $articleTitle }}</h1>
@endif
@if (!empty($cover))
{!! $cover !!}
@endif
</header>
@if (!empty($body) || (isset($showToc) && $showToc) || !empty($relations))
<section id="article-body">
@if(isset($showToc) && $showToc)
<details class="drop down">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren()])
</nav>
</details>
@endif
{!! $body !!}
@if (!empty($relations))
@foreach($relations as $category => $bundles)
<h2>{!! $category !!}</h2>
<section class="article-list">@foreach ($bundles as $subBundle){!! $subBundle->renderCard() !!}@endforeach</section>
@endforeach
@endif
@if(isset($showToc) && $showToc)
<details class="drop up">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren()])
</nav>
</details>
@endif
</section>
@endif
@if(!empty($bundle->virtualMetadata()->all()))
<footer>
<details open>
<summary>Informations détaillées</summary>
@if(!empty($bundle->metadata()->get('wikidataEntityId')))
<blockquote>
<p>Les informations complémentaires visibles ici proviennent de
{!! \App\Models\Url::from('https://www.wikidata.org/wiki/' . $bundle->metadata()->get('wikidataEntityId'), $bundle)->toHtmlElement('Wikidata') !!}.
Malgré le soin apporté par la communauté Wikidata à la constitution
de ces données, elles peuvent s'avérer incomplètes et des erreurs
peuvent s'être glissées.</p>
@if(!empty($bundle->metadata('wikidata/entity')->get('modified')))
<p>Dernière mise à jour des données : {{ Carbon\Carbon::parse($bundle->metadata('wikidata/entity')->get('modified'))->isoFormat('LL') }}</p>
@endif
</blockquote>
@endif
@foreach($bundle->virtualMetadata()->all() as $category => $data)
@include('components.asides.generic', compact('category', 'data', 'bundle'))
@endforeach
</details>
</footer>
@endif
</article>
@endsection