commit 2930632c5e0a53eeda24aaaf66bc3c2aab758dba
parent 407aa6fbdbddc1650aa9b44de87af4377fa516ea
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Sun, 22 May 2022 12:13:41 +0200
Added build for gemini; changed logo to img
Diffstat:
5 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,4 @@
http
+gemini
BLOG-IDEAS
HTML-TIPS
diff --git a/bottom.gmi b/bottom.gmi
@@ -0,0 +1,5 @@
+---
+=> mailto:sebastiano@tronto.net Email me at sebastiano@tronto.net
+=> gemini://sebastiano.tronto.net Blog
+=> gemini://sebastiano.tronto.net Home
+=> https://sebastiano.tronto.net website
diff --git a/build.sh b/build.sh
@@ -2,10 +2,13 @@
recursivebuild() {
local destdir=$(echo $1 | sed 's|^src|http|')
+ local destdir_gmi=$(echo $1 | sed 's|^src|gemini|')
mkdir -p "$destdir"
+ mkdir -p "$destdir_gmi"
for file in $(ls $1); do
if [ -d "$1/$file" ]; then
mkdir -p "$destdir/$file"
+ mkdir -p "$destdir_gmi/$file"
recursivebuild "$1/$file"
else
extension=$(echo "$file" | sed 's/.*\.//')
@@ -15,6 +18,11 @@ recursivebuild() {
> "$destdir/index.html"
lowdown "$1/$file" >> "$destdir/index.html"
cat bottom.html >> "$destdir/index.html"
+
+ lowdown -Tgemini --gemini-link-roman \
+ --gemini-link-end \
+ "$1/$file" > "$destdir_gmi/index.gmi"
+ cat bottom.gmi >> "$destdir_gmi/index.gmi"
elif [ "$extension" = "html" ]; then
cat top.html "$1/$file" bottom.html \
| sed "s/TITLE/$(grep '<!--TITLE: ' <\
@@ -22,8 +30,12 @@ recursivebuild() {
| sed 's/^<!--TITLE: //' \
| sed 's/-->$//')/" \
> "$destdir/index.html"
+ elif [ "$extension" = "gmi" ]; then
+ cat "$1/$file" bottom.gmi > \
+ "$destdir_gmi/index.gmi"
else
cp "$1/$file" "$destdir/$file"
+ cp "$1/$file" "$destdir_gmi/$file"
fi
fi
done
diff --git a/src/style.css b/src/style.css
@@ -2,6 +2,11 @@ header nav table {
width: 100%;
}
+.logo img {
+ max-width: 3em;
+ margin: 0 0 0 0;
+}
+
.links {
text-align: right;
font-weight: bold;
diff --git a/top.html b/top.html
@@ -15,27 +15,7 @@
<tr>
<td class="logo">
<a href="/">
- <svg width="50" height="50">
- <circle
- cx="25"
- cy="25"
- r="24"
- stroke = "black"
- fill = "black"
- />
- <text
- x="50%"
- y="50%"
- text-anchor="middle"
- dominant-baseline="middle"
- font-family="monospace"
- font-weight="bolder"
- font-size="2.5em"
- fill="white"
- >
- st
- </text>
- </svg>
+ <img src="/favicon.png" alt="Home" title="Home">
</a>
</td>
<td class="links">