diff --git a/Makefile b/Makefile index 009f4d6..18c0e46 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +VERSION=`git rev-parse --short HEAD` + gentempl: @command -v templ &> /dev/null || go install github.com/a-h/templ/cmd/templ@latest build:gentempl - templ generate && go build -o dumb + templ generate && go build -ldflags="-X 'github.com/rramiachraf/dumb/data.Version=$(VERSION)' -s -w" diff --git a/data/data.go b/data/data.go new file mode 100644 index 0000000..48d6f81 --- /dev/null +++ b/data/data.go @@ -0,0 +1,3 @@ +package data + +var Version = "DEVELOPMENT" diff --git a/static/style.css b/static/style.css index 2691ec4..b583791 100644 --- a/static/style.css +++ b/static/style.css @@ -225,24 +225,22 @@ a { color: #333; } -@media screen and (max-width: 900px) { - #container { - padding: 3rem 2rem; - display: flex; - flex-direction: column; - gap: 3rem; - width: calc(100vw - 4rem);; - } - - #metadata { - align-items: center; - } +footer { + background-color: #ffcd38; + padding: 1rem 0; } -footer { - text-align: center; - background-color: #ffcd38; - padding: 1rem; +#footer_container { + width: 1024px; + display: flex; + justify-content: space-between; + align-items: center; + margin: 0 auto; +} + +#version { + font-size: 1.3rem; + color: #1b1b1b; } footer a { @@ -349,6 +347,26 @@ footer a:hover { border-radius: 5px; } +@media screen and (max-width: 1080px) { + #container { + padding: 3rem 2rem; + display: flex; + flex-direction: column; + gap: 3rem; + width: calc(100vw - 4rem);; + } + + #metadata { + align-items: center; + } + + #footer_container { + width: 100%; + padding: 0 2rem; + box-sizing: border-box; + } +} + /* dark mode */ @media (prefers-color-scheme: dark) { body { diff --git a/views/footer.templ b/views/footer.templ index 1701078..57760e0 100644 --- a/views/footer.templ +++ b/views/footer.templ @@ -1,7 +1,12 @@ package views +import "github.com/rramiachraf/dumb/data" + templ footer() { }