Move last updated to bottom of page

This commit is contained in:
JP Hastings-Spital 2023-10-23 21:20:32 +01:00
parent b7526b024c
commit 430225b90c
3 changed files with 18 additions and 3 deletions

View file

@ -26,6 +26,7 @@ html {
body { body {
position:relative;
margin: 0; margin: 0;
padding: 0; padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Roboto", font-family: -apple-system, BlinkMacSystemFont, "Roboto",
@ -780,4 +781,19 @@ mark {
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
background-color: lch(20% 25 var(--accentHue)) !important; background-color: lch(20% 25 var(--accentHue)) !important;
} }
}
#last-updated {
position: absolute;
font-style:italic;
bottom: 0;
padding: 4px 4px 4px 8px;
border-top-left-radius: 8px;
opacity: 0.8;
background-color: $light-background;
@media (prefers-color-scheme: dark) {
background-color: $dark-background
}
} }

View file

@ -19,8 +19,7 @@
<hr /> <hr />
<section class="posts" style="text-align:center"> <section class="posts" style="text-align:center">
{{ partial "about-me.html" .}} {{ partial "about-me.html" .}}
{{ partial "site-last-update.html" }}
</section> </section>
</main> </main>
{{ partial "site-last-update.html" }}
{{ end }} {{ end }}

View file

@ -1,5 +1,5 @@
{{ if or (getenv "HUGO_LAST_UPDATE_TIME") (getenv "HUGO_LAST_UPDATE_HASH") }} {{ if or (getenv "HUGO_LAST_UPDATE_TIME") (getenv "HUGO_LAST_UPDATE_HASH") }}
<small style="font-style:italic"> <small id="last-updated">
Last updated Last updated
{{ with getenv "HUGO_LAST_UPDATE_TIME" }}on {{ partial "year-relative-date.html" . }},{{ end }} {{ with getenv "HUGO_LAST_UPDATE_TIME" }}on {{ partial "year-relative-date.html" . }},{{ end }}
{{ with getenv "HUGO_LAST_UPDATE_HASH" }}from <a href="https://github.com/by-jp/www.byjp.me/tree/{{ . }}">{{ . }}</a>{{ end }}. {{ with getenv "HUGO_LAST_UPDATE_HASH" }}from <a href="https://github.com/by-jp/www.byjp.me/tree/{{ . }}">{{ . }}</a>{{ end }}.