1
0
cms11/resources/views/article.blade.php
2024-04-26 17:32:59 +02:00

87 lines
3.3 KiB
PHP

@extends('layouts.main')
@section('main')
<article id="article-main">
<header>
@if (empty($bundle->metadata()->get('hide_title')))
<h1>{{ $articleTitle }}
@if (!empty($bundle->metadata()->get('subTitle')))
<small>{{ $bundle->metadata()->get('subTitle') }}</small>
@endif</h1>
@endif
@if(!empty($mainLink))
<p><a
href="{!! $mainLink['finalUrl'] !!}"
rel="{!! $mainLink['rel'] !!}"
class="{!! $mainLink['classes'] !!}"
title="{!! $mainLink['title'] !!}">{!! $mainLink['url'] !!}</a></p>
@endif
@if (!empty($date))
<time datetime="{{ $date->toIso8601String() }}">{{ $date->isoFormat('LL') }}</time>
@endif
@if (!empty($bundle->metadata()->get('coauthor')))
<p><small>Article coécrit avec {{ $bundle->metadata()->get('coauthor.0.name') }}</small></p>
@endif
@if (!empty($cover))
{!! $cover !!}
@endif
</header>
@if (!empty($body) || (isset($showToc) && $showToc))
<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(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>
<summary>Informations détaillées</summary>
@if(!empty($bundle->metadata()->get('wikidataEntityId')))
<blockquote>
<p>Les informations complémentaires visibles ici proviennent de
{!! (new \App\Classes\Link('https://www.wikidata.org/wiki/' . $bundle->metadata()->get('wikidataEntityId'), 'Wikidata', $bundle))->toHtmlElement() !!}.
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>
@if (!empty($pagination['items']))
<x-pagination :data="$pagination" />
@endif
@endsection