about summary refs log tree commit diff
path: root/gal
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-02-04 18:05:33 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-02-04 18:05:33 +0100
commit1782d93021ad6b4fcaed6ff7004ef41079398017 (patch)
tree77a488d98a381f2d114b6d73cb989002b85c0705 /gal
parent9d21606dc4e2e500a1d19de95c2e65ad26e816f5 (diff)
downloadgalier-1782d93021ad6b4fcaed6ff7004ef41079398017.tar.gz
galier-1782d93021ad6b4fcaed6ff7004ef41079398017.zip
Add site title
Diffstat (limited to 'gal')
-rwxr-xr-xgal9
1 files changed, 8 insertions, 1 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 <<EOF
   <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width">
-    <title>Gallery</title>
+    <title>$TITLE</title>
     <link rel="stylesheet" href="style.css" type="text/css" >
   </head>
   <body>
+    <h1>$TITLE</h1>
+    <h3>Last update: $(date '+%d.%m.%Y')</h3>
     <div class="tiles">
 EOF