From a1902abbd41e3df6a2c8fa5aa34af2240555ff24 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 21 Jan 2022 20:58:13 +0400 Subject: [PATCH] Now there is single section with all posts. Type of post added as a prefix "CategoryName:" to the title of post. --- homepage/views/mindflow.pug | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/homepage/views/mindflow.pug b/homepage/views/mindflow.pug index 62cddb9..8d74141 100644 --- a/homepage/views/mindflow.pug +++ b/homepage/views/mindflow.pug @@ -12,35 +12,18 @@ block nav h1 Mindflow block content - p.center Here I post updates on websites and infrastructure, my very important opinions and thoughts. If you'd like to subscribe to this bullshittery then #[a(href="rss.xml") RSS feed] at your service. :) - - p #[a(href='#diary') Go to Diary] + p.center Here I post updates on websites and infrastructure, my very important opinions and thoughts no one asked for. If you'd like to subscribe to this bullshittery then #[a(href="rss.xml") RSS feed] at your service. :) section - h2#updates Updates - if (updates) - each update in updates - article(id='update-'+mindflowDateToId(update.date, tz)) + if (posts) + each post in posts + article(id=`${post.category.toLowerCase()}-${date_id(post.date, tz)}`) header - a(href='#update-'+mindflowDateToId(update.date, tz)) - h3= update.title - each line in update.body.split('\n') + a(href=`#${post.category.toLowerCase()}-${date_id(post.date, tz)}`) + h3= `${post.category}: ${post.title}` + each line in post.body.split('\n') p!= line footer - time(datetime=update.date)= date_(update.date, tz) + time(datetime=post.date)= date_(post.date, tz) else - p.center No updates? There must be some... Looks like database is offline. - section - h2#diary Diary - if (diary) - each entry in diary - article(id='diary-'+mindflowDateToId(entry.date, tz)) - header - a(href='#diary-'+mindflowDateToId(entry.date, tz)) - h3= entry.title - each line in entry.body.split('\n') - p!= line - footer - time(datetime=entry.date)= date_(entry.date, tz) - else - p.center No records? Well, that's definitely something's wrong happened to the database. :( + p.center Nothing? There must be some... Looks like database went down.