templates,css: add sticky footer with git commit number
requires wrapping pages in articles, to avoid blocks centering because of margin-auto.
This commit is contained in:
parent
14694dbe4d
commit
6fcb1a14bc
1
c.ori
1
c.ori
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
gitrepo: "https://git.surfacemarkup.net/hans/ad_pubfiles"
|
||||
gitversion: Origami.shell('git rev-parse --short HEAD')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//base page template
|
||||
(page) => Tree.indent`
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
|
|
@ -15,5 +16,8 @@
|
|||
${page.all?'<p>private mode</p>':''}
|
||||
${page.indexPage ? '' : '<p><a href="/">↖index</a></p>'}
|
||||
${page._body}
|
||||
<footer>
|
||||
<p>built with pubfiles version <a href="${c.ori/gitrepo}/commit/${c.ori/gitversion}">${c.ori/gitversion}</a></p>
|
||||
</footer>
|
||||
</html>
|
||||
`
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@
|
|||
all
|
||||
title: page.title
|
||||
_body: Tree.indent`
|
||||
<article>
|
||||
<h1>${page.title}</h1>
|
||||
<p><span>${page.fnd.addr} ${page.fnd.tags || ''}</span></p>
|
||||
${page._body}
|
||||
<p><a href="/">↖index</a></p>
|
||||
</article>
|
||||
`
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue