summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/html12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/html b/bin/html
index 91d59d2..14adba3 100644
--- a/bin/html
+++ b/bin/html
@@ -146,6 +146,18 @@ def lhref(sec, s, l):
return '<a href="/{}/{}/{}">{}</a>'.format(sec, s, l, l)
+def langhtml(sec, s, lng, lngs):
+ lsh = []
+
+ for l in lngs:
+ if (l == 'en' and lng is None) or (l == lng):
+ lsh.append(l)
+ else:
+ lsh.append(lhref(sec, s, l))
+
+ return template('lang').replace(PH['lang'], ' | '.join(lsh), 1)
+
+
def html(sec, f):
c = read(f.path)
s, l = slug(f.path)