Support for sub-pages, and custom page left/right
This commit is contained in:
parent
c15e6400df
commit
e8cc5e66ec
43
build.sh
43
build.sh
|
@ -73,7 +73,6 @@ html_start()
|
||||||
echo "<font face=Arial>" >> "$1" # DC ignores this, but need this to look consistent on other browsers
|
echo "<font face=Arial>" >> "$1" # DC ignores this, but need this to look consistent on other browsers
|
||||||
|
|
||||||
pagedump "./sites/$3/header" >> "$1"
|
pagedump "./sites/$3/header" >> "$1"
|
||||||
echo "<br>" >> "$1"
|
|
||||||
|
|
||||||
echo "<table width=\"600px\" border=\"0\">" >> "$1"
|
echo "<table width=\"600px\" border=\"0\">" >> "$1"
|
||||||
echo "<tr>" >> "$1"
|
echo "<tr>" >> "$1"
|
||||||
|
@ -89,11 +88,24 @@ html_start()
|
||||||
#then
|
#then
|
||||||
echo "<td " >> "$1"
|
echo "<td " >> "$1"
|
||||||
safecat "./sites/$3/etc/navtd" >> "$1"
|
safecat "./sites/$3/etc/navtd" >> "$1"
|
||||||
echo ">$(cat ./sites/$3/tmp_pagesl)</td>" >> "$1"
|
|
||||||
|
if [ -f "./sites/$3/pages_left.html" ]
|
||||||
|
then
|
||||||
|
echo ">$(cat ./sites/$3/pages_left.html)</td>" >> "$1"
|
||||||
|
else
|
||||||
|
echo ">$(cat ./sites/$3/tmp_pagesl)</td>" >> "$1"
|
||||||
|
fi
|
||||||
#fi
|
#fi
|
||||||
# right nav-bar end
|
# right nav-bar end
|
||||||
|
|
||||||
echo "<td halign=left valign=top width=100%>" >> "$1"
|
if [ -f "./sites/$3/etc/content" ]
|
||||||
|
then
|
||||||
|
echo "<td " >> "$1"
|
||||||
|
cat "./sites/$3/etc/content" >> "$1"
|
||||||
|
echo ">" >> "$1"
|
||||||
|
else
|
||||||
|
echo "<td halign=\"left\" valign=top width=100%>" >> "$1"
|
||||||
|
fi
|
||||||
# after this, we're expected to put content into this column...
|
# after this, we're expected to put content into this column...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,11 +116,17 @@ html_end()
|
||||||
# end of content here!
|
# end of content here!
|
||||||
|
|
||||||
# left nav-bar start
|
# left nav-bar start
|
||||||
if [ -d "./sites/$2/pages_right" ]
|
if [ -d "./sites/$2/tmp_pagesr" ]
|
||||||
then
|
then
|
||||||
echo "<td " >> "$1"
|
echo "<td " >> "$1"
|
||||||
safecat "./sites/$2/etc/navtd" >> "$1"
|
safecat "./sites/$2/etc/navtd" >> "$1"
|
||||||
echo ">$(cat ./sites/$2/tmp_pagesr)</td>" >> "$1"
|
|
||||||
|
if [ -f "./sites/$2/pages_right.html" ]
|
||||||
|
then
|
||||||
|
echo ">$(cat ./sites/$2/pages_right.html)</td>" >> "$1"
|
||||||
|
else
|
||||||
|
echo ">$(cat ./sites/$2/tmp_pagesr)</td>" >> "$1"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# left nav-bar end
|
# left nav-bar end
|
||||||
|
|
||||||
|
@ -378,6 +396,21 @@ site_process()
|
||||||
SUBTITLE=$(cat "$SUBDIR/title")
|
SUBTITLE=$(cat "$SUBDIR/title")
|
||||||
SUBOUTFILE="./out/$1/${ID_NAME}_${SUBID_NAME}.html"
|
SUBOUTFILE="./out/$1/${ID_NAME}_${SUBID_NAME}.html"
|
||||||
|
|
||||||
|
# handle sub-pages
|
||||||
|
find "./sites/$1/pages_left/$ID_NAME/" -mindepth 2 -maxdepth 2 -name title | sort | while read SUBLINE
|
||||||
|
do
|
||||||
|
ZUPSUBDIR=$(dirname "$ZUPSUBLINE")
|
||||||
|
ZUPSUBID_NAME=$(basename "$ZUPSUBDIR")
|
||||||
|
ZUPSUBTITLE=$(cat "$ZUPSUBDIR/title")
|
||||||
|
ZUPSUBOUTFILE="./out/$1/${ID_NAME}_${SUBID_NAME}_${ZUPSUBID_NAME}.html"
|
||||||
|
|
||||||
|
# generate the individual news page
|
||||||
|
html_start "$ZUPSUBOUTFILE" "$TITLE - $SUBTITLE - $ZUPSUBTITLE" "$1"
|
||||||
|
pagedump "$ZUPSUBDIR/content" >> "$ZUPSUBOUTFILE"
|
||||||
|
html_end "$ZUPSUBOUTFILE" "$1"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# generate the individual news page
|
# generate the individual news page
|
||||||
html_start "$SUBOUTFILE" "$TITLE - $SUBTITLE" "$1"
|
html_start "$SUBOUTFILE" "$TITLE - $SUBTITLE" "$1"
|
||||||
pagedump "$SUBDIR/content" >> "$SUBOUTFILE"
|
pagedump "$SUBDIR/content" >> "$SUBOUTFILE"
|
||||||
|
|
Loading…
Reference in New Issue