aboutsummaryrefslogtreecommitdiff
path: root/v2/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'v2/src/lib')
-rw-r--r--v2/src/lib/base.conf1
-rw-r--r--v2/src/lib/base.en.conf26
-rw-r--r--v2/src/lib/base.pt.conf26
-rwxr-xr-xv2/src/lib/category-header.html6
-rw-r--r--v2/src/lib/category.html3
-rw-r--r--v2/src/lib/entry.html5
-rw-r--r--v2/src/lib/entry.xml4
-rw-r--r--v2/src/lib/feed.xml8
-rwxr-xr-xv2/src/lib/index-postamble.html8
-rwxr-xr-xv2/src/lib/index-preamble.html7
-rw-r--r--v2/src/lib/postamble.html10
-rw-r--r--v2/src/lib/preamble.html6
12 files changed, 97 insertions, 13 deletions
diff --git a/v2/src/lib/base.conf b/v2/src/lib/base.conf
index 319d08c..72f70b9 100644
--- a/v2/src/lib/base.conf
+++ b/v2/src/lib/base.conf
@@ -6,4 +6,3 @@ 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 pubkey_id='81F90EC3CD356060' # FIXME
diff --git a/v2/src/lib/base.en.conf b/v2/src/lib/base.en.conf
index 52aede3..5ced00a 100644
--- a/v2/src/lib/base.en.conf
+++ b/v2/src/lib/base.en.conf
@@ -2,6 +2,32 @@ export date_fmt='%B %-d, %Y'
export site_name="EuAndreh's website"
+export lang='en'
+
+export index_pastebins_title='Pastebins'
+
+export index_recent_pastebins_title='Pastebins listing'
+
+export index_category_pastebins_title='Pastebins by category'
+
+export index by_category_url_part='by-category.html'
+
+export feed_pastebins_title="EuAndreh's pastebins"
+
+export index_tils_title='TIL'
+
+export index_recent_tils_title='TIL listing'
+
+export index_category_tils_title='TIL by category'
+
+export feed_tils_title="EuAndreh's TIL"
+
export about='About'
export about_url_name='about.html'
+
+export homepage_url="$(url-for "$lang/")"
+
+export homepage_url_absolute="$(absolute "$homepage_url")"
+
+export about_url="$(url-for "$lang/$about_url_name")"
diff --git a/v2/src/lib/base.pt.conf b/v2/src/lib/base.pt.conf
index 52aede3..fe03f42 100644
--- a/v2/src/lib/base.pt.conf
+++ b/v2/src/lib/base.pt.conf
@@ -2,6 +2,32 @@ export date_fmt='%B %-d, %Y'
export site_name="EuAndreh's website"
+export lang='pt'
+
+export index_pastebins_title='Pastebins'
+
+export index_recent_pastebins_title='Pastebins listing'
+
+export index_category_pastebins_title='Pastebins by category'
+
+export index by_category_url_part='by-category.html'
+
+export feed_pastebins_title="EuAndreh's pastebins"
+
+export index_tils_title='TIL'
+
+export index_recent_tils_title='TIL listing'
+
+export index_category_tils_title='TIL by category'
+
+export feed_tils_title="EuAndreh's TIL"
+
export about='About'
export about_url_name='about.html'
+
+export homepage_url="$(url-for "$lang/")"
+
+export homepage_url_absolute="$(absolute "$homepage_url")"
+
+export about_url="$(url-for "$lang/$about_url_name")"
diff --git a/v2/src/lib/category-header.html b/v2/src/lib/category-header.html
new file mode 100755
index 0000000..a69b198
--- /dev/null
+++ b/v2/src/lib/category-header.html
@@ -0,0 +1,6 @@
+ <h2 id="$category">
+ <a href="#$category">$index_recent_title_html</a>
+ <a href="$feed_url">
+ <img class="simple-icon" src="$icon_atom_url" alt="$icon_atom_alt" />
+ </a>
+ </h2>
diff --git a/v2/src/lib/category.html b/v2/src/lib/category.html
new file mode 100644
index 0000000..172829b
--- /dev/null
+++ b/v2/src/lib/category.html
@@ -0,0 +1,3 @@
+ <li>
+ <a href="$url">$title_html</a> - $formatted_date_html
+ </li>
diff --git a/v2/src/lib/entry.html b/v2/src/lib/entry.html
new file mode 100644
index 0000000..cbab9c0
--- /dev/null
+++ b/v2/src/lib/entry.html
@@ -0,0 +1,5 @@
+ <li>
+ $formatted_date_html
+ <br />
+ <a href="$url">$title_html</a>
+ </li>
diff --git a/v2/src/lib/entry.xml b/v2/src/lib/entry.xml
index e4a47c7..b43b238 100644
--- a/v2/src/lib/entry.xml
+++ b/v2/src/lib/entry.xml
@@ -2,13 +2,13 @@
<title type="html">
$title_html
</title>
- <link type="text/html" rel="alternative" href="$url" title="$title_html" />
+ <link type="text/html" rel="alternative" href="$url_absolute" title="$title_html" />
<published>
$date_iso
</published>
$update_xml
<id>
- $url
+ $url_absolute
</id>
<author>
<name>
diff --git a/v2/src/lib/feed.xml b/v2/src/lib/feed.xml
index 6fd82a4..8e70e98 100644
--- a/v2/src/lib/feed.xml
+++ b/v2/src/lib/feed.xml
@@ -2,11 +2,11 @@
xmlns="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xml:lang="$lang">
- <link href="$url" rel="self" type="application/atom+xml" />
- <link href="$homepage_url" rel="alternate" type="text/html" hreflang="$lang" />
+ <link href="$url_absolute" rel="self" type="application/atom+xml" />
+ <link href="$collection_url_absolute" rel="alternate" type="text/html" hreflang="$lang" />
<title>$site_name_html</title>
- <subtitle>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</subtitle>
- <id>$url</id>
+ <subtitle>$feed_title_html</subtitle>
+ <id>$url_absolute</id>
<updated>$now</updated>
<author>
diff --git a/v2/src/lib/index-postamble.html b/v2/src/lib/index-postamble.html
new file mode 100755
index 0000000..92ebbf2
--- /dev/null
+++ b/v2/src/lib/index-postamble.html
@@ -0,0 +1,8 @@
+ </ul>
+
+ <h2>
+ <a href="$by_category_url">
+ $index_category_title_html
+ <img class="simple-icon" src="$icon_linkto_url" alt="$icon_linkto_alt" />
+ </a>
+ </h2>
diff --git a/v2/src/lib/index-preamble.html b/v2/src/lib/index-preamble.html
new file mode 100755
index 0000000..2c17031
--- /dev/null
+++ b/v2/src/lib/index-preamble.html
@@ -0,0 +1,7 @@
+ <h2>
+ $index_recent_title_html
+ <a href="$feed_url">
+ <img class="simple-icon" src="$icon_atom_url" alt="$icon_atom_alt" />
+ </a>
+ </h2>
+ <ul class="no-style">
diff --git a/v2/src/lib/postamble.html b/v2/src/lib/postamble.html
index 00dc1dc..e55666d 100644
--- a/v2/src/lib/postamble.html
+++ b/v2/src/lib/postamble.html
@@ -5,16 +5,20 @@ $comment_html
<hr />
<ul>
<li>
- <img class="svg-icon" src="$icon_envelope_url" alt="a envelope icon representing an email address" />
+ <img class="svg-icon" src="$icon_envelope_url" alt="$icon_envelope_alt" />
<a href="mailto:$email">$email</a>
</li>
<li>
- <img class="svg-icon" src="$icon_lock_url" alt="a lock icon representing a GPG public key" />
+ <img class="svg-icon" src="$icon_lock_url" alt="$icon_lock_alt" />
<a href="$pubkey_url">$pubkey_id</a>
</li>
</ul>
<p>
- The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. The <a href="https://euandre.org/git/euandre.org">code</a> is <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>. Patches welcome.
+ The content for this site is licensed under
+ <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.
+ The <a href="https://euandre.org/git/euandre.org">code</a> is
+ <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>.
+ Patches welcome.
</p>
</footer>
</body>
diff --git a/v2/src/lib/preamble.html b/v2/src/lib/preamble.html
index 6e0bd30..fc19961 100644
--- a/v2/src/lib/preamble.html
+++ b/v2/src/lib/preamble.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="$style_url" />
- <link rel="icon" type="image/svg+xml" href="$favicon_url" />
+ <link rel="icon" type="image/svg+xml" href="$icon_favicon_url" />
<title>$title_html</title>
@@ -13,8 +13,8 @@
<meta property="og:locale" content="$lang" />
<meta property="og:title" content="$title_html" />
- <link rel="canonical" href="$url" />
- <meta property="og:url" content="$url" />
+ <link rel="canonical" href="$url_absolute" />
+ <meta property="og:url" content="$url_absolute" />
</head>
<body>
<header>