From f0b29535ec0f319b72e6c4dc3c153025edeab7de Mon Sep 17 00:00:00 2001 From: Carmen Date: Fri, 5 Jan 2024 16:25:10 +0100 Subject: [PATCH] portrait responsive index --- assets/css/index.css | 36 ++++---- assets/css/style.css | 7 ++ layouts/_default/baseof.html | 2 +- layouts/index.html | 136 +++++++++++++++-------------- layouts/partials/navbar.html | 21 ----- layouts/partials/navbarbottom.html | 21 +++++ 6 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 layouts/partials/navbarbottom.html diff --git a/assets/css/index.css b/assets/css/index.css index 0f5fef8..2ed18df 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -1,33 +1,35 @@ -.section { - position: relative; -} - - -.overlay { +@media screen and (orientation: landscape) { + .overlay { z-index: 10; opacity: 1; position: absolute; right: 10%; /* Extending full width */ bottom: 10%; - height: 30%; - width: 30%; + height: auto; + width: 50%; background-color: rgba(0, 0, 0, 0.5); - display: flex; - justify-content: center; /* Center content horizontally */ - align-items: center; /* Center content vertically */ - text-align: center; + + } + #galerie { + height: 100vh; } + .carousel-item { + max-height: 100vh; + overflow-y: hidden; + } +} + @media screen and (orientation: portrait) { .overlay { - z-index: 10; - opacity: 1; - position: relative; - top: 0; - right: 0; + position: sticky; bottom: 0; + z-index: 100; width: 100vw; height: 100%; background-color: rgba(0, 0, 0, 0.5); } + #galerie { + height: 100%; + } } \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 5e4b485..f800d9c 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -34,6 +34,10 @@ p { .menu-column { display: flex; } + + #main-col { + width: 80%; + } } @media screen and (orientation: portrait) { .navbar { @@ -42,4 +46,7 @@ p { .menu-column { display: none; } + #main-col { + width: 100%; + } } \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a92b8b9..5c598a8 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -17,7 +17,7 @@ {{- partial "navbar.html" . -}} -
+
{{- block "content" . }}{{- end }} {{ if not .IsHome}}
diff --git a/layouts/index.html b/layouts/index.html index 3e2069f..45a49c8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,76 +10,78 @@ {{ end }} {{ define "content" }} -
- +
+
+ - + -
- {{ $spectacles := where .Site.RegularPages "Section" "spectacles" }} - {{ range $index, $page := where $spectacles ".Params.actu" "!=" nil }} - - {{ end }} +
+ {{ $spectacles := where .Site.RegularPages "Section" "spectacles" }} + {{ range $index, $page := where $spectacles ".Params.actu" "!=" nil }} + + {{ end }} +
- + {{ partial "navbarbottom.html" . }}
{{ end }} @@ -123,7 +125,7 @@ } }) } - setInterval(moveToNextItem, 2000); + setInterval(moveToNextItem, 20000); }); diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 5f2c440..a24be8f 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -1,26 +1,5 @@ {{ $bg := cond .IsHome "has-background-black has-text-white" "has-background-success has-text-black" }} - -