Remove the all
folder in place of an all.html
file. Create a main page which provides the output of it.
This commit is contained in:
parent
e13a1633dd
commit
55742e50db
@ -1,3 +1,9 @@
|
|||||||
# Hyperling.com - files/photos/
|
# Hyperling.com - files/photos/
|
||||||
|
|
||||||
Used by `http://localhost:8080/photos` to build albums for sharing.
|
## index.html
|
||||||
|
|
||||||
|
Used by `http://localhost:8080/photos` to build and show list of albums.
|
||||||
|
|
||||||
|
## all.html
|
||||||
|
|
||||||
|
Used by `http://localhost:8080/photos-all` to show all albums at once.
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
# Hyperling.com - files/photos/all/
|
|
||||||
|
|
||||||
Used by `http://localhost:8080/photos` to show all albums at once.
|
|
20
pages/photos-all.sh
Executable file
20
pages/photos-all.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Alias for new All Photos feed.
|
||||||
|
|
||||||
|
# Move to main directory.
|
||||||
|
DIR=`dirname $0`
|
||||||
|
cd $DIR/..
|
||||||
|
|
||||||
|
# Locations of photo scripts.
|
||||||
|
photos_all=./files/photos/all.html
|
||||||
|
photos=./pages/photos.sh
|
||||||
|
|
||||||
|
# If the all script does not exist,call the generator and ignore its output.
|
||||||
|
if [[ ! -e $photos_all ]]; then
|
||||||
|
$photos > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Main ##
|
||||||
|
cat $photos_all
|
||||||
|
|
||||||
|
exit 0
|
@ -19,7 +19,7 @@ cd $DIR/..
|
|||||||
HELPER_DIR=./pages/helpers
|
HELPER_DIR=./pages/helpers
|
||||||
PHOTOS_DIR=./files/photos
|
PHOTOS_DIR=./files/photos
|
||||||
mainpage=$PHOTOS_DIR/index.html
|
mainpage=$PHOTOS_DIR/index.html
|
||||||
allpage=$PHOTOS_DIR/all/index.html
|
allpage=$PHOTOS_DIR/all.html
|
||||||
|
|
||||||
# Use the cached version if available.
|
# Use the cached version if available.
|
||||||
if [[ -e $mainpage ]]; then
|
if [[ -e $mainpage ]]; then
|
||||||
@ -49,7 +49,7 @@ function start_main_page {
|
|||||||
echo -e "\t\t</div>" >> $mainpage
|
echo -e "\t\t</div>" >> $mainpage
|
||||||
|
|
||||||
echo -e "\t\t<div class='row'>" >> $mainpage
|
echo -e "\t\t<div class='row'>" >> $mainpage
|
||||||
echo -e "\t\t\t<$a href='/files/photos/all/index.html'" >> $mainpage
|
echo -e "\t\t\t<$a href='/photos-all'" >> $mainpage
|
||||||
echo -e "\t\t\t\tclass='col-12 header'>Click Here for the Full Image Feed" >> $mainpage
|
echo -e "\t\t\t\tclass='col-12 header'>Click Here for the Full Image Feed" >> $mainpage
|
||||||
echo -e "\t\t\t</a>" >> $mainpage
|
echo -e "\t\t\t</a>" >> $mainpage
|
||||||
echo -e "\t\t</div>" >> $mainpage
|
echo -e "\t\t</div>" >> $mainpage
|
||||||
@ -194,7 +194,7 @@ function build_all_page {
|
|||||||
|
|
||||||
# Add header.
|
# Add header.
|
||||||
echo -e "\t\t<div class='row'>" >> $allpage
|
echo -e "\t\t<div class='row'>" >> $allpage
|
||||||
echo -e "\t\t\t<h1 class='col-12 title'>All Image Feed</h1>" >> $allpage
|
echo -e "\t\t\t<h1 class='col-12 title'>All Photo Feed</h1>" >> $allpage
|
||||||
echo -e "\t\t</div>" >> $allpage
|
echo -e "\t\t</div>" >> $allpage
|
||||||
|
|
||||||
# Add images to the page
|
# Add images to the page
|
||||||
|
Loading…
x
Reference in New Issue
Block a user