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