diff --git a/sass/blog.scss b/sass/blog.scss index bff1ed3..7e3cb80 100644 --- a/sass/blog.scss +++ b/sass/blog.scss @@ -18,6 +18,12 @@ width: 100%; max-width: 500px; } + + &.full-width { + max-height: none; + max-width: 100%; + } + } } } @@ -53,7 +59,7 @@ } .post .post-header { - margin: 30px 0; + margin: 20px 0; } .post-header h1.title { @@ -82,18 +88,34 @@ .youtube { + max-height: 90vh; position: relative; - padding-bottom: 56.25%; - - iframe { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; + margin: 0 auto; + + .inner { + position: relative; + padding-bottom: 56.25%; + + iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + + &.portrait { + max-width: 40vh; + + .inner { + padding-bottom: 177.77%; + + } } } + .draft { color: var(--red); font-weight: bold; diff --git a/sass/header.scss b/sass/header.scss index 5f8309e..07934e9 100644 --- a/sass/header.scss +++ b/sass/header.scss @@ -1,30 +1,71 @@ header { margin: 2rem 0; -} -header .avatar { - float: left; - margin: 0 2rem 0 0; -} + .top { + display: flex; + gap: 1em; + margin-bottom: 2.5vw; -header .links { - line-height: 2.2rem; -} -header .avatar img { - width: 4rem; - height: 4rem; - overflow: hidden; - border-radius: 100%; -} + .avatar { + + img { + width: 4rem; + height: 4rem; + overflow: hidden; + border-radius: 100%; + } + } + + .details { + + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + + .site-description { + display: flex; + justify-content: space-between; + align-items: center; + + p { + margin: 0; + } + + + } + } + + } -header .site-description { - display: flex; - justify-content: space-between; - align-items: center; - p { - margin: 0 0 1rem 0; + .links { + line-height: 2.2rem; + + display: flex; + + a { + text-decoration: none; + flex: 0; + padding: 0.25em; + display: flex; + + &.active, + &:hover { + span.name { + text-decoration: underline; + } + } + + span { + flex: 0; + + &.emoji { + padding-right: 0.25em; + } + } + } } } @@ -80,7 +121,7 @@ nav { } nav a { - margin-right: 1.5rem; + margin-right: 2vw; } @media (max-width: 900px) { @@ -89,10 +130,23 @@ nav a { } nav a { - margin-right: 0.5rem; + + margin-right: 1vw; } header { margin: 1rem 0; } +} + +@media (max-width: 500px) { + + header { + + .site-description p { + font-size: 0.8em; + ; + } + + } } \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 5f95d11..8191916 100644 --- a/templates/base.html +++ b/templates/base.html @@ -45,6 +45,7 @@
+
{% if config.extra.avatar -%} {% endif -%} - -

{{ config.title }}

-
-
-

{{ config.description }}

+
+ +

{{ config.title }}

+
+
+

{{ config.description }}

+
+
@@ -84,6 +88,14 @@

{{ config.title }}

{% endif -%} + {# Bluesky #} + {% if config.extra.link_bluesky_url -%} +
  • + +
  • + {% endif -%} + {# Mastadon #} {% if config.extra.link_mastodon_url -%}
  • diff --git a/templates/macros/images.html b/templates/macros/images.html index aae4130..86b385d 100644 --- a/templates/macros/images.html +++ b/templates/macros/images.html @@ -1,6 +1,10 @@ {% extends "base.html" %} +{% macro image_absolute(path, src, alt, class="") -%} +{{ alt }} +{% endmacro image_absolute -%} + {% macro image(path, src, alt, class="") -%} {{ alt }} {% endmacro image -%} diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html index 16ed7dc..0738137 100644 --- a/templates/shortcodes/image.html +++ b/templates/shortcodes/image.html @@ -1,3 +1,9 @@ {% import "macros/images.html" as images -%} -{{ images::responsive_image(path=page.colocated_path, src=src, default_size=config.extra.images_default_size, sizes=config.extra.images_sizes, alt=alt, class=class | default(value="") ) }} +{% if path %} +{% set image_path = path %} +{% else %} +{% set image_path = page.colocated_path %} +{% endif %} + +{{ images::responsive_image(path= image_path, src=src, default_size=config.extra.images_default_size, sizes=config.extra.images_sizes, alt=alt, class=class | default(value="") ) }} diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html index d86d43d..15c328b 100644 --- a/templates/shortcodes/youtube.html +++ b/templates/shortcodes/youtube.html @@ -1,7 +1,7 @@ -
    +
    -
    \ No newline at end of file +
    \ No newline at end of file