From 29e793b1a49c188b06242a900c5e9e95f37bebd1 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Sat, 2 Mar 2024 12:35:42 -0700 Subject: [PATCH] new style for featured --- output/style.css | 23 ++++++++++++++++++++++- src/index_generator.rs | 6 +++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/output/style.css b/output/style.css index 49754b2..dffa457 100644 --- a/output/style.css +++ b/output/style.css @@ -1,6 +1,27 @@ -.featured-title { +.featured main { + display: inline-block; + vertical-align: top; +} + +.featured hgroup { display: flex; flex-direction: column; justify-content: center; align-items: center; +} + +.featured header { + display: flex; + align-items: center; +} + +.featured img { + width: auto; + height: auto; + max-height: 30vh; +} + +.featured hgroup { + flex-grow: 1; + padding-left: 20px; } \ No newline at end of file diff --git a/src/index_generator.rs b/src/index_generator.rs index cc8d933..60f8872 100644 --- a/src/index_generator.rs +++ b/src/index_generator.rs @@ -62,10 +62,10 @@ fn create_featured_card(entry: &Entry) -> Markup { let main_url = utilities::get_root_url(link.href.as_str()); html! { - article { - header class="grid" { + article class="featured" { + header { img src=(image_url) alt="Entry image"; - hgroup class="featured-title" { + hgroup { h2 { (title) } a href=(format!("http://{}", main_url)) { (main_url) } }