diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-05-22 12:13:41 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-05-22 12:13:41 +0200 |
| commit | 2930632c5e0a53eeda24aaaf66bc3c2aab758dba (patch) | |
| tree | 434dc6b80971fd3264660ba0f162e31480852180 | |
| parent | 407aa6fbdbddc1650aa9b44de87af4377fa516ea (diff) | |
| download | sebastiano.tronto.net-2930632c5e0a53eeda24aaaf66bc3c2aab758dba.tar.gz sebastiano.tronto.net-2930632c5e0a53eeda24aaaf66bc3c2aab758dba.zip | |
Added build for gemini; changed logo to img
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | bottom.gmi | 5 | ||||
| -rwxr-xr-x | build.sh | 12 | ||||
| -rw-r--r-- | src/style.css | 5 | ||||
| -rw-r--r-- | top.html | 22 |
5 files changed, 24 insertions, 21 deletions
| @@ -1,3 +1,4 @@ | |||
| 1 | http | 1 | http |
| 2 | gemini | ||
| 2 | BLOG-IDEAS | 3 | BLOG-IDEAS |
| 3 | HTML-TIPS | 4 | HTML-TIPS |
diff --git a/bottom.gmi b/bottom.gmi new file mode 100644 index 0000000..2a8794d --- /dev/null +++ b/bottom.gmi | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | --- | ||
| 2 | => mailto:sebastiano@tronto.net Email me at sebastiano@tronto.net | ||
| 3 | => gemini://sebastiano.tronto.net Blog | ||
| 4 | => gemini://sebastiano.tronto.net Home | ||
| 5 | => https://sebastiano.tronto.net website | ||
| @@ -2,10 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | recursivebuild() { | 3 | recursivebuild() { |
| 4 | local destdir=$(echo $1 | sed 's|^src|http|') | 4 | local destdir=$(echo $1 | sed 's|^src|http|') |
| 5 | local destdir_gmi=$(echo $1 | sed 's|^src|gemini|') | ||
| 5 | mkdir -p "$destdir" | 6 | mkdir -p "$destdir" |
| 7 | mkdir -p "$destdir_gmi" | ||
| 6 | for file in $(ls $1); do | 8 | for file in $(ls $1); do |
| 7 | if [ -d "$1/$file" ]; then | 9 | if [ -d "$1/$file" ]; then |
| 8 | mkdir -p "$destdir/$file" | 10 | mkdir -p "$destdir/$file" |
| 11 | mkdir -p "$destdir_gmi/$file" | ||
| 9 | recursivebuild "$1/$file" | 12 | recursivebuild "$1/$file" |
| 10 | else | 13 | else |
| 11 | extension=$(echo "$file" | sed 's/.*\.//') | 14 | extension=$(echo "$file" | sed 's/.*\.//') |
| @@ -15,6 +18,11 @@ recursivebuild() { | |||
| 15 | > "$destdir/index.html" | 18 | > "$destdir/index.html" |
| 16 | lowdown "$1/$file" >> "$destdir/index.html" | 19 | lowdown "$1/$file" >> "$destdir/index.html" |
| 17 | cat bottom.html >> "$destdir/index.html" | 20 | cat bottom.html >> "$destdir/index.html" |
| 21 | |||
| 22 | lowdown -Tgemini --gemini-link-roman \ | ||
| 23 | --gemini-link-end \ | ||
| 24 | "$1/$file" > "$destdir_gmi/index.gmi" | ||
| 25 | cat bottom.gmi >> "$destdir_gmi/index.gmi" | ||
| 18 | elif [ "$extension" = "html" ]; then | 26 | elif [ "$extension" = "html" ]; then |
| 19 | cat top.html "$1/$file" bottom.html \ | 27 | cat top.html "$1/$file" bottom.html \ |
| 20 | | sed "s/TITLE/$(grep '<!--TITLE: ' <\ | 28 | | sed "s/TITLE/$(grep '<!--TITLE: ' <\ |
| @@ -22,8 +30,12 @@ recursivebuild() { | |||
| 22 | | sed 's/^<!--TITLE: //' \ | 30 | | sed 's/^<!--TITLE: //' \ |
| 23 | | sed 's/-->$//')/" \ | 31 | | sed 's/-->$//')/" \ |
| 24 | > "$destdir/index.html" | 32 | > "$destdir/index.html" |
| 33 | elif [ "$extension" = "gmi" ]; then | ||
| 34 | cat "$1/$file" bottom.gmi > \ | ||
| 35 | "$destdir_gmi/index.gmi" | ||
| 25 | else | 36 | else |
| 26 | cp "$1/$file" "$destdir/$file" | 37 | cp "$1/$file" "$destdir/$file" |
| 38 | cp "$1/$file" "$destdir_gmi/$file" | ||
| 27 | fi | 39 | fi |
| 28 | fi | 40 | fi |
| 29 | done | 41 | done |
diff --git a/src/style.css b/src/style.css index 7016a47..d40758f 100644 --- a/src/style.css +++ b/src/style.css | |||
| @@ -2,6 +2,11 @@ header nav table { | |||
| 2 | width: 100%; | 2 | width: 100%; |
| 3 | } | 3 | } |
| 4 | 4 | ||
| 5 | .logo img { | ||
| 6 | max-width: 3em; | ||
| 7 | margin: 0 0 0 0; | ||
| 8 | } | ||
| 9 | |||
| 5 | .links { | 10 | .links { |
| 6 | text-align: right; | 11 | text-align: right; |
| 7 | font-weight: bold; | 12 | font-weight: bold; |
| @@ -15,27 +15,7 @@ | |||
| 15 | <tr> | 15 | <tr> |
| 16 | <td class="logo"> | 16 | <td class="logo"> |
| 17 | <a href="/"> | 17 | <a href="/"> |
| 18 | <svg width="50" height="50"> | 18 | <img src="/favicon.png" alt="Home" title="Home"> |
| 19 | <circle | ||
| 20 | cx="25" | ||
| 21 | cy="25" | ||
| 22 | r="24" | ||
| 23 | stroke = "black" | ||
| 24 | fill = "black" | ||
| 25 | /> | ||
| 26 | <text | ||
| 27 | x="50%" | ||
| 28 | y="50%" | ||
| 29 | text-anchor="middle" | ||
| 30 | dominant-baseline="middle" | ||
| 31 | font-family="monospace" | ||
| 32 | font-weight="bolder" | ||
| 33 | font-size="2.5em" | ||
| 34 | fill="white" | ||
| 35 | > | ||
| 36 | st | ||
| 37 | </text> | ||
| 38 | </svg> | ||
| 39 | </a> | 19 | </a> |
| 40 | </td> | 20 | </td> |
| 41 | <td class="links"> | 21 | <td class="links"> |
