diff --git a/src/og-image.og.njk b/src/og-image.og.njk index 45fcac0..ebf6ff1 100644 --- a/src/og-image.og.njk +++ b/src/og-image.og.njk @@ -4,32 +4,47 @@ flex-flow: column nowrap; justify-content: flex-start; align-items: flex-start; + position: relative; width: 100%; height: 100%; background-color: #0f172a; color: #e2e8f0; box-sizing: border-box; - background-size: 100% 100%; } #main { - flex: 1 1 0; + flex: 1 1 100%; display: flex; flex-flow: column nowrap; width: 100%; height: 100%; - background-color: rgb(15 23 42 / 0.65); } -h1 { +#heading { flex: 1 1 100%; display: flex; flex-flow: column nowrap; justify-content: center; width: 100%; +} + +#background { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: cover; +} + +h1 { + flex: 1 0 100%; + display: flex; + flex-flow: column nowrap; + justify-content: center; padding: 64px 112px; font-size: 72px; text-wrap: balance; + background-color: rgb(15 23 42 / 0.65); } #footer { @@ -63,9 +78,14 @@ h1 { } -
+
-

{{ title | safe }}

+
+ {% if image and image.src != '' %} + {{ image.alt }} + {% endif %} +

{{ title | safe }}

+