From 3516da3df8d00c9663405549eae349001521d4a0 Mon Sep 17 00:00:00 2001 From: Nils K Date: Mon, 15 Mar 2021 22:00:08 +0100 Subject: bootstrap 4.6.0 --- gallery.sh | 106 ++++++++++++++++++++++++++++++++--------------------- images/gallery.jpg | Bin 27734 -> 200944 bytes images/image.jpg | Bin 42362 -> 223597 bytes 3 files changed, 64 insertions(+), 42 deletions(-) diff --git a/gallery.sh b/gallery.sh index e0b7fff..623b563 100755 --- a/gallery.sh +++ b/gallery.sh @@ -22,11 +22,7 @@ convert="convert" exif="jhead" # Bootstrap (currently v3.4.1) -stylesheet="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" - -downloadicon='' -movieicon='' -homeicon='' +stylesheet="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" # Debugging output # true=enable, false=disable @@ -114,18 +110,22 @@ cat > "$htmlfile" << EOF -
-
-
- +
+ +
+
EOF ### Photos (JPG) if [[ $(find . -maxdepth 1 -type f -iname \*.jpg | wc -l) -gt 0 ]]; then -echo '
' >> "$htmlfile" +echo '
' >> "$htmlfile" ## Generate Images numfiles=0 for filename in *.[jJ][pP][gG]; do @@ -138,14 +138,12 @@ for filename in *.[jJ][pP][gG]; do fi done cat >> "$htmlfile" << EOF -
+

- -

+ Thumbnail: $filename

EOF -[[ $((numfiles % 4)) -eq 0 ]] && echo '
' >> "$htmlfile" done echo '
' >> "$htmlfile" @@ -172,29 +170,46 @@ while [[ $file -lt $numfiles ]]; do -
-
-
- +
+ -
+ +
EOF # Pager - echo '
' >> "$imagehtmlfile" + echo '
' >> "$imagehtmlfile" + if [[ $prev ]]; then + echo '« Previous' >> "$imagehtmlfile" + else + echo '« Previous' >> "$imagehtmlfile" + fi + cat >> "$imagehtmlfile" << EOF +
+

$filename

+
+EOF + if [[ $next ]]; then + echo 'Next »' >> "$imagehtmlfile" + else + echo 'Next »' >> "$imagehtmlfile" + fi + echo '
' >> "$imagehtmlfile" cat >> "$imagehtmlfile" << EOF
-
-

+
+

Image: $filename

- EOF @@ -203,7 +218,7 @@ EOF if [[ $exifinfo ]]; then cat >> "$imagehtmlfile" << EOF
-
+
 $exifinfo
 
@@ -214,7 +229,13 @@ EOF # Footer cat >> "$imagehtmlfile" << EOF -
+
+
+
+
+ $footer - $datetime +
+
EOF @@ -227,18 +248,18 @@ fi if [[ $(find . -maxdepth 1 -type f -iname \*.mov -o -iname '*.mp4' | wc -l) -gt 0 ]]; then cat >> "$htmlfile" << EOF
-
+
-
+
EOF if [[ $(find . -maxdepth 1 -type f -iname \*.mov | wc -l) -gt 0 ]]; then for filename in *.[mM][oO][vV]; do filesize=$(getFileSize "$filename") cat >> "$htmlfile" << EOF -$movieicon $filename ($filesize) +$filename ($filesize) EOF done fi @@ -246,7 +267,7 @@ EOF for filename in *.[mM][pP]4; do filesize=$(getFileSize "$filename") cat >> "$htmlfile" << EOF -$movieicon $filename ($filesize) +$filename ($filesize) EOF done fi @@ -257,17 +278,17 @@ fi if [[ $(find . -maxdepth 1 -type f -iname \*.zip | wc -l) -gt 0 ]]; then cat >> "$htmlfile" << EOF
-
+
-
+
EOF for filename in *.[zZ][iI][pP]; do filesize=$(getFileSize "$filename") cat >> "$htmlfile" << EOF -$downloadicon $filename ($filesize) +$filename ($filesize) EOF done echo '
' >> "$htmlfile" @@ -275,14 +296,15 @@ fi ### Footer cat >> "$htmlfile" << EOF -
-
-

$footer

-

$datetime

+
+
+
+
+ $footer - $datetime +
-
EOF -debugOutput "= done :-)" \ No newline at end of file +debugOutput "= done" \ No newline at end of file diff --git a/images/gallery.jpg b/images/gallery.jpg index e222bef..08d82cd 100644 Binary files a/images/gallery.jpg and b/images/gallery.jpg differ diff --git a/images/image.jpg b/images/image.jpg index f733b82..d8d22c1 100644 Binary files a/images/image.jpg and b/images/image.jpg differ -- cgit v1.2.3