diff --git a/.gitignore b/.gitignore index 2eb32ec..7c0e119 100644 --- a/.gitignore +++ b/.gitignore @@ -105,4 +105,4 @@ dist ## Above is Github's recommendations for Node.js. Below are my additions. ## package-lock.json -files/* +files/photos/* diff --git a/files/photos/README.md b/files/photos/README.md new file mode 100644 index 0000000..118a7ff --- /dev/null +++ b/files/photos/README.md @@ -0,0 +1,3 @@ +# Hyperling.com - files/photos/ + +Used by `http://localhost:8080/photos` to build albums for sharing. diff --git a/main.js b/main.js index 5bc061d..5ef14f1 100755 --- a/main.js +++ b/main.js @@ -210,7 +210,6 @@ async function main() { mime = "text/*"; break; } - console.log("- Extension", extension, "led to MIME", mime); // Return the file res.contentType(mime); diff --git a/pages/photos.sh b/pages/photos.sh index 2760e33..eb0d38f 100755 --- a/pages/photos.sh +++ b/pages/photos.sh @@ -31,11 +31,17 @@ ls files/photos/ | sort -r | while read album; do echo -e "target='_blank' rel='noopener noreferrer'>$album_name" echo -e "\t\t
" - # Create index for each photo album based on its contents. + # Create index page for each photo ALBUM based on its contents. page="" subpage="files/photos/$album/index.html" $HELPER_DIR/body_open.php > $subpage - echo -e "\n\t\t

$album_name

" >> $subpage + + # Add a back button + echo -en "\n\t\t" >> $subpage + echo -e "

Back

" >> $subpage + + # Build the ALBUM page. + echo -e "\t\t

$album_name

" >> $subpage ls files/photos/$album/* | sort | while read photo; do # Do not include the index page. if [[ $photo == *"index.html" ]]; then @@ -91,6 +97,10 @@ ls files/photos/ | sort -r | while read album; do # End album on PHOTOS page. echo -e "\t\t
" + # Add a final back button + echo -en "\t\t" >> $subpage + echo -e "

Back

" >> $subpage + # Close out the ALBUM's page. $HELPER_DIR/body_close.php >> $subpage done