summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-04-07 00:48:49 +0300
committerPaul Buetow <paul@buetow.org>2023-04-07 01:10:34 +0300
commit1077678711fca18792080b80f3bf7cae3fc4e70d (patch)
tree7fd867a8ece9539d0cea3eb99f2dd9c3d56ecf21 /lib
parent88be39ae445cf41adb1c0c79876be808afb20d6d (diff)
make ttf optional
Diffstat (limited to 'lib')
-rw-r--r--lib/html.source.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/html.source.sh b/lib/html.source.sh
index c2cf13c..0e99853 100644
--- a/lib/html.source.sh
+++ b/lib/html.source.sh
@@ -51,12 +51,10 @@ html::make_img () {
local descr="$1"; shift
if [ -z "$descr" ]; then
- echo -n "<a href='$link'><img src='$link' /></a>"
+ echo "<a href='$link'><img src='$link' /></a><br />"
else
- echo -n "<a href='$link'><img alt='$descr' title='$descr' src='$link' /></a>"
+ echo "<a href='$link'><img alt='$descr' title='$descr' src='$link' /></a><br />"
fi
-
- echo '<br />'
}
# Make a HTML hyperlink
@@ -93,10 +91,18 @@ html::add_extras () {
fi
done < <(find "$html_base_dir" -mindepth 1 -maxdepth 1 -type d | $GREP -E -v '(\.git)')
- cp "$HTML_WEBFONT_TEXT" "$html_base_dir/text.ttf"
- cp "$HTML_WEBFONT_CODE" "$html_base_dir/code.ttf"
- cp "$HTML_WEBFONT_HANDNOTES" "$html_base_dir/handnotes.ttf"
- cp "$HTML_WEBFONT_TYPEWRITER" "$html_base_dir/typewriter.ttf"
+ if [ -f "$HTML_WEBFONT_TEXT" ]; then
+ cp "$HTML_WEBFONT_TEXT" "$html_base_dir/text.ttf"
+ fi
+ if [ -f "$HTML_WEBFONT_CODE" ]; then
+ cp "$HTML_WEBFONT_CODE" "$html_base_dir/code.ttf"
+ fi
+ if [ -f "$HTML_WEBFONT_HANDNOTES" ]; then
+ cp "$HTML_WEBFONT_HANDNOTES" "$html_base_dir/handnotes.ttf"
+ fi
+ if [ -f "$HTML_WEBFONT_TYPEWRITER" ]; then
+ cp "$HTML_WEBFONT_TYPEWRITER" "$html_base_dir/typewriter.ttf"
+ fi
}
# Convert Gemtext to HTML