Compare commits

..

2 Commits

View File

@@ -146,14 +146,14 @@ function build_album_pages {
echo -en "\t\t\t\t<$a href='/$photo'>" >> $subpage echo -en "\t\t\t\t<$a href='/$photo'>" >> $subpage
# Determine what type of media it is, and how to display it. # Determine what type of media it is, and how to display it.
if [[ $photo == *".mp4" ]]; then if [[ $photo == *".mp4" ]]; then
echo -e "\t\t\t\t\t<video width='320px' preload='metadata' controls>" >> $subpage echo -e "\t\t\t\t\t<video width='320px' preload='none' controls>" >> $subpage
echo -e "\t\t\t\t\t\t<source src='/$photo' type=video/mp4>" >> $subpage echo -e "\t\t\t\t\t\t<source src='/$photo' type=video/mp4>" >> $subpage
echo -e "\t\t\t\t\t\tYour browser does not support videos." >> $subpage echo -e "\t\t\t\t\t\tYour browser does not support videos." >> $subpage
echo -e "\t\t\t\t\t</video>" >> $subpage echo -e "\t\t\t\t\t</video>" >> $subpage
elif [[ $photo == *".md" || $photo == *".txt" ]]; then elif [[ $photo == *".md" || $photo == *".txt" ]]; then
echo -e "\t\t\t\t\t<p>`cat $photo`</p>" >> $subpage echo -e "\t\t\t\t\t<p>`cat $photo`</p>" >> $subpage
else else
echo -e "\t\t\t\t\t<img src='/$photo' loading='lazy' alt=''>" >> $subpage echo -e "\t\t\t\t\t<img loading='lazy' alt='' src='/$photo'>" >> $subpage
fi fi
# Check if it needs an extra descriptive detail. # Check if it needs an extra descriptive detail.
echo -en "\t\t\t\t\t<p>$filename" >> $subpage echo -en "\t\t\t\t\t<p>$filename" >> $subpage
@@ -229,11 +229,11 @@ function build_all_page {
dir_name="${dir_name//_/ }" dir_name="${dir_name//_/ }"
dir_name="${dir_name//-/ }" dir_name="${dir_name//-/ }"
media="<img src='$media_uri' alt='' loading='lazy' style='width:100%'>" media="<img style='width:100%' loading='lazy' alt='' src='$media_uri'>"
# Determine how to show the file. # Determine how to show the file.
if [[ $media_uri == *".mp4" ]]; then if [[ $media_uri == *".mp4" ]]; then
media="<video style='width:100%' preload='metadata' controls>" media="<video style='width:100%' preload='none' controls>"
media="${media}<source src='$media_uri' type=video/mp4>" media="${media}<source src='$media_uri' type=video/mp4>"
media="${media}Your browser does not support videos." media="${media}Your browser does not support videos."
media="${media}</video>" media="${media}</video>"