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

91 lines
3.5 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->id))
<p>{!! (string)$mainLink->toHtmlElement() !!}</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))
<div id="article-body">
@if(isset($showToc) && $showToc)
<details class="drop down">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren(), 'bundle' => $bundle])
</nav>
</details>
@endif
{!! $body !!}
@foreach($bundle->listUnusedAttachments() as $kind => $attachments)
<div class="gallery">
@foreach($attachments as $attachment)
{!! $attachment->render() !!}
@endforeach
</div>
@endforeach
@if(isset($showToc) && $showToc)
<details class="drop up">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren()])
</nav>
</details>
@endif
</div>
@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
{!! \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>
@if (!empty($pagination['items']))
<x-pagination :data="$pagination" />
@endif
@endsection