aboutsummaryrefslogtreecommitdiff
path: root/v2/src/lib
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-04 17:24:12 -0300
committerEuAndreh <eu@euandre.org>2023-04-04 17:24:12 -0300
commit419cd721024f5ebc364cdd9014222e0a48221ac7 (patch)
tree6de46c7c89853514f5b5be30a392bb7570767354 /v2/src/lib
parentv2: WIP genhtml via envsubst (diff)
downloadeuandre.org-419cd721024f5ebc364cdd9014222e0a48221ac7.tar.gz
euandre.org-419cd721024f5ebc364cdd9014222e0a48221ac7.tar.xz
v2/: HTML! Handle pages, multiple languages, and snippets
Diffstat (limited to 'v2/src/lib')
-rw-r--r--v2/src/lib/base-conf.in19
-rw-r--r--v2/src/lib/base.en.conf8
-rw-r--r--v2/src/lib/base.pt.conf8
-rw-r--r--v2/src/lib/comment.en.html8
-rw-r--r--v2/src/lib/comment.pt.html6
-rw-r--r--v2/src/lib/date.en.html3
-rw-r--r--v2/src/lib/date.pt.html3
-rw-r--r--v2/src/lib/postamble.html23
-rw-r--r--v2/src/lib/preamble.html6
-rw-r--r--v2/src/lib/update.en.html3
-rw-r--r--v2/src/lib/update.pt.html3
11 files changed, 50 insertions, 40 deletions
diff --git a/v2/src/lib/base-conf.in b/v2/src/lib/base-conf.in
index c065807..4ec09cb 100644
--- a/v2/src/lib/base-conf.in
+++ b/v2/src/lib/base-conf.in
@@ -1,9 +1,10 @@
-domain='@DOMAIN@'
-email='@EMAIL@'
-base_url=''
-list_addr='~euandreh/public-inbox@lists.sr.ht'
-mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20"
-discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search="
-sourcecode_url_prefix="https://$domain/git/$domain/tree/"
-author='EuAndreh'
-lang='en'
+export domain='@DOMAIN@'
+export email='@EMAIL@'
+export base_url=''
+export list_addr='~euandreh/public-inbox@lists.sr.ht'
+export mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20"
+export discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search="
+export sourcecode_url_prefix="https://$domain/git/$domain/tree/"
+export author='EuAndreh'
+export lang='en'
+export pubkey_id='81F90EC3CD356060' # FIXME
diff --git a/v2/src/lib/base.en.conf b/v2/src/lib/base.en.conf
index 6090d54..52aede3 100644
--- a/v2/src/lib/base.en.conf
+++ b/v2/src/lib/base.en.conf
@@ -1,7 +1,7 @@
-date_fmt='%B %-d, %Y'
+export date_fmt='%B %-d, %Y'
-site_name="EuAndreh's website"
+export site_name="EuAndreh's website"
-about='About'
+export about='About'
-about_url_name='about.html'
+export about_url_name='about.html'
diff --git a/v2/src/lib/base.pt.conf b/v2/src/lib/base.pt.conf
index 6090d54..52aede3 100644
--- a/v2/src/lib/base.pt.conf
+++ b/v2/src/lib/base.pt.conf
@@ -1,7 +1,7 @@
-date_fmt='%B %-d, %Y'
+export date_fmt='%B %-d, %Y'
-site_name="EuAndreh's website"
+export site_name="EuAndreh's website"
-about='About'
+export about='About'
-about_url_name='about.html'
+export about_url_name='about.html'
diff --git a/v2/src/lib/comment.en.html b/v2/src/lib/comment.en.html
new file mode 100644
index 0000000..6646b14
--- /dev/null
+++ b/v2/src/lib/comment.en.html
@@ -0,0 +1,8 @@
+ <hr />
+ <p class="post-footer">
+ <a href="$mailto_uri">Comment</a>
+ and see
+ <a href="$discussions_url">existing discussions</a>
+ |
+ <a href="$sourcecode_url">view source</a>
+ </p>
diff --git a/v2/src/lib/comment.pt.html b/v2/src/lib/comment.pt.html
new file mode 100644
index 0000000..c703847
--- /dev/null
+++ b/v2/src/lib/comment.pt.html
@@ -0,0 +1,6 @@
+ <hr />
+ <p class="post-footer">
+ <a href="$mailto_uri">Comment</a> and see <a
+href="$discussions_url">existing discussions</a> | <a
+href="$sourcecode_url">view source</a>
+ </p>
diff --git a/v2/src/lib/date.en.html b/v2/src/lib/date.en.html
new file mode 100644
index 0000000..0911bac
--- /dev/null
+++ b/v2/src/lib/date.en.html
@@ -0,0 +1,3 @@
+ <p class="timestamp">
+ Posted on <time datetime="$date">$formatted_date</time>
+ </p>
diff --git a/v2/src/lib/date.pt.html b/v2/src/lib/date.pt.html
new file mode 100644
index 0000000..0911bac
--- /dev/null
+++ b/v2/src/lib/date.pt.html
@@ -0,0 +1,3 @@
+ <p class="timestamp">
+ Posted on <time datetime="$date">$formatted_date</time>
+ </p>
diff --git a/v2/src/lib/postamble.html b/v2/src/lib/postamble.html
index ada5524..00dc1dc 100644
--- a/v2/src/lib/postamble.html
+++ b/v2/src/lib/postamble.html
@@ -1,31 +1,16 @@
-<p>
- <a href="@mailto_uri@">Comment</a>
- and see
- <a href="@discussions_url@">existing discussions</a>
- |
- <a href="@sourcecode_url@">view source</a>
-</p>
-
-
- <p class="post-footer">
- <a href="mailto:~euandreh/public-inbox@lists.sr.ht?Subject=Re%3A%20$URI_TITLE">Comment</a>
- and see
- <a href="https://lists.sr.ht/~euandreh/public-inbox?search=$URI_TITLE">existing discussions</a>
- |
- <a href="https://euandre.org/git/euandre.org/tree/$FILENAME">view source</a>
- </p>
+$comment_html
</article>
</main>
<footer>
<hr />
<ul>
<li>
- <img class="svg-icon" src="$(url-for 'static/envelope.svg')" alt="a envelope icon representing an email address" />
+ <img class="svg-icon" src="$icon_envelope_url" alt="a envelope icon representing an email address" />
<a href="mailto:$email">$email</a>
</li>
<li>
- <img class="svg-icon" src="$(url-for 'static/lock.svg')" alt="a lock icon representing a GPG public key" />
- <a href="$(url-for 'static/public.asc.txt')">81F90EC3CD356060</a>
+ <img class="svg-icon" src="$icon_lock_url" alt="a lock icon representing a GPG public key" />
+ <a href="$pubkey_url">$pubkey_id</a>
</li>
</ul>
<p>
diff --git a/v2/src/lib/preamble.html b/v2/src/lib/preamble.html
index 3eac6ea..6e0bd30 100644
--- a/v2/src/lib/preamble.html
+++ b/v2/src/lib/preamble.html
@@ -28,10 +28,8 @@
</header>
<main>
<article>
- dollar emit_body
<h1>
$title_html
</h1>
- <p class="timestamp">
- FIXME Posted on <time datetime="$date">$date_formatted</time>
- </p>
+$date_html
+$update_html
diff --git a/v2/src/lib/update.en.html b/v2/src/lib/update.en.html
new file mode 100644
index 0000000..99760cb
--- /dev/null
+++ b/v2/src/lib/update.en.html
@@ -0,0 +1,3 @@
+ <p class="timestamp">
+ Updated on <time datetime="$update">$formatted_update</time>
+ </p>
diff --git a/v2/src/lib/update.pt.html b/v2/src/lib/update.pt.html
new file mode 100644
index 0000000..99760cb
--- /dev/null
+++ b/v2/src/lib/update.pt.html
@@ -0,0 +1,3 @@
+ <p class="timestamp">
+ Updated on <time datetime="$update">$formatted_update</time>
+ </p>