commit 90a2d5e30ed0e28e31926e3564e77ac84dc32acd
parent d43628fbf0c542bb54ff0ba738e393851b5c4225
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 21 Dec 2018 10:49:27 +0100
Merge the about and PGP section in a new Home section
Diffstat:
2 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/meso-menu.sh b/meso-menu.sh
@@ -37,6 +37,26 @@ high_tune_man_pages=(
"les2htcp 1"
)
+print_home_sub_menu() {
+ local root=$1
+ local name=$2
+
+ echo ' <div id=sub-menu>'
+ echo ' <ul>'
+ if [ "$name" == "About" ]; then
+ echo ' <li id=cur>About</li>'
+ else
+ echo " <li><a href=${root}misc/about.html>About</a></li>"
+ fi
+ if [ "$name" == "PGP" ]; then
+ echo ' <li id=cur>PGP signatures</li>'
+ else
+ echo " <li><a href=${root}misc/pgp_signatures.html>PGP signatures</a></li>"
+ fi
+ echo ' </ul>'
+ echo ' </div>'
+}
+
print_art_sub_menu() {
local root=$1
local name=$2
@@ -297,10 +317,11 @@ print_header() {
echo ''
echo '<body>'
echo '<div id="menu">'
- if [ "$section" == "About" ]; then
- echo ' <h2>About</h2>'
+ if [ "$section" == "Home" ]; then
+ echo ' <h2>Home</h2>'
+ print_home_sub_menu ${root} ${name}
else
- echo " <h2><a href=${root}misc/about.html>About</a></h2>"
+ echo " <h2><a href=${root}misc/about.html>Home</a></h2>"
fi
if [ "$section" == "ART" ]; then
echo " <h2>A.R.T.</h2>"
@@ -337,11 +358,6 @@ print_header() {
else
echo " <h2><a href=${root}star-engine/star-engine.html>Star-Engine</a></h2>"
fi
- if [ "$section" == "PGP" ]; then
- echo ' <h2>PGP signatures</h2>'
- else
- echo " <h2><a href=${root}misc/pgp_signatures.html>PGP signatures</a></h2>"
- fi
echo '</div>'
echo '<div id=content>'
}
diff --git a/misc/misc.sh b/misc/misc.sh
@@ -22,14 +22,14 @@ source ../meso-menu.sh
tput bold; echo ">>> Miscellaneous web pages"; tput sgr0
echo "Write index.html"
{
- print_header About dummy
+ print_header Home About
cat about.html.in
print_footer
} > about.html
echo "Write pgp_signatures.html"
{
- print_header PGP dummy
+ print_header Home PGP
cat pgp_signatures.html.in
print_footer
} > pgp_signatures.html