From 8dd20cb0cbc8fc6fa5fda1dbd2e2925888f2709c Mon Sep 17 00:00:00 2001 From: Myrddin Dundragon Date: Thu, 16 Oct 2025 13:56:58 -0400 Subject: [PATCH] Fixed responsiveness of the blog. Also added the publish date to a post. --- bard/assets/css/blog.css | 22 ++++++++++++++++++++++ bard/src/components/post.rs | 18 ++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/bard/assets/css/blog.css b/bard/assets/css/blog.css index 1e7477a..85f558b 100644 --- a/bard/assets/css/blog.css +++ b/bard/assets/css/blog.css @@ -259,3 +259,25 @@ } } } + +.video_link +{ + display: none; + width: 100%; + justify-content: center; +} + + + +@media screen and (max-width: 1000px) +{ + .video_link + { + display: flex; + } + + .embedded_video + { + display: none; + } +} diff --git a/bard/src/components/post.rs b/bard/src/components/post.rs index 50fa45c..986293f 100644 --- a/bard/src/components/post.rs +++ b/bard/src/components/post.rs @@ -23,7 +23,7 @@ pub fn BlogAuthor() -> Element #[component] -pub fn PostHeaderAuthor(author: Option) -> Element +pub fn PostHeaderAuthor(author: Option, publish_date: String) -> Element { match author { @@ -37,6 +37,11 @@ pub fn PostHeaderAuthor(author: Option) -> Element content: "{adventurer.name}" } + i + { + "Published: {publish_date}" + } + p { b @@ -58,6 +63,11 @@ pub fn PostHeaderAuthor(author: Option) -> Element content: "Unknown" } + i + { + "Published: {publish_date}" + } + p { b @@ -107,7 +117,11 @@ pub fn PostHeader(tale: Tale, adventurer: Option) -> Element } } - PostHeaderAuthor { author: adventurer } + PostHeaderAuthor + { + author: adventurer, + publish_date: tale.lore.publish_date.format("%m/%d/%Y").to_string() + } } }