From 1782d93021ad6b4fcaed6ff7004ef41079398017 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Thu, 4 Feb 2021 18:05:33 +0100 Subject: Add site title --- gal | 9 ++++++++- style.css | 20 ++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/gal b/gal index b395a73..29a67ed 100755 --- a/gal +++ b/gal @@ -3,6 +3,9 @@ ## ## Usage: ## $ ./gal [PHOTOS DIR] [OUTPUT DIR] +## +## Setting custom title: +## $ TITLE=Title ./gal [AS ABOVE] ## === Customize === @@ -13,8 +16,10 @@ RESOLUTION=1500 ## ================= + PHOTOS=$1 OUTPUT=$2 +TITLE=${TITLE:-$(basename $OUTPUT)} mkdir -p $2/{photos,thumbs} ## Generate index.html menu file @@ -27,10 +32,12 @@ cat > $OUTPUT/index.html < - Gallery + $TITLE +

$TITLE

+

Last update: $(date '+%d.%m.%Y')

EOF diff --git a/style.css b/style.css index 9dc80d8..43ae13d 100644 --- a/style.css +++ b/style.css @@ -1,11 +1,16 @@ - body { margin: 0; - padding: 0; + padding: 6ex 16vw; + box-sizing: border-box; width: 100%; height: 100vh; font-family: sans-serif; } +h1, h3 { + width: 58vw; + margin: auto; +} +h3 { font-weight: 400; } footer { text-align: center; @@ -13,7 +18,7 @@ footer { } .tiles { - padding: 6vh 16vw; + padding: 6ex 0; display: flex; flex-wrap: wrap; flex-direction: row; @@ -21,7 +26,7 @@ footer { position: relative; } .tile { - margin: 15px; + margin: 1vw; cursor: pointer; overflow: hidden; min-width: 120px; @@ -42,8 +47,11 @@ footer { } @media only screen and (max-width: 442px) { - .tiles { - padding: 6vh 4vw; + body { + padding: 6ex 4vw; + } + h1, h3 { + width: 100%; } .tile { -- cgit 1.4.1