commit 3e77e0e3fe0d5a8ff4a84c9a4f60d653f71b13b6
parent 3230491316f708145e64e07871e45805dd28332e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 27 Feb 2023 20:43:58 +0100
Fix sub-menu indentation
Diffstat:
| M | meso-menu.sh | | | 149 | ++++++++++++++++++++++++++++++++++++++++++------------------------------------- |
1 file changed, 79 insertions(+), 70 deletions(-)
diff --git a/meso-menu.sh b/meso-menu.sh
@@ -70,39 +70,40 @@ print_art_sub_menu() {
else
echo " <li><a href=\"${root}art/art.html\">Overview</a></li>"
fi
- echo " <li>Codes</li>"
- echo " <li><ul class=\"lvl2\">"
+ echo " <li>Codes"
+ echo " <ul class=\"lvl2\">"
if [ "${name}" = "Kspectrum" ]; then
- echo " <li id=\"cur\">Kspectrum</li>"
+ echo " <li id=\"cur\">Kspectrum</li>"
else
- echo " <li><a href=\"${root}art/kspectrum.html\">Kspectrum</a></li>"
+ echo " <li><a href=\"${root}art/kspectrum.html\">Kspectrum</a></li>"
fi
if [ "${name}" = "Kdistribution" ]; then
- echo " <li id=\"cur\">Kdistribution</li>"
+ echo " <li id=\"cur\">Kdistribution</li>"
else
- echo " <li><a href=\"${root}art/kdistribution.html\">Kdistribution</a></li>"
+ echo " <li><a href=\"${root}art/kdistribution.html\">Kdistribution</a></li>"
fi
if [ "${name}" = "HR_PPart" ]; then
- echo " <li id=\"cur\">HR_PPart</li>"
+ echo " <li id=\"cur\">HR_PPart</li>"
else
- echo " <li><a href=\"${root}art/hr_ppart.html\">HR_PPart</a></li>"
+ echo " <li><a href=\"${root}art/hr_ppart.html\">HR_PPart</a></li>"
fi
if [ "${name}" = "PPart_LW" ]; then
- echo " <li id=\"cur\">PPart_LW</li>"
+ echo " <li id=\"cur\">PPart_LW</li>"
else
- echo " <li><a href=\"${root}art/ppart_lw.html\">PPart_LW</a></li>"
+ echo " <li><a href=\"${root}art/ppart_lw.html\">PPart_LW</a></li>"
fi
if [ "${name}" = "PPart_SW" ]; then
- echo " <li id=\"cur\">PPart_SW</li>"
+ echo " <li id=\"cur\">PPart_SW</li>"
else
- echo " <li><a href=\"${root}art/ppart_sw.html\">PPart_SW</a></li>"
+ echo " <li><a href=\"${root}art/ppart_sw.html\">PPart_SW</a></li>"
fi
if [ "${name}" = "Karine" ]; then
- echo " <li id=\"cur\">Karine</li>"
+ echo " <li id=\"cur\">Karine</li>"
else
- echo " <li><a href=\"${root}art/karine.html\">Karine</a></li>"
+ echo " <li><a href=\"${root}art/karine.html\">Karine</a></li>"
fi
- echo " </ul></li>"
+ echo " </ul>"
+ echo " </li>"
echo " </ul>"
echo " </div>"
}
@@ -129,24 +130,25 @@ print_htrdr_sub_menu() {
else
echo " <li><a href=\"${root}htrdr/htrdr-docs.html\">Reference documentation</a></li>"
fi
- echo " <li>Starter Pack</li>"
- echo " <li><ul class=\"lvl2\">"
+ echo " <li>Starter Pack"
+ echo " <ul class=\"lvl2\">"
if [ "${name}" = "Atmosphere-Starter-Pack" ]; then
- echo " <li id=\"cur\">Atmosphere</li>"
+ echo " <li id=\"cur\">Atmosphere</li>"
else
- echo " <li><a href=\"${root}htrdr/htrdr-atmosphere-spk.html\">Atmosphere</a></li>"
+ echo " <li><a href=\"${root}htrdr/htrdr-atmosphere-spk.html\">Atmosphere</a></li>"
fi
if [ "${name}" = "Combustion-Starter-Pack" ]; then
- echo " <li id=\"cur\">Combustion</li>"
+ echo " <li id=\"cur\">Combustion</li>"
else
- echo " <li><a href=\"${root}htrdr/htrdr-combustion-spk.html\">Combustion</a></li>"
+ echo " <li><a href=\"${root}htrdr/htrdr-combustion-spk.html\">Combustion</a></li>"
fi
# if [ "${name}" = "Planeto-Starter-Pack" ]; then
-# echo " <li id=\"cur\">Planeto</li>"
+# echo " <li id=\"cur\">Planeto</li>"
# else
-# echo " <li><a href=\"${root}htrdr/htrdr-planeto-spk.html\">Planeto</a></li>"
+# echo " <li><a href=\"${root}htrdr/htrdr-planeto-spk.html\">Planeto</a></li>"
# fi
- echo " </ul></li>"
+ echo " </ul>"
+ echo " </li>"
echo " <li><a href=\"https://gitlab.com/meso-star/htrdr\">Git repository</a></li>"
echo " </ul>"
echo " <div id=\"info\">"
@@ -180,20 +182,21 @@ print_schiff_sub_menu() {
else
echo " <li><a href=\"${root}schiff/schiff.html\">Overview</a></li>"
fi
- echo " <li>Reference documentation</li>"
- echo " <li><ul class=\"lvl2\">"
+ echo " <li>Reference documentation"
+ echo " <ul class=\"lvl2\">"
printf "%s\n" "${schiff_man_pages}" | \
while read -r i; do
man=$(printf "%s" "${i}" | awk '{print $1}')
section=$(printf "%s" "${i}" | awk '{print $2}')
if [ "${name}" = "${man}" ]; then
- echo " <li id=\"cur\">${name}</li>"
+ echo " <li id=\"cur\">${name}</li>"
else
link_path="${root}schiff/man/man${section}/${man}.${section}.html"
- echo " <li><a href=\"${link_path}\">${man}</a></li>"
+ echo " <li><a href=\"${link_path}\">${man}</a></li>"
fi
done
- echo " </ul></li>"
+ echo " </ul>"
+ echo " </li>"
if [ "${name}" = "Downloads" ]; then
echo " <li id=\"cur\">Downloads</li>"
else
@@ -215,22 +218,23 @@ print_solstice_sub_menu() {
else
echo " <li><a href=\"${root}solstice/solstice.html\">Overview</a></li>"
fi
- echo " <li>Reference documentation</li>"
- echo " <li><ul class=\"lvl2\">"
+ echo " <li>Reference documentation"
+ echo " <ul class=\"lvl2\">"
printf "%s\n" "${solstice_man_pages}" | \
while read -r i; do
man=$(printf "%s" "${i}" | awk '{print $1}')
section=$(printf "%s" "${i}" | awk '{print $2}')
if [ "${name}" = "${man}" ]; then
- echo " <li id=\"cur\">${name}</li>"
+ echo " <li id=\"cur\">${name}</li>"
else
link_path="${root}solstice/man/man${section}/${man}.${section}.html"
- echo " <li><a href=\"${link_path}\">${man}</a></li>"
+ echo " <li><a href=\"${link_path}\">${man}</a></li>"
fi
done
- echo " </ul></li>"
+ echo " </ul>"
+ echo " </li>"
if [ "${name}" = "Downloads" ]; then
echo " <li id=\"cur\">Downloads</li>"
else
@@ -267,21 +271,22 @@ print_stardis_sub_menu() {
else
echo " <li><a href=\"${root}stardis/consortium-fr.html\">Consortium</a></li>"
fi
- echo " <li>Reference documentation</li>"
- echo " <li><ul class=lvl2>"
+ echo " <li>Reference documentation"
+ echo " <ul class=lvl2>"
printf "%s\n" "${stardis_man_pages}" | \
while read -r i; do
man=$(printf "%s" "${i}" | awk '{print $1}')
section=$(printf "%s" "${i}" | awk '{print $2}')
if [ "${name}" = "${man}" ]; then
- echo " <li id=cur>${name}</li>"
+ echo " <li id=cur>${name}</li>"
else
link_path="${root}stardis/man/man${section}/${man}.${section}.html"
- echo " <li><a href=\"${link_path}\">${man}</a></li>"
+ echo " <li><a href=\"${link_path}\">${man}</a></li>"
fi
done
- echo ' </ul></li>'
+ echo " </ul>"
+ echo " </li>"
if [ "${name}" = "Starter-Pack" ]; then
echo " <li id=cur>Starter Pack</li>"
@@ -295,14 +300,15 @@ print_stardis_sub_menu() {
echo " <li><a href=${root}stardis/stardis-downloads.html>Downloads</a></li>"
fi
- echo ' <li>Git repositories</li>'
- echo ' <li><ul class=lvl2>'
- echo " <li><a href=https://gitlab.com/meso-star/stardis-solver>Stardis-Solver</a></li>"
- echo " <li><a href=https://gitlab.com/meso-star/stardis>Stardis CLI</a></li>"
- echo " <li><a href=https://gitlab.com/meso-star/stardis-green>Stardis Green</a></li>"
- echo ' </ul></li>'
- echo ' </ul>'
- echo ' </div>'
+ echo " <li>Git repositories"
+ echo " <ul class=\"lvl2\">"
+ echo " <li><a href=\"https://gitlab.com/meso-star/stardis-solver\">Stardis-Solver</a></li>"
+ echo " <li><a href=\"https://gitlab.com/meso-star/stardis\">Stardis CLI</a></li>"
+ echo " <li><a href=\"https://gitlab.com/meso-star/stardis-green\">Stardis Green</a></li>"
+ echo " </ul>"
+ echo " </li>"
+ echo " </ul>"
+ echo " </div>"
}
print_star_engine_sub_menu() {
@@ -317,45 +323,46 @@ print_star_engine_sub_menu() {
Star-UVM Star-UVM
Star-VX Star-VoXel"
- echo ' <div id=sub-menu>'
- echo ' <ul>'
+ echo " <div id=\"sub-menu\">"
+ echo " <ul>"
if [ "${name}" = "Overview" ]; then
- echo ' <li id=cur>Overview</li>'
+ echo " <li id=\"cur\">Overview</li>"
else
- echo " <li><a href=${root}star-engine/star-engine.html>Overview</a></li>"
+ echo " <li><a href=\"${root}star-engine/star-engine.html\">Overview</a></li>"
fi
- echo ' <li>Components</li>'
- echo ' <li><ul class=lvl2>'
+ echo " <li>Components"
+ echo " <ul class=\"lvl2\">"
printf "%s\n" "${components}" | \
while read -r i; do
page=$(printf "%s" "${i}" | awk '{print $1}')
section=$(printf "%s" "${i}" | awk '{print $2}')
if [ "${name}" = "${page}" ]; then
- echo " <li id=cur>${section}</li>"
+ echo " <li id=\"cur\">${section}</li>"
else
page_low=$(echo "${page}" | tr '[:upper:]' '[:lower:]')
- printf " <li><a href=%sstar-engine/%s.html>%s</a></li>" \
+ printf " <li><a href=\"%sstar-engine/%s.html\">%s</a></li>" \
"${root}" "${page_low}" "${section}"
fi
done
- echo ' </ul></li>'
+ echo " </ul>"
+ echo " </li>"
if [ "${name}" = "Downloads" ]; then
- echo ' <li id=cur>Downloads</li>'
- else
- echo " <li><a href=${root}star-engine/star-engine-downloads.html>Downloads</a></li>"
- fi
- echo " <li><a href=https://gitlab.com/meso-star/star-engine>Repository</a></li>"
- echo ' </ul>'
- echo ' <div id="info">'
- echo ' <p>Star-Engine was funded by the <a href=https://www.laregion.fr>Occitanie'
- echo ' region</a> (CLE-EDSTAR) from 2016 to 2018. |Méso|Star> was partner of'
- echo ' the project with the <a href=http://www.laplace.univ-tlse.fr>LAPLACE</a> and <a'
- echo ' href=https://www.imt-mines-albi.fr/en/rapsodee-research-centre>RAPSODEE</a>.'
- echo ' </p>'
- echo ' </div>'
- echo ' </div>'
+ echo " <li id=\"cur\">Downloads</li>"
+ else
+ echo " <li><a href=\"${root}star-engine/star-engine-downloads.html\">Downloads</a></li>"
+ fi
+ echo " <li><a href=\"https://gitlab.com/meso-star/star-engine\">Repository</a></li>"
+ echo " </ul>"
+ echo " <div id=\"info\">"
+ echo " <p>Star-Engine was funded by the <a href=\"https://www.laregion.fr\">Occitanie"
+ echo " region</a> (CLE-EDSTAR) from 2016 to 2018. |Méso|Star> was partner of"
+ echo " the project with the <a href=\"http://www.laplace.univ-tlse.fr\">LAPLACE</a> and <a"
+ echo " href=\"https://www.imt-mines-albi.fr/en/rapsodee-research-centre\">RAPSODEE</a>."
+ echo " </p>"
+ echo " </div>"
+ echo " </div>"
}
print_header() {
@@ -391,6 +398,7 @@ print_header() {
echo '</head>'
echo ""
echo "<body>"
+#echo "<aside class=\"menu\"><nav>"
echo "<div id=\"menu\">"
if [ "${section}" = "Home" ]; then
echo " <h2>Home</h2>"
@@ -436,6 +444,7 @@ print_header() {
fi
echo "<br>" # Enable CSS overflow here
echo "</div>"
+#echo "</nav></aside>"
echo "<div id=\"content\">"
}