--- /dev/null
+{{-- Plyr custom icon SVG sprite --}}
+
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <symbol id="plyr-airplay" viewBox="0 0 18 18"><path d="M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"/><path d="M4 17h10l-5-6z"/></symbol>
+
+ <symbol id="plyr-captions-off" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99
+ 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol>
+
+ <symbol id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99
+ 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol>
+
+ <symbol id="plyr-download" viewBox="0 0 18 18"><path d="M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"/></symbol>
+
+ <symbol id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol>
+
+ <symbol id="plyr-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol>
+
+ <symbol id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol>
+
+ <symbol id="plyr-logo-vimeo" viewBox="0 0 18 18"><path d="M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5
+ 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"/></symbol>
+
+ <symbol id="plyr-logo-youtube" viewBox="0 0 18 18"><path d="M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6
+ 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"/></symbol>
+
+ <symbol id="plyr-muted" viewBox="0 0 18 18"><path d="M9.9 2.4c-.1-.1-.3-.1-.4-.1-.1 0-.3 0-.4.1L3.7 5.5h-3c-.4 0-.8.4-.8.8v5.5c0 .4.4.8.8.8h3l5.4 3.1c.1.1.3.1.4.1.4 0 .8-.4.8-.8V3.1c0-.3-.2-.6-.4-.7zM1.6 7h1.6v4H1.6V7zm7.1 6.6-4-2.3V6.7l4-2.3v9.2zM17.8 10.9l-1.7-1.7 1.7-1.7c.3-.3.3-.8 0-1.1-.3-.3-.8-.3-1.1 0L15 8.1l-1.7-1.7c-.3-.3-.8-.3-1.1 0-.3.3-.3.8 0 1.1l1.7 1.7-1.7 1.7c-.3.3-.3.8 0 1.1.3.3.8.3 1.1 0l1.7-1.7 1.7 1.7c.3.3.8.3 1.1 0 .3-.3.3-.8 0-1.1z"/></symbol>
+
+ <symbol id="plyr-pause" viewBox="0 0 18 18"><path d="M5 17.908c-.6 0-1-.4-1-1v-15.8c0-.5.4-1 1-1s1 .4 1 1v15.8c0 .5-.4 1-1 1zM13 17.908c-.6 0-1-.4-1-1v-15.8c0-.5.4-1 1-1s1 .4 1 1v15.8c0 .5-.4 1-1 1z"/></symbol>
+
+ <symbol id="plyr-pip" viewBox="0 0 18 18"><path d="M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"/><path d="M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0
+ 001-1v-6h-2v5z"/></symbol>
+
+ <symbol id="plyr-play" viewBox="0 0 18 18"><path d="M5.1 17.9c-.2 0-.3 0-.5-.1-.3-.2-.5-.5-.5-.9V1.1c0-.4.2-.7.5-.9.3-.2.7-.2 1 0l11.9 7.9c.3.2.4.5.4.8s-.2.6-.4.8l-11.9 8c-.2.1-.3.2-.5.2zm1-15V15l9.1-6-9.1-6.1z"/></symbol>
+
+ <symbol id="plyr-restart" viewBox="0 0 18 18"><path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6
+ 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"/></symbol>
+
+ <symbol id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol>
+
+ <symbol id="plyr-settings" viewBox="0 0 18 18"><path d="M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258
+ 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"/></symbol>
+
+ <symbol id="plyr-volume" viewBox="0 0 18 18"><path d="M12.489 13.03a.79.79 0 0 1-.56-1.35c1.47-1.47 1.47-3.87 0-5.35a.79.79 0 0 1 0-1.12c.31-.3.8-.31 1.11-.02l.03.03a5.363 5.363 0 0 1-.03 7.57c-.15.16-.35.24-.55.24z"/><path d="M15.099 14.85a.79.79 0 0 1-.56-1.35 6.35 6.35 0 0 0 .03-8.95l-.02-.02-.01-.01-.01-.01a.8.8 0 0 1 .02-1.12.8.8 0 0 1 1.12.01l.11.11c3.01 3.12 2.96 8.08-.11 11.13a.91.91 0 0 1-.57.21zM10.049 2.27a.795.795 0 0 0-.79 0l-5.45 3.12H.799c-.44 0-.8.36-.8.8v5.64c0 .44.36.8.8.8h3.01l5.45 3.12a.802.802 0 0 0 .79-.01c.25-.14.4-.4.4-.69V2.96c0-.28-.15-.55-.4-.69zm-8.46 4.71h1.63v4.05h-1.63V6.98zm7.27 6.69-4.05-2.31V6.64l4.05-2.31v9.34z"/></symbol>
+
+</svg>
'document_title' => "Cœur de l'offre",
'document_subtitle' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec rhoncus tellus ipsum, vel elementum eros vehicula quis.',
'document_image' => 'https://odl.paris.cubedesigners.com/storage/107/groupe-133-at-2x.png',
- 'document_pdf' => '#',
+ 'document_pdf' => '../../data/links/test1.pdf#page=1',
],
[
'document_title' => 'Offre détaillée',
'document_subtitle' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec rhoncus tellus ipsum, vel elementum eros vehicula quis.',
'document_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
- 'document_pdf' => '#',
+ 'document_pdf' => '../../data/links/test2.pdf#page=2',
],
];
'subchapter_memos' => [
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo1.pdf',
+ 'memo_pdf' => '../../data/links/test1.pdf#page=1',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/107/groupe-133-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo2.pdf',
+ 'memo_pdf' => '../../data/links/test2.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
],
'subchapter_memos' => [
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo1.pdf',
+ 'memo_pdf' => '../../data/links/test1.pdf#page=1',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/107/groupe-133-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo2.pdf',
+ 'memo_pdf' => '../../data/links/test2.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo3.pdf',
+ 'memo_pdf' => '../../data/links/test1.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
],
'subchapter_memos' => [
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo1.pdf',
+ 'memo_pdf' => '../../data/links/test1.pdf#page=1',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/107/groupe-133-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo2.pdf',
+ 'memo_pdf' => '../../data/links/test2.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo2.pdf',
+ 'memo_pdf' => '../../data/links/test2.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
],
'subchapter_memos' => [
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo1.pdf',
+ 'memo_pdf' => '../../data/links/test1.pdf#page=1',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/107/groupe-133-at-2x.png',
],
[
'memo_title' => 'Lorem ipsum dolor sit',
- 'memo_pdf' => 'memo2.pdf',
+ 'memo_pdf' => '../../data/links/test2.pdf',
'memo_image' => 'https://odl.paris.cubedesigners.com/storage/108/groupe-134-at-2x.png',
],
],
];
@endphp
- <h1 class="uppercase mb-8">{{ $title }}</h1>
- <h2 class="font-medium text-2xl mb-14 w-1/2">{{ $subtitle }}</h2>
-
- {{-- DOCUMENTS --}}
- <div class="grid lg:grid-cols-2 gap-6">
- @foreach($documents as $doc)
- <div class="bg-blue flex p-10 text-white rounded-md">
- <img class="w-1/2 pr-6" src="{{ $doc['document_image'] }}" alt="{{ $doc['document_title'] }}">
- <div class="-mr-5 space-y-4">
- <h3 class="text-4xl font-semibold">{{ $doc['document_title'] }}</h3>
- <p>{{ $doc['document_subtitle'] }}</p>
- <a href="{{ $doc['document_pdf'] }}" class="bg-blue-dark inline-block py-4 px-10 rounded-full">Visualiser</a>
- </div>
- </div>
- @endforeach
- </div>
+ {{-- RESOURCES --}}
+ <div class="resources" x-data="{
+ PDFOpen: false, // Tracks if PDF viewer overlay is open
+ viewerURL: '/tools/fluidbookpreview/pdfjs/web/viewer.html?file=', // Base URL for viewer
+
+ openPDF(URL) {
+ this.overlayOpen = true; // Stops page scrolling in the background
+ this.PDFOpen = true;
+ $nextTick(() => { $refs.PDFViewer.setAttribute('src', this.viewerURL + URL) });
+ },
+
+ closePDF() {
+ this.PDFOpen = false;
+ this.overlayOpen = false;
+ },
+ }">
+
+
+ <h1 class="uppercase mb-8">{{ $title }}</h1>
+ <h2 class="font-medium text-2xl mb-14 w-1/2">{{ $subtitle }}</h2>
- {{-- MEMOS --}}
- <p>
+ {{-- DOCUMENTS --}}
+ <div class="grid lg:grid-cols-2 gap-6">
+ @foreach($documents as $doc)
+ <a href="#" @click.prevent="openPDF('{{ $doc['document_pdf'] }}')" class="group">
+ <div class="bg-blue flex items-center p-10 text-white rounded-md">
+ <img class="w-1/2 pr-6" src="{{ $doc['document_image'] }}" alt="{{ $doc['document_title'] }}">
+ <div class="-mr-5 space-y-4">
+ <h3 class="text-4xl font-semibold">{{ $doc['document_title'] }}</h3>
+ <p>{{ $doc['document_subtitle'] }}</p>
+ <span class="bg-blue-dark inline-block py-4 px-10 rounded-full transform transition group-hover:scale-105">Visualiser</span>
+ </div>
+ </div>
+ </a>
+ @endforeach
+ </div>
+
+ {{-- MEMOS --}}
+ <p>
<span class="inline-block font-secondary font-bold uppercase text-xs leading-none p-2.5 border border-current mt-15">
{{ $memo_part_title }}
</span>
- </p>
-
-
- {{-- CHAPTERS --}}
- @foreach ($chapters as $chapter)
- <div class="mt-15">
- <h3 class="text-4xl">{{ $chapter['chapter_title'] }}</h3>
-
- {{-- SUB-CHAPTERS --}}
- @foreach ($chapter['subchapters'] as $subchapter)
- <h4 class="mt-8 text-2xl">{{ $subchapter['subchapter_title'] }}</h4>
- <p class="mt-2.5 max-w-[500px]">{{ $subchapter['subchapter_subtitle'] }}</p>
-
- {{-- MEMOS --}}
- <div class="grid grid-cols-2 gap-5 mt-8">
- @foreach ($subchapter['subchapter_memos'] as $memo)
- <div class="bg-grey-50 flex items-center p-8 rounded-md">
- <img class="w-1/4 pr-4" src="{{ $memo['memo_image'] }}" alt="{{ $memo['memo_title'] }}">
- <div class="space-y-2.5">
- <h3 class="text-base font-semibold">{{ $memo['memo_title'] }}</h3>
- <a href="{{ $memo['memo_pdf'] }}" class="circle-arrow"></a>
- </div>
- </div>
- @endforeach
- </div>
- @endforeach
+ </p>
+
+
+ {{-- CHAPTERS --}}
+ @foreach ($chapters as $chapter)
+ <div class="mt-15">
+ <h3 class="text-4xl">{{ $chapter['chapter_title'] }}</h3>
+
+ {{-- SUB-CHAPTERS --}}
+ @foreach ($chapter['subchapters'] as $subchapter)
+ <h4 class="mt-8 text-2xl">{{ $subchapter['subchapter_title'] }}</h4>
+ <p class="mt-2.5 max-w-[500px]">{{ $subchapter['subchapter_subtitle'] }}</p>
+
+ {{-- MEMOS --}}
+ <div class="grid grid-cols-2 gap-5 mt-8">
+ @foreach ($subchapter['subchapter_memos'] as $memo)
+ <a href="#" @click.prevent="openPDF('{{ $memo['memo_pdf'] }}')" class="group">
+ <div class="bg-grey-50 flex items-center p-8 rounded-md">
+ <img class="w-1/4 pr-4" src="{{ $memo['memo_image'] }}" alt="{{ $memo['memo_title'] }}">
+ <div class="space-y-2.5">
+ <h3 class="text-base font-semibold">{{ $memo['memo_title'] }}</h3>
+ <span class="circle-arrow transform transition group-hover:scale-110"></span>
+ </div>
+ </div>
+ </a>
+ @endforeach
+ </div>
+ @endforeach
+ </div>
+ @endforeach
+
+ {{-- PDF Viewer Overlay --}}
+ <div class="pdf-overlay
+ fixed top-0 left-0 w-screen h-screen
+ flex flex-col
+ bg-white text-black
+ px-30 pt-20
+ z-10
+ transition ease-out-cubic duration-500"
+ x-show="PDFOpen"
+ x-transition:enter-start="opacity-0"
+ x-transition:enter-end="opacity-100"
+ x-transition:leave-start="opacity-100"
+ x-transition:leave-end="opacity-0"
+ x-cloak>
+
+ {{-- PDF Viewer iframe --}}
+ <iframe x-ref="PDFViewer" src="" frameborder="0" class="absolute left-0 w-full top-[90px] h-[calc(100vh-90px)]"></iframe>
+
</div>
- @endforeach
+
+ {{-- Close button sits outside overlay so it can sit above and cover header search button --}}
+ {{-- TODO: Rework this so it's less awkward when the main menu is opened on top of the PDF viewer --}}
+ {{-- TODO: instead of using the same main element, consider having a header widget that can be used to redisplay header inside overlays (with option to disable / replace items via slots --}}
+ <x-close @click.prevent="closePDF()"
+ x-show="PDFOpen && !menuOpen" {{-- Don't show close button if menu gets opened --}}
+ x-transition:enter="delay-300 duration-300"
+ x-transition:enter-start="opacity-0"
+ x-transition:enter-end="opacity-100"
+ x-transition:leave-start="opacity-100"
+ x-transition:leave-end="opacity-0"
+ class="fixed top-8 right-8 flex z-30 bg-white pb-4 pl-4"
+ x-cloak />
+
+
+ </div>
@endsection