Ensure row divs are not double-closed.
This commit is contained in:
@ -131,13 +131,15 @@ function build_album_pages {
|
||||
fi
|
||||
|
||||
## Put in the subpage HTML ##
|
||||
# Set the count if this is the first loop.
|
||||
new_row="\t\t<div class='row text'>"
|
||||
# Set the count and start a row if this is the first loop.
|
||||
if [[ -z $count ]]; then
|
||||
count=0
|
||||
fi
|
||||
# Add a row for the next 2 images.
|
||||
if (( $count % 2 == 0 )); then
|
||||
echo -e "\t\t<div class='row text'>" >> $subpage
|
||||
echo -e "$newrow" >> $subpage
|
||||
# Else check if we need to start a new one for the next 2 images.
|
||||
elif (( $count % 2 == 0 )); then
|
||||
echo -e "\t\t</div>" >> $subpage
|
||||
echo -e "$newrow" >> $subpage
|
||||
fi
|
||||
# Add the container for the image and its text.
|
||||
echo -e "\t\t\t<div class='col-6 center'>" >> $subpage
|
||||
@ -160,10 +162,6 @@ function build_album_pages {
|
||||
fi
|
||||
# Close the image description and its link.
|
||||
echo -e "</p>\n\t\t\t\t</a>\n\t\t\t</div>" >> $subpage
|
||||
# Close the row after an odd count.
|
||||
if (( $count % 2 == 1 )); then
|
||||
echo -e "\t\t</div>" >> $subpage
|
||||
fi
|
||||
count=$(( count + 1 ))
|
||||
done
|
||||
echo -e "\t\t</div>" >> $subpage
|
||||
|
Reference in New Issue
Block a user