summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-06-13 00:12:02 +0100
committerdavidovski <david@davidovski.xyz>2023-06-13 00:12:02 +0100
commit045ab662bb15d9a13d4d58ef609f643b9ae0889d (patch)
treeecf6a75bb9c9aa530bf5e7cca909c9b8894fd690 /index.html
parent7acbb084388e3b7d13f37b65e0b5cf2756d6cf26 (diff)
use shblg to generate a static site from this repo
Diffstat (limited to 'index.html')
-rwxr-xr-xindex.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/index.html b/index.html
new file mode 100755
index 0000000..080a484
--- /dev/null
+++ b/index.html
@@ -0,0 +1,43 @@
+#!./page.sh
+
+cat << EOF
+<div class="grid">
+ <div class="about">
+
+ <p>Hi, I'm david and this is my website.</p>
+
+ <p>if you want to contact me, you can message me on matrix <code>@ix:davidovski.xyz</code>.</p>
+ </div>
+
+ <div class="image">
+ <img src="/images/remotecontrol.gif">
+ </div>
+</div>
+
+EOF
+
+cat << EOF
+ <div>
+ <h2>blog posts</h2>
+
+ <ul>
+EOF
+# list all the files in the directory
+for file in entries/*.html; do
+ title="$(grep '^# ' $file)"
+ title=${title#\# }
+
+ printf "
+<li class=\"entry\">
+<a href=\"%s\">
+ <div class=\"small\">%s</div>
+ <span>%s</span>
+</a>
+</li>
+" "${file%.*}.html" "$(stat -c %z "$file")" "$title"
+ done
+
+cat << EOF
+ </ul>
+ </div>
+EOF