meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.fr/meso-web.git
Log | Files | Refs | README | LICENSE

commit 7f9d24325abb093edcda0310202bdb9d134cc603
parent 7aee66f8f2eebb06ee44c3d725323d5a079fdae0
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 21 Aug 2025 14:06:31 +0200

HTML formatting correction

The page content was not justified as expected: it should have been
included in a "content" div as before.

The HTML lang may not have been defined correctly.

The links to the translation were incorrectly formatted: a quotation
mark (") was missing.

The menu entry separators were not as expected: the string "\n" was
printed instead of a new line in the HTML source code.

Diffstat:
Mfooter.html | 1+
Mgenerate_header.sh | 12+++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/footer.html b/footer.html @@ -1,3 +1,4 @@ +</div> <div id="footer"> <a rel="license" href="http://creativecommons.org/licenses/by-nd/4.0/"> <img diff --git a/generate_header.sh b/generate_header.sh @@ -101,7 +101,7 @@ print_menu1() _label="$(echo "${_i}" | cut -d' ' -f1)" _directory="$(echo "${_i}" | cut -d' ' -f2)" - echo "${_separator}" && _separator=' &emsp13;|&emsp13;\n' + echo "${_separator}" && _separator=' &emsp13;|&emsp13;' if [ "${_directory}" = "${section}" ]; then printf ' %s\n' "${_label}" @@ -133,12 +133,12 @@ print_translations() _translation="$(echo "${_uri_template}" | sed "s/@LANG@/${_lang}/g")" - echo "${_separator}" && _separator=' &emsp13;.&emsp13;\n' + echo "${_separator}" && _separator=' &emsp13;/&emsp13;' if [ "${content}" = "${_translation}" ]; then printf ' <span class="cur">%s</span>\n' "${_lang}" else - printf ' <a href="%s%s/%s>%s</a>\n' \ + printf ' <a href="%s%s/%s">%s</a>\n' \ "${root}" "${section}" "${_translation}" "${_lang}" fi done @@ -161,7 +161,7 @@ print_menu2() _uri="$(echo "${_uri_template}" | sed "s/@LANG@/${lang}/g")" - echo "${_separator}" && _separator=' &emsp13;.&emsp13;\n' + echo "${_separator}" && _separator=' &emsp13;.&emsp13;' if [ "${_uri}" = "${content}" ]; then # This is the current web page @@ -240,7 +240,6 @@ content="$(basename "$1")" subentry="$(indexed_content < "${worktree}/${section}/index.tsv" \ | sed -n "/\t${content}/p")" -lang="en" if [ -n "${subentry}" ]; then lang="$(echo "${subentry}" | cut -d' ' -f3 | cut -d':' -f1)" else @@ -249,8 +248,11 @@ else "${0##*/}" "${content}" "${section}" fi +lang="${lang:-en}" root="$(relpath_to_worktree "$1")" print_head print_menu1 print_menu2 + +printf '<div id="content">\n'