commit e3b33edc63583900d9e46b87f10c999db87fe4c6 parent eea07742cb77339208e47f7221e23b8b988b3ca3 Author: zakaria <e-zk@users.noreply.github.com> Date: Mon, 29 Nov 2021 16:50:34 +1000 Remove '.info' element, change footer content Move info stuff into the footer itself. Changed the layout of the footer too. Diffstat:
M | shite | | | 34 | +++++++++++++++++++++++++--------- |
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/shite b/shite @@ -45,15 +45,31 @@ gen_header() { gen_foot() { post="$1" + post_title="$2" + post_date="$3" post_html="${post%.*}.html" post_bname="${post#*${site_root}}" post_url="${post_html#*${site_root}}" printf '<footer>\n' - printf '<a href="%s">plaintext</a> ' ".${post_bname#*/${post_dir}}" - [ -n "$onion" ] \ - && printf '<a href="%s%s">onion</a>\n' "${onion}" "${post_url#*${site_root}}" + + if [ -n "$post_title" ]; then + printf '%s ⋅ ' "$post_title" + fi + + if [ -n "$post_date" ]; then + printf '%s ⋅ ' "$post_date" + fi + + printf '<a href="%s">Plaintext</a>' ".${post_bname#*/${post_dir}}" + + if [ -n "$onion" ]; then + printf ' ⋅ ' + printf '<a href="%s%s" title="Tor">Onion</a>' "${onion}" "${post_url#*${site_root}}" + fi + cat "${site_root}/${html_dir}/footer.html" + printf '</footer>\n' } @@ -117,15 +133,15 @@ gen_post() { lowdown -Thtml < "$post" # if a post date/title is given, add it to the end in an .info para - printf '<p class="info">' - [ -n "$post_title" ] && printf '%s' "$post_title" - # shellcheck disable=SC2154 - [ -n "$post_date" ] && printf ' • %s' "$post_date" - printf '</p>\n' + #printf '<p class="info">' + # [ -n "$post_title" ] && printf '%s' "$post_title" + # # shellcheck disable=SC2154 + # [ -n "$post_date" ] && printf ' • %s' "$post_date" + #printf '</p>\n' printf '</main>\n' - gen_foot "$post" + gen_foot "$post" "$post_title" "$post_date" printf '</body>\n'