From 21a83896332d9982033ee43da4b7e5e16d3bea98 Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Thu, 4 Nov 2021 19:46:37 +0100 Subject: [PATCH] WIP #4781 @4 --- resources/css/app.css | 18 ++-- resources/css/common/fonts.css | 24 ++--- resources/views/front/home.blade.php | 4 +- resources/views/front/media-library.blade.php | 102 +++++++++++++++++- resources/views/layouts/app.blade.php | 53 ++++++--- tailwind.config.js | 7 ++ 6 files changed, 165 insertions(+), 43 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 2c062a0..7518436 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,13 +1,9 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss/base"; +@import 'common/fonts.css'; +@import 'common/menu.css'; +@import 'common/global.css'; -@layer base { - @import 'common/fonts.css'; - @import 'common/menu.css'; - @import 'common/global.css'; -} +@import "tailwindcss/components"; -@layer utilities { - @import 'common/utilities.css'; -} +@import "tailwindcss/utilities"; +@import 'common/utilities.css'; diff --git a/resources/css/common/fonts.css b/resources/css/common/fonts.css index e31a08e..d62e891 100644 --- a/resources/css/common/fonts.css +++ b/resources/css/common/fonts.css @@ -26,9 +26,9 @@ /*=== GeneralSans-Variable ===*/ @font-face { font-family: 'GeneralSans'; - src: url('../../fonts/GeneralSans-Variable.woff2') format('woff2'), - url('../../fonts/GeneralSans-Variable.woff') format('woff'), - url('../../fonts/GeneralSans-Variable.ttf') format('truetype'); + src: url('../fonts/GeneralSans-Variable.woff2') format('woff2'), + url('../fonts/GeneralSans-Variable.woff') format('woff'), + url('../fonts/GeneralSans-Variable.ttf') format('truetype'); font-weight: 200 700; font-display: swap; font-style: normal; @@ -37,9 +37,9 @@ /*=== GeneralSans-VariableItalic ===*/ @font-face { font-family: 'GeneralSans'; - src: url('../../fonts/GeneralSans-VariableItalic.woff2') format('woff2'), - url('../../fonts/GeneralSans-VariableItalic.woff') format('woff'), - url('../../fonts/GeneralSans-VariableItalic.ttf') format('truetype'); + src: url('../fonts/GeneralSans-VariableItalic.woff2') format('woff2'), + url('../fonts/GeneralSans-VariableItalic.woff') format('woff'), + url('../fonts/GeneralSans-VariableItalic.ttf') format('truetype'); font-weight: 200 700; font-display: swap; font-style: italic; @@ -56,8 +56,8 @@ font-style: normal; font-weight: 400; src: local(''), - url('../../fonts/roboto-v29-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/roboto-v29-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url('../fonts/roboto-v29-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../fonts/roboto-v29-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } /* roboto-500 - latin */ @font-face { @@ -65,8 +65,8 @@ font-style: normal; font-weight: 500; src: local(''), - url('../../fonts/roboto-v29-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/roboto-v29-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url('../fonts/roboto-v29-latin-500.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../fonts/roboto-v29-latin-500.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } /* roboto-700 - latin */ @font-face { @@ -74,6 +74,6 @@ font-style: normal; font-weight: 700; src: local(''), - url('../../fonts/roboto-v29-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ - url('../../fonts/roboto-v29-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + url('../fonts/roboto-v29-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../fonts/roboto-v29-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ } diff --git a/resources/views/front/home.blade.php b/resources/views/front/home.blade.php index 8deba39..c8b0bea 100644 --- a/resources/views/front/home.blade.php +++ b/resources/views/front/home.blade.php @@ -33,8 +33,9 @@
{{-- Main home content --}} -
{{-- negative margin so image shadow sits under shortcuts --}} + {{-- Left Column: logo + text + CTA --}}
@if($logo) @@ -55,6 +56,7 @@ @endif
+ {{-- Right Column: Illustration image --}}
"Responsabilité sociétale et environnementale", + '2' => "Communication", + '6' => "Recherche et innovation", + '3' => "Organisation", + '7' => "Qualité de service à l'usager", + '4' => "Système d'information", + '8' => "Conditions techniques", + ]; @endphp

Médiathèque

{{-- FILTERS --}} -
- Filtrer + {{-- MEDIA LIBRARY GRID --}} @@ -97,7 +113,89 @@
@endforeach +
+ +
+ {{-- FILTERING INTERFACE --}} +
+ + {{-- Close --}} + + Fermer + + + + + + + + + +
+ +

Filtres

+ + {{-- Filter Options --}} +
+ {{-- Media Type Filters --}} +
+

Média

+
+ @foreach($media_types as $media_type_id => $media_type) +
+ +
+ @endforeach +
+
+ + {{-- Theme Filters --}} +
+

Thème

+
+ @foreach($themes as $theme_id => $theme) +
+ +
+ @endforeach +
+
+ +
+ +
+ +
+ +
+ +
@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index bd7d457..868f39f 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -65,12 +65,17 @@ flex items-center bg-blue text-white px-30 - z-10" + z-10 + transition ease-out-cubic duration-500" x-show="menuOpen" - x-transition.opacity.duration.500ms + x-transition:enter-start="opacity-0" + x-transition:enter-end="opacity-100" + {{--x-transition:leave="delay-1000"--}} + x-transition:leave-start="opacity-100" + x-transition:leave-end="opacity-0" x-cloak> -
    +
      @php $menu_links = [ '/' => 'Accueil', @@ -82,22 +87,36 @@ @endphp @foreach ($menu_links as $link => $text) -
    • - - {{ $text }} - + {{-- Overflow is hidden for text entrance animation. --}} + {{-- Extra padding and negative margin added so hover scale effect isn't clipped --}} +
    • +
      + + {{ $text }} + +
    • -
    • + style="transition-delay: {{ 250 + (50 * $loop->index) }}ms" + x-transition:enter="duration-2000" + x-transition:enter-start="scale-x-0" + x-transition:enter-end="scale-x-100" + {{--x-transition:leave="duration-1000" + x-transition:leave-start="scale-x-100" + x-transition:leave-end="scale-x-0"--}}>
    • @endforeach
    diff --git a/tailwind.config.js b/tailwind.config.js index 5f19ae7..22a9416 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -29,6 +29,13 @@ module.exports = { '15': '3.75rem', // 60px '22': '5.5rem', // 88px '30': '7.5rem', // 120px + }, + transitionTimingFunction: { + 'out-cubic': 'cubic-bezier(0.33, 1, 0.68, 1)', + 'out-quint': 'cubic-bezier(0.22, 1, 0.36, 1)', + }, + transitionDuration: { + '2000': '2000ms', } }, fontFamily: { -- 2.39.5