From: Stephen Cameron Date: Thu, 20 Jan 2022 22:35:00 +0000 (+0100) Subject: WIP #5046 @3.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c272089491cc057d4ea8251d0374aa408d77b045;p=odl.git WIP #5046 @3.5 --- diff --git a/resources/css/app.css b/resources/css/app.css index 61c266b..ca44d59 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -5,6 +5,8 @@ @import 'common/plyr.css'; @import 'common/global.css'; +@import 'pages/resources.css'; + @import "tailwindcss/components"; @import "tailwindcss/utilities"; diff --git a/resources/css/pages/resources.css b/resources/css/pages/resources.css new file mode 100644 index 0000000..96701f1 --- /dev/null +++ b/resources/css/pages/resources.css @@ -0,0 +1,3 @@ +.resources-page .site-header .menu-opener { + color: #fff; /* Must be white for the blue sidebar background */ +} diff --git a/resources/views/components/header.blade.php b/resources/views/components/header.blade.php index c2b21d2..cb2afd4 100644 --- a/resources/views/components/header.blade.php +++ b/resources/views/components/header.blade.php @@ -13,7 +13,7 @@ {{-- LEFT SIDE --}} {{-- Menu Toggle --}} - + {{-- Burger Menu Icon --}} diff --git a/resources/views/front/resources.blade.php b/resources/views/front/resources.blade.php index 7a8752b..398ee0b 100644 --- a/resources/views/front/resources.blade.php +++ b/resources/views/front/resources.blade.php @@ -1,6 +1,7 @@ @extends('layouts.app') @push('extra_body_classes') + resources-page {{-- For CSS hooks to change menu icon colour --}} overflow-y-scroll {{-- We already know this will be a long page so this avoids the header jumping on load --}} @endpush @@ -27,94 +28,111 @@ {{-- RESOURCES --}}
- -

- - {{ $resources['title'] }} - -

-

- - {{ $resources['subtitle'] }} - -

- - {{-- Animation wrapper for remaining content --}} -
- - {{-- --}}{{-- DOCUMENTS --}} - {{-- @if (count($resources->documents) > 0)--}} - {{-- --}} - {{-- @endif--}} - - {{-- --}}{{-- MEMOS TITLE --}} - {{--

--}} - {{-- --}} - {{-- Les mémos--}} - {{-- --}} - {{--

--}} - - {{-- MAIN SECTION WITH SIDEBAR --}} -
- {{-- SIDEBAR --}} -
- -
+ x-init="setTimeout(() => shown = true, 50)" + class="resources flex -mx-8 {{-- expand content a bit because there are 2 columns --}}"> + + @php + // Classes to control width of sidebar (also used by spacer element) + $sidebar_constraints = 'w-[28vw] min-w-[300px] max-w-[520px]'; + @endphp + + {{-- SIDEBAR --}} +
+ + +
+ + {{-- SIDEBAR SPACER --}} + {{-- This div reserves the space for the fixed sidebar and should have the same min/max-widths --}} +
+ + {{-- MAIN CONTENT --}} +
+ +

+ + {{ $resources['title'] }} + +

+

+ + {{ $resources['subtitle'] }} + +

+ + {{-- Animation wrapper for remaining content --}} +
+ + {{-- --}}{{-- DOCUMENTS --}} + {{-- @if (count($resources->documents) > 0)--}} + {{--
--}} + {{-- @foreach($resources->documents as $doc)--}} + {{-- @if (!$doc['document_pdf'] || !isset($resources_pdf[$doc['document_pdf']]))--}} + {{-- @continue--}} + {{-- @endif--}} + {{-- @php--}} + {{-- /** @var \Cubist\Backpack\Magic\PageData $pdf */--}} + {{-- $pdf = $resources_pdf[$doc['document_pdf']];--}} + {{-- $pdfurl = $pdf->getImageURLbyCollection($pdf->get('file_upload'));--}} + {{-- $thumb = null === $pdf->get('file_thumb')--}} + {{-- ? $pdf->getImageURLbyCollection($pdf->get('file_upload'),'poster')--}} + {{-- : $pdf->getImageURLbyCollection($pdf->get('file_thumb'));--}} + {{-- @endphp--}} + {{-- --}}{{----}} + {{-- --}} + {{--
--}} + {{-- {{ $doc['document_title'] }}--}} + {{-- --}}{{--{{ $doc['document_title'] }}--}} + {{--
--}} + {{--

{{ $doc['document_title'] }}

--}} + {{--

{{ $doc['document_subtitle'] }}

--}} + {{-- --}} + {{-- Visualiser--}} + {{-- --}} + {{--
--}} + {{--
--}} + {{--
--}} + {{-- @endforeach--}} + {{--
--}} + {{-- @endif--}} + + {{-- --}}{{-- MEMOS TITLE --}} + {{--

--}} + {{-- --}} + {{-- Les mémos--}} + {{-- --}} + {{--

--}} + {{-- CHAPTERS --}}
@@ -176,7 +194,8 @@ @endforeach
-
-
+ +
{{-- / MAIN CONTENT --}} +
{{-- / RESOURCES --}} @endsection