From a320f3834a479a94ad90b30350443e7dbfb7aee9 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 24 Jul 2024 11:53:05 +0200 Subject: [PATCH] Improve page title layout with long titles --- src/frontend/templates/mod.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/frontend/templates/mod.rs b/src/frontend/templates/mod.rs index 542f42d..5afa6ad 100644 --- a/src/frontend/templates/mod.rs +++ b/src/frontend/templates/mod.rs @@ -117,21 +117,23 @@ pub fn base(config: TemplateConfig, content: Markup) -> Markup { (navbar(&config)) main .container.my-4 { - div .d-flex.justify-content-between.mb-3 { - div .d-flex.align-items-center.gap-1 { + div { + div .float-end.d-flex.align-items-start.h-100.gap-1 { + @for page_action in config.page_actions { + (page_action) + } + } + div { @if let Some(ref page_title) = config.page_title { h2 { (page_title) + + @if let Some(ref page_title_extra) = config.page_title_extra { + " " + (page_title_extra) + } } } - @if let Some(ref page_title_extra) = config.page_title_extra { - (page_title_extra) - } - } - div .d-flex.h-100.gap-1 { - @for page_action in config.page_actions { - (page_action) - } } }