diff options
| author | Paul Buetow <paul@buetow.org> | 2022-02-20 19:53:10 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-02-20 19:53:10 +0000 |
| commit | 9e44fb9ee400d8776082075c1fb8f74a584025fe (patch) | |
| tree | 029766599b524e195e692b5715a01617895a0df9 | |
| parent | 90fe2105156b4a3d425f24b9d15d78c52333af0d (diff) | |
fine tuning
| -rw-r--r-- | share/templates/default/header.tmpl | 20 | ||||
| -rw-r--r-- | share/templates/default/view.tmpl | 4 | ||||
| -rwxr-xr-x | src/photoalbum.sh | 8 |
3 files changed, 17 insertions, 15 deletions
diff --git a/share/templates/default/header.tmpl b/share/templates/default/header.tmpl index cc664b5..3b88220 100644 --- a/share/templates/default/header.tmpl +++ b/share/templates/default/header.tmpl @@ -8,15 +8,12 @@ cat <<END <title>${TITLE}</title> <style type="text/css"> body { - background-color: #ffffff; + background-color: #000000; background-image: url('${backhref}/${blurs_dir}/${background_image}'); background-size: cover; background-repeat: no-repeat; text-align: center; - - color: #000000; font-family: verdana, sans-serif; - width: 100%; } a { @@ -25,13 +22,11 @@ cat <<END div.text, div.footer, div.navigator { background-color: #ffffff; - width: 1024px; border: 15px solid #000000; padding: 10px; - margin-left: auto; - margin-right: auto; - margin-top: 10; - margin-bottom: 10; + margin-top: 10px; + margin-bottom: 10px; + width: auto; } img { @@ -47,6 +42,13 @@ cat <<END img.thumb:hover { -webkit-transform: scaleX(-1); transform: scaleX(-1); + object-fit: contain; + } + + img.view { + max-height: ${HEIGHT}px; + height: 80%; + object-fit: contain; } .animate-none{} diff --git a/share/templates/default/view.tmpl b/share/templates/default/view.tmpl index a4a41a0..29b1a38 100644 --- a/share/templates/default/view.tmpl +++ b/share/templates/default/view.tmpl @@ -10,10 +10,6 @@ cat <<END <img class='view ${animation_class}' border='0' src='${backhref}/${photos_dir}/${photo}' /> </a> </div> - -<p> - <a href="${backhref}/${photos_dir}/${photo}">Direct link</a> -</p> END if [ "${ORIGINAL_BASEPATH}x" != x ]; then diff --git a/src/photoalbum.sh b/src/photoalbum.sh index 81903e0..d60e84f 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -61,10 +61,12 @@ scalephotos () { continue fi - echo "Scaling $photo to $destphoto_nospace" + echo "Processing $photo to $destphoto_nospace" if [ -n "$HEIGHT" ]; then + # Scale down size. convert -auto-orient -geometry "$HEIGHT" "$photo" "$destphoto_nospace" else + # Keep original size convert -auto-orient "$photo" "$destphoto_nospace" fi done @@ -140,7 +142,9 @@ albumhtml () { declare dirname="$DIST_DIR/$thumbs_dir" test ! -d "$dirname" && mkdir -p "$dirname" echo "Creating thumb $DIST_DIR/$thumbs_dir/$photo" - convert -geometry "x$THUMBHEIGHT" "$photo" "$DIST_DIR/$thumbs_dir/$photo" + # Double the height, as CSS will scale up/down images based on boxing too. + declare height=$((THUMBHEIGHT * 2)) + convert -geometry "x$height" "$photo" "$DIST_DIR/$thumbs_dir/$photo" dirname="$DIST_DIR/$blurs_dir" test ! -d "$dirname" && mkdir -p "$dirname" |
