From 6fcb1a14bc22121aefa93d4dc8233b55b4e0f184 Mon Sep 17 00:00:00 2001 From: Hans Fast Date: Sat, 4 Apr 2026 08:23:22 +0200 Subject: [PATCH] templates,css: add sticky footer with git commit number requires wrapping pages in articles, to avoid blocks centering because of margin-auto. --- c.ori | 1 + css/style.css | 16 ++++++++++++++-- ori-templates/base_html.ori | 4 ++++ ori-templates/page.ori | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/c.ori b/c.ori index 0704932..668434c 100644 --- a/c.ori +++ b/c.ori @@ -1,3 +1,4 @@ { gitrepo: "https://git.surfacemarkup.net/hans/ad_pubfiles" + gitversion: Origami.shell('git rev-parse --short HEAD') } diff --git a/css/style.css b/css/style.css index a9de82c..a3f95c5 100644 --- a/css/style.css +++ b/css/style.css @@ -61,12 +61,16 @@ body { font-family: "sans-serif"; - & > :not(.wider) { + display: flex; + flex-direction: column; + align-items: start; + min-height: 100vh; + & > :not(.wider), & > :not(.wider) > :not(.wider) { max-width: 38rem; margin-inline: auto; } - & > .wider { + & > .wider, & > article > .wider { max-width: min(55rem, 100%); margin-inline: auto; } @@ -85,6 +89,14 @@ trl-group { display: block; } +footer { + display: flex; + flex-direction: row; + justify-content: space-between; + flex-grow: 1; + align-items: flex-end; +} + @layer translations { body > trl-selector:first-child {display: none;} /* was adding a grid row! */ trl-selector { diff --git a/ori-templates/base_html.ori b/ori-templates/base_html.ori index 3357d27..57ccc88 100644 --- a/ori-templates/base_html.ori +++ b/ori-templates/base_html.ori @@ -1,5 +1,6 @@ //base page template (page) => Tree.indent` + @@ -15,5 +16,8 @@ ${page.all?'

private mode

':''} ${page.indexPage ? '' : '

↖index

'} ${page._body} + ` diff --git a/ori-templates/page.ori b/ori-templates/page.ori index 636d1e5..96106dd 100644 --- a/ori-templates/page.ori +++ b/ori-templates/page.ori @@ -3,9 +3,11 @@ all title: page.title _body: Tree.indent` +

${page.title}

${page.fnd.addr} ${page.fnd.tags || ''}

${page._body}

↖index

+
` })