From: Max Value Date: Wed, 8 Apr 2026 11:09:07 +0000 (+0100) Subject: Converted slideshow to flexbox X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=8f431a1f3a72619a364e5627e823b38cefd1d516;p=chester Converted slideshow to flexbox --- diff --git a/commercial/groke/index.html b/commercial/groke/index.html index 60a5dc7..d533067 100644 --- a/commercial/groke/index.html +++ b/commercial/groke/index.html @@ -48,8 +48,7 @@
-
- Change notes Chester

Requests implemented from last meeting:

@@ -182,12 +183,9 @@ function setup () {

Still todo:

    -
  • Clickthrough all images when in focus mode
  • -
  • Mobile view
  • -
  • Dark mode???
  • -
  • Annotated images
  • -
  • Look into image scaling mechanic
  • -
  • Possibly closed captions on audio
  • +
  • Annotated images if needed
  • +
  • Briefly look into image scaling
  • +
  • Dark mode if needed
`; diff --git a/style.css b/style.css index 208b55e..9728b28 100644 --- a/style.css +++ b/style.css @@ -130,6 +130,7 @@ blockquote { margin-bottom: calc(30px + 25px); width: calc(55vw - 25px); height: calc((55vw - 25px) / 1.5); + display: flex; } .slideshow.full { --full-overhang: 8vw; @@ -139,7 +140,7 @@ blockquote { } .slideshow > *:not(span) { display: inline-block; - width: 99%; + width: 98%; height: 100%; object-fit: contain; } @@ -153,7 +154,8 @@ blockquote { line-height: 100%; z-index: 0; cursor: pointer; - color: var(--darkgray) + color: var(--darkgray); + flex-wrap: nowrap; } .slideshow > span:hover { color: var(--mediumgray); } .prev { @@ -280,3 +282,89 @@ blockquote { background-color: rgba(0,0,0,0.5); font-style: italic; } + +@media (orientation: portrait) { + :root { + font-size: 1.3em; + } + + nav { + position: static; + padding: 50px 25px 50px 25px; + } + main { + position: static; + padding: 50px 25px 50px 25px; + } + + .audioNote { + width: 100%; + margin: 40px 0 40px 0; + } + .audioNote audio { + width: 100%; + } + .audioNote aside { + width: calc(100% - 40px); + margin: 20px; + } + .audioNote.reversed aside { text-align: left; } + + .blockquoteImage { + width: 100%; + margin: 40px 0 40px 0; + } + .blockquoteImage img { + width: 100%; + } + .blockquoteImage blockquote { + display: inline-block; + width: 100%; + margin: 40px 0 40px 0; + text-align: right; + } + + .blockquoteImage.reversed { + margin-left: 0 + } + .blockquoteImage.reversed blockquote { + text-align: left; + } + + .slideshow, .slideshow.full { + margin: 0; + margin-top: 50px; + margin-bottom: calc(30px + 25px); + width: calc(100vw - 50px); + height: calc((100vw - 50px) / 1.5); + } + .slideshow > *:not(span) { + display: inline-block; + width: 92%; + height: 100%; + object-fit: contain; + } + .slideshow > span { + position: relative; + display: inline-flex; + align-items: center; + vertical-align: top; + width: 27%; + height: 100%; + line-height: 100%; + z-index: 0; + cursor: pointer; + color: var(--darkgray) + } + .slideshow > span:hover { color: var(--mediumgray); } + .prev { + justify-content: flex-start; + margin-left: -2%; + margin-right: -22%; + } + .next { + justify-content: flex-end; + margin-left: -22%; + margin-right: -2%; + } +}