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

91 lines
3.5 KiB
PHP
Raw Normal View History

@extends('layouts.main')
@section('main')
<article id="article-main">
<header>
@if (empty($bundle->metadata()->get('hide_title')))
2024-04-26 17:32:59 +02:00
<h1>{{ $articleTitle }}
@if (!empty($bundle->metadata()->get('subTitle')))
<small>{{ $bundle->metadata()->get('subTitle') }}</small>
@endif</h1>
@endif
2024-04-24 13:55:08 +02:00
2024-05-12 00:07:04 +02:00
@if(!empty($mainLink->id))
<p>{!! (string)$mainLink->toHtmlElement() !!}</p>
2024-04-24 13:55:08 +02:00
@endif
@if (!empty($date))
<time datetime="{{ $date->toIso8601String() }}">{{ $date->isoFormat('LL') }}</time>
@endif
2024-04-25 18:04:59 +02:00
@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))
2024-05-09 16:48:54 +02:00
<div id="article-body">
@if(isset($showToc) && $showToc)
2024-04-25 00:57:06 +02:00
<details class="drop down">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren(), 'bundle' => $bundle])
2024-04-25 00:57:06 +02:00
</nav>
</details>
@endif
{!! $body !!}
2024-04-25 00:57:06 +02:00
@foreach($bundle->listUnusedAttachments() as $kind => $attachments)
<div class="gallery">
@foreach($attachments as $attachment)
{!! $attachment->render() !!}
@endforeach
</div>
@endforeach
@if(isset($showToc) && $showToc)
2024-04-25 00:57:06 +02:00
<details class="drop up">
<summary>Sommaire</summary>
<nav>
@include('components.table-of-contents', ['toc' => $dossier->getDirectChildren()])
</nav>
</details>
@endif
2024-05-09 16:48:54 +02:00
</div>
@endif
2024-04-25 18:04:59 +02:00
2024-04-26 13:47:36 +02:00
@if(!empty($bundle->virtualMetadata()->all()))
2024-04-25 18:04:59 +02:00
<footer>
2024-04-26 13:55:04 +02:00
<details>
2024-04-26 13:47:36 +02:00
<summary>Informations détaillées</summary>
@if(!empty($bundle->metadata()->get('wikidataEntityId')))
<blockquote>
<p>Les informations complémentaires visibles ici proviennent de
2024-05-12 00:07:04 +02:00
{!! \App\Models\Url::from('https://www.wikidata.org/wiki/' . $bundle->metadata()->get('wikidataEntityId'), $bundle)->toHtmlElement('Wikidata') !!}.
2024-04-26 13:47:36 +02:00
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>
2024-04-25 18:04:59 +02:00
</footer>
2024-04-26 13:47:36 +02:00
@endif
</article>
@if (!empty($pagination['items']))
<x-pagination :data="$pagination" />
@endif
@endsection