summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/html14
-rw-r--r--scss/style.scss16
-rw-r--r--templates/html/article.html1
3 files changed, 28 insertions, 3 deletions
diff --git a/bin/html b/bin/html
index a317359..694a267 100644
--- a/bin/html
+++ b/bin/html
@@ -18,6 +18,7 @@ SECTIONS = ['news']
# placeholders
PH = {
'title': '<!-- ITEM-TITLE -->',
+ 'author': '<!-- AUTHOR -->',
'date': '<!-- DATE -->',
'content': '<!-- MAIN-CONTENT -->',
}
@@ -84,6 +85,15 @@ def title(c):
return m.group(1)
+def author(c):
+ m = re.search(r'<!-- author: ([\w ]+) -->', c)
+
+ if not m:
+ return ''
+
+ return 'By ' + m.group(1)
+
+
def date(c):
m = re.search(r'pubdate: ([0-9]{8})', c)
@@ -128,6 +138,7 @@ def html(sec, f):
s = slug(f.path)
t = title(c)
+ a = author(c)
d = date(c)
c = content(c)
@@ -136,6 +147,9 @@ def html(sec, f):
h = h.replace(PH['date'], datefmt(d), 1)
h = h.replace(PH['content'], markdown(c), 1)
+ if author:
+ h = h.replace(PH['author'], a, 1)
+
return s, h
diff --git a/scss/style.scss b/scss/style.scss
index 3483c85..207ac5d 100644
--- a/scss/style.scss
+++ b/scss/style.scss
@@ -104,9 +104,19 @@
.meta {
margin-bottom: 0.9em;
text-transform: uppercase;
- font-size: 0.9em;
- border-left: 1px solid $fsfi-lbrown;
- padding-left: 10px;
+ font-size: 0.8em;
+
+ .author {
+ display: inline-block;
+ padding-right: 10px;
+ }
+
+ .date {
+ display: inline-block;
+ border-left: 1px solid $fsfi-lbrown;
+ padding-left: 10px;
+ }
+
}
.header h1 {
diff --git a/templates/html/article.html b/templates/html/article.html
index 2a14be4..28d9b73 100644
--- a/templates/html/article.html
+++ b/templates/html/article.html
@@ -20,6 +20,7 @@
</div>
<div class="meta">
+ <div class="author"><!-- AUTHOR --></div>
<div class="date"><!-- DATE --></div>
</div>