1
0

Remove ported Pug templates.

This commit is contained in:
Alexander Andreev 2024-06-27 03:54:00 +04:00
parent 203335ca3b
commit 949c077bb0
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34
9 changed files with 0 additions and 451 deletions

View File

@ -1,27 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content=description)
block append head
link(href='/assets/css/articles.css' rel='stylesheet')
link(rel='canonical' href='/stuff/article/'+canonical)
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
a(href='/guestbook') Guestbook
h1 Articles
block content
:go:func Article(title, description, body string, date time.Time, host, canonical string, r *http.Request)
article
header
h2= title
div.menu
a(href='/stuff#articles') Go back to articles list
- dctz := util.ToClientTimezone(date, r)
time(datetime=dctz.Format("2006-01-02")) #{dctz.Format("02 January 2006")}
| !{body}

View File

@ -1,25 +0,0 @@
doctype html
html(lang='en')
head
block head
title Arav's dwelling #{title}
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible' content='IE=edge')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
meta(name='theme-color' content='#cd2682')
block meta_description
link(rel='icon' href='/assets/img/favicon.svg' sizes='any' type='image/svg+xml')
link(rel='alternate' href='/rss.xml' type='application/rss+xml' title="Arav's dwelling")
link(href='/assets/css/main.css' rel='stylesheet')
body
header
svg#logo(viewBox='0 -25 216 40')
text.logo Arav's dwelling
text.under(y='11') Welcome to my sacred place, wanderer
nav
block nav
block content
footer
a(href='/rss.xml' title="Stay up to date on what's going on.") RSS feed
br
| © 2017—2024 Alexander "Arav" Andreev <#[a(href='mailto:me@arav.su') me@arav.su]> #[a(href='/privacy') Privacy statements]

View File

@ -1,28 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content=http.StatusText(code))
block append head
link(href='/assets/css/error.css' rel='stylesheet')
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
a(href='/guestbook') Guestbook
h1 #{http.StatusText(code)}
block content
:go:func ErrorXXX(title, reason, message, referer string, code int)
section#error
h1 #{code}
| #{http.StatusText(code)}
if reason != ""
p #{reason}
if message != ""
p #{message}
if referer != ""
section
h2 #[a(href=referer) Go back]

View File

@ -1,68 +0,0 @@
extends base.pug
mixin entryLine(line)
if (len(line) > 0 && line[0] == '>')
p.quote= line
else
p= line
block meta_description
meta(name='description' content="This is my guestbook. Welcome.")
block append head
link(href='/assets/css/guestbook.css' rel='stylesheet')
script(src='/assets/js/captcha_refresh.js' defer='')
link(rel='canonical' href='/guestbook')
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
h1 Guestbook
block content
:go:import "git.arav.su/Arav/justguestbook"
:go:func Guestbook(title, owner, captcha_id string, pages_count int64, entries []*justguestbook.Entry, r *http.Request)
form#new-post(action='/api/guestbook', method='POST')
input(type='text' maxlength='80' placeholder='Name (Anonymous if left blank)' name='name')
input(type='text' maxlength='255' placeholder='Website (optional)' name='website')
textarea(maxlength='4096' placeholder='Your message' name="message" required='')
span.checkboxes
input(type='checkbox' id='hide-website' name='hide_website' checked='')
label(for='hide-website') Hide website #[small (only I can see if set)]
br
small Use > to make a quote.
span.captcha
input(type='hidden' value=captcha_id name='captcha_id')
img(src='/api/captcha/'+captcha_id+'/image', alt="CAPTCHA" width='160' height='40')
input(type='text' maxlength='6' placeholder='CAPTCHA' name='captcha_answer' required='')
small Valid for #[b 10] minutes.
input(type='submit' value='Send a post')
section#posts
if (len(entries) > 0)
each entry in entries
article
header
- var created_tz = util.ToClientTimezone(entry.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
- var website = ""
if (!entry.HideWebsite)
- website = entry.Website
| ##{entry.ID} by #[span.highlighted #{entry.Name}] #[em #{website}] on #[time(datetime=created_tz) #{created_tz}]
each line in strings.Split(entry.Message, "\n")
+entryLine(line)
if (entry.Reply != nil)
.reply
header
- var reply_created_tz = util.ToClientTimezone(entry.Reply.Created, r).Format("Monday _2 January 2006 15:04:05 -07:00")
| Reply by #[span.highlighted #{owner}] on #[time(datetime=reply_created_tz) #{reply_created_tz}]
each line in strings.Split(entry.Reply.Message, "\n")
+entryLine(line)
else
p.center No posts.
if pages_count > 1
section#pagination
- var n int64 = 1;
while n <= pages_count
a(href='/guestbook?p='+fmt.Sprint(n))= n
- n += 1

View File

@ -1,67 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content="A homepage of a russian guy Alexander aka Arav. Not just homepage, but something more...")
block append head
link(href='assets/css/index.css' rel='stylesheet')
link(rel='canonical' href='/')
block nav
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
a(href='/guestbook') Guestbook
block content
:go:func Index(title string)
section#services
span
a(href='https://arav.su') arav.su
| .
a(href='http://moq7aejnf4xk5k2bkaltli3ftkhusy2mbrd3pj23nrca343ku2mgk4yd.onion') onion
| .
a(href='http://[300:a98d:d6d0:8a08::f]') ygg
| .
a(href='http://arav.i2p') i2p
sup #[a(href="http://arav.i2p/?i2paddresshelper=5Kl-DiWbbk6wf7m0v6zBSNHYq3sXlnrWLIWVeGdpPbPyc9CBS~zrzDYpP43rv1fRiIkbVCD5hTEpY6joQGlk-dFkWWD6201qa6ecsDVQMaE3Q7UTYICd0VEBRoqDUSrvsM-P2y5oG4Z-77RmoGKpbcRgNuMVbQ7AGJNqVSGej-lSyscDWTIZT5dCT505lfRwprdD~emZqkwnn22X16Wpj-X4A4ifph4idrThGioz4UW6PrCpa-oebMCo217s0Zyl9VKaU-o9cx5eFUEwnshoUjqwh7VE-S45NDz854J08xldCATM3wwTRVXhc2NUypsJLKFKiV0z3EXN-ApCdxsV60C-eiXUTX5vYcHHH~imA79v8WKFybjnsyUBst5BBEPQIUifTceLUrTmQ9TUpaMV90EsD5SCshmCfOs8R5y2dK6EfQu8iyYAB5VFSH4M1CLiBZUsDTEFiOomn2JGMDnbPho8lMB8ss4SMuwZShb2LlGqLxJ38kRHlvC68VmJO7InBQAEAAcAAA==" title="address helper") ah]
a(href='https://arav.neocities.org') arav.neocities.org
br
span
a(href='https://radio.arav.su') radio
| .
a(href='http://wsmkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion') onion
| .
a(href='http://[300:a98d:d6d0:8a08::e]') ygg
| .
a(href='http://radio.arav.i2p') i2p
sup #[a(href="http://radio.arav.i2p/?i2paddresshelper=NfCKBu9vjLFiBMEPQGiZT9AzGlhkKHzYrKM66FL-ESeDbnYUY--NzukO9UA28s3WThhDQVge2TmyfYsaZiUw~AjuLsykxS13pebs7lkAVY1jm77La-eFFIAQ22Vtd2YgS0vbhRMzuDxKkCR1vPwNax8R2o6a07xsQvvDml6UQxG4p5vt44JA2geQNvQfm8cEiSa6gNJZJSW3rWuLDg6~1Jy3D70oSVSlNfihmG4JtNV6tVBjJE2h5gUxfhYZACttpGTPM~UNF~lrSujlBQsCqdzvLswdMw~FnvpfGzJcJroeFTerRyH6oUkkDSOK7uWwl0e70vKxrIbFgJjKtjlLWlUCI5N0TnJP4Hzt2pttB~R0hSr2vVl8ky0yJEtN3rwnrJkw7q0ZIH30ngTfxsCTbolAzl6liN9Ez5YF97zDOPnVFmvQ6Eg1PyFdypQO1PiUHqF56SWhx3utGwecUS6jJCvsKIJJVEIMVcD6h7S0z1g1rqQ4jbg5UfXPwFEgFOlzBQAEAAcAAA==" title="address helper") ah]
span
a(href='https://files.arav.su') files
| .
a(href='http://qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion') onion
| .
a(href='http://[300:a98d:d6d0:8a08::d]') ygg
| .
a(href='http://files.arav.i2p') i2p
sup #[a(href="http://files.arav.i2p/?i2paddresshelper=48vtYgeVnju7B2FaR0zxUL3MQXN9QjK~Ggya45aANwm86mtpemuEkaskJmEQaFSd4FcDAFIiXHfNpfGqoupLwNmtgBmGRcuVV8xb2W~W6lM0oOhovjB37EUaMWs3AI5aIES84QOqApgwYX-ANIcwa~Kg6AbMuX8D8qnejuhBbuCffYah-TD8e~O0cnyqxzLTmxIGCyk2egdYXwanJyYFDocomIVfcqfJ0MgjIHhFQtkcb0e84bxvDzcAFIpEDrzAo4GVrFn-TCu0Lyf2ccqmVpucFl0UGhuVRxEt19KLd3PxlfwHv2lmzTZtq9CbnfaoPntUPx1sf84QnZDmrXWhVK8p3VvuPZMxjyz9KyhPjrGkO4E0oibDlvKuMsGEm-GkZsKxgXo~CrdcVtN8suAwW6rACAuk8gq2jUMBZBZ12migPZ7miHftEkOFHfgfUiKBwirrw~y9Zi261WX4-EVe2oD4pkhQOrqOKIoI-vv5z9CpQ7PKL531kgkipcBseXybBQAEAAcAAA==" title="address helper") ah]
span
a(href='https://upload.arav.su') upload
| .
a(href='http://4usftbmjpfexkr2x5xbp5ukmygpmg4fgrnx2wbifsexqctooz5hmviyd.onion') onion
| .
a(href='http://[300:a98d:d6d0:8a08::c]') ygg
| .
a(href='http://upload.arav.i2p') i2p
sup #[a(href="http://upload.arav.i2p/?i2paddresshelper=b5NWA2vNydWSv6~8KN4e~td2UVGkYsayKPa1PnXI87A3gsg6m978tIehHLVN4XcCfUq4aB-59hqqZicorRnHKfV3lVdx9mdhC8Bhj~bMAcwMgWoXidqZNrWMoFGzWotFsa3nWh4zsRUSfrokecC8u9Y06byfSS1siyak0J6xpsggXRqqgNF0-8ncPeqvzBxHB9NRDXWEVJGS9HSpydWl1UpjgZffcd~NZroxkSAfughHcFAn2OLKkaZRe6WqCJQfJoXTCyz4wkFmYbH1CSddWlddmWaaU7icsbQrZm3XEqKTVKvm86G6ehxmzyHqCumc4GOWswcP0E51UQVOv-WA8R6SWQAj6ZnZhnCoCNFFEfW2lBiDmTnLJbfm-C-AdI6G1~dQ1~3FCH6wXWy-2DebpyoVVt9epzU7l4l2MVeaOUahbf6wcol1UbxPoR0XlGCXDe9700TYePjtpOU9vNkk2B1dQiZ1usgwseYuO26cRogSvbi8poz4BlCNO733HR1XBQAEAAcAAA==" title="address helper") ah ]
span
a(href='https://git.arav.su') git
| .
a(href='http://qqitm7qlsbbubwmjos4cqzmvkqidg34rfnbyhuydhalep33fbvh22xyd.onion') onion
| .
a(href='http://[300:a98d:d6d0:8a08::b]') ygg
| .
a(href='http://git.arav.i2p') i2p
sup #[a(href="http://git.arav.i2p/?i2paddresshelper=eFIfcBUv3lHFSnglHfncs5XXtYwm9gCpmAYuio~9CeENBAXKRggPiY1tQC-otCon2hCSpr56WlVBeZk1txKuUnbjHTN7GBFaKW5wJEO2WmKEWPKdcjUDOYZN0D3TwXaYfiBuELD3200lBfDmPEJ01iC2o7B5yvpOqtEKDcaqkIp4vafDuPPumJ~XiCGdUAe~vr52w3Tbuz5x7wbltk-gUELY0-ZAQBos4jOJ6QT1W1lhycHPhAK8qslgwfk94opyIl2pkRyuJhU-2VHc6Fsd621VXC86YAMT1SIfTZlFpoGVCFXDM~BXaLvygFaKf62qardAe0T48Ax6GxosAKXe-yLCVRaiD3KErULfwZXl23kQzRfxM4odG4DWeXawtuvypOmTjHT1skQHU0h52ujye5nT~2bOy14HkCoCnxJ7gSj3MjkmWLd1JhBsPH4ymRmI7jFJR1GYl8Wp5IigMBBzWfJUEEjS7QDHaRo5TCZJ9SXz6sgkGdfh74~r8FWL559gBQAEAAcAAA==" title="address helper") ah]
section
p Welcome, Anon. I'm Alexander aka Arav, I self-host some services for myself, friends and you. Not much I have to offer, but maybe you'll find something useful for yourself. :)

View File

@ -1,46 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content="Updates on my infrastructure, my very important opinions and thoughts.")
block append head
link(href='/assets/css/mindflow.css' rel='stylesheet')
script(src='/assets/js/mindflow.js' defer='')
link(rel='canonical' href='/mindflow')
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/about') About
a(href='/guestbook') Guestbook
h1 Mindflow
block content
:go:func Mindflow(title string, posts []mindflow.Post, categories []mindflow.Category, r *http.Request)
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#filter.hidden
p.center
button(name='all') All
each category in categories
button(name=strings.ToLower(category.Name)) #{category.Name}
section
if (len(posts) > 0)
each post in posts
article(id=`${post.PostID()}`)
header
a(href=`#${post.PostID()}`)
h3= post.Category.Name + ": " + post.Title
each line in strings.Split(post.Body, "\n")
if (len(line) > 0 && line[0] == '>')
p.quote!= line
else
p!= line
footer
if (post.URL != "")
a(href=post.PostURL(r.Host, false)) #{post.PostURL(r.Host, false)}
else
span
time(datetime=util.ToClientTimezone(post.Date, r))= util.ToClientTimezone(post.Date, r).Format(time.RFC1123)
else
p.center Nothing? There must be some... Looks like database went down.

View File

@ -1,34 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content="Privacy statements for all of my services.")
block append head
link(rel='canonical' href='/privacy')
block nav
a(href='/') Home
a(href='/stuff') Stuff
a(href='/mindflow') Mindflow
a(href='/about') About
a(href='/guestbook') Guestbook
block content
:go:func Privacy(title, radioSrvc, filesSrvc, uploadSrvc string)
section#privacy
h2 Privacy statements
h3 General data
p Across all of my Web-services following data is being collected: date of access, IP-address, User-Agent, referer URL, request URL.
h3 Use of JavaScript
p JS is used on a #[a(href='/') main website] at a guestbook page to refresh CAPTCHA; at mindflow page to filter posts by categories.
p #[a(href=radioSrvc) Radio service] uses JS to update Last N songs list section, and to get current radio statistics.
p #[a(href=filesSrvc) Files service] uses JS to add functionality such as an overlay to view files without the need to leave a site, and implements some keyboard control for convenience.
h3 Upload service specific
p Every action (upload, download, and delete) is being logged and includes this additional data:
ol
li File's name it was uploaded/downloaded with;
li Unsalted SHA-256 hash of a file;
li A salted hash encoded as base64 in raw URL variant that is used to download/delete a file;
li File's size.
p And I will cooperate with law enforcements and provide them with all information (logs and a file itself if it is still present).
p As already stated at #[a(href=uploadSrvc) Upload service]'s page, file's content must comply with law of Russian Federation. Anything like extremist materials, CP, and so on is forbidden.

View File

@ -1,23 +0,0 @@
:go:func RSS(host, author string, posts []mindflow.Post, r *http.Request)
doctype xml
rss(version='2.0')
channel
title Arav's dwelling
description Updates on my websites and infrastructure.
language en-gb
| <link>#{host}</link>
each post in posts
item
title= post.Title
category= post.Category.Name
guid!= `${post.PostID()}`
pubDate= util.ToClientTimezone(post.Date, r).Format(time.RFC1123Z)
| <link>#{post.PostURL(r.Host, true)}</link>
author!= author
description
| <![CDATA[
each line in strings.Split(post.Body, "\n")
p!= line
| ]]>

View File

@ -1,133 +0,0 @@
extends base.pug
block meta_description
meta(name='description' content="Here I share my programs, scripts, articles, may be other stuff.")
block append head
link(rel='canonical' href='/stuff')
block nav
a(href='/') Home
a(href='/mindflow') Mindflow
a(href='/about') About
a(href='/guestbook') Guestbook
h1 Stuff
block content
:go:func Stuff(title, git_site, files_site string, metadata []ArticleMetadata)
p.center Here lies everything I've made that I'm willing to share.
section#articles
h2 Articles
table
tr
th Last Update
th Article
each entry in metadata
tr
td
time(datetime=entry.Date.Format("2006-01-02")) #{entry.Date.Format("02 January 2006")}
td
a(href=entry.URL) #{entry.Title}
section#programs-scripts
h2 Programs and scripts
table
tr
td mccl
td 0.1.2 (14 December 2023)
td Go
td GPLv3
td
a(href=git_site+'/Arav/mccl') source
a(href=git_site+'/Arav/mccl/releases') releases
tr
td(colspan='5')
p A console Minecraft launcher. Take a look at README.md for explanation.
tr
td httpr
td 0.3.2 (20 September 2023)
td Go
td MIT
td
a(href=git_site+'/Arav/httpr') source
a(href=git_site+'/Arav/httpr/releases') releases
tr
td(colspan='5')
p A simple HTTP router that supports having both regular and parametrised path's parts at the same level, like #[code /assets/*filepath] and #[code /:a/:b] with the same HTTP method.
p Yeah, not as efficient as httprouter is, but in my case no performance loose was noticed (on a small amount of paths). Yet I gained prettiness because it allowed me, for example, to ditch #[code /f/] part and leave just #[code /:hash/:name] instead of #[code /f/:hash/:name] in a dwelling-upload service.
tr
td justguestbook
td 1.3.2 (22 May 2023)
td Go
td MIT
td
a(href=git_site+'/Arav/justguestbook') source
tr
td(colspan='5')
p A simple guestbook with owner's replies implementation made into a library.
tr
td justcaptcha
td 2.1.0 (12 August 2023)
td Go
td MIT
td
a(href=git_site+'/Arav/justcaptcha') source
tr
td(colspan='5')
p A simple CAPTCHA implementation.
tr
td kwh-cost
td 1.1.1 (23 September 2023)
td C
td MIT+NIGGER
td
a(href=git_site+'/Arav/kwh-cost') source
tr
td(colspan='5')
p KWh cost calculator in C.
tr
td httpprocprobed
td 3.1.0 (16 December 2023)
td Go
td MIT+NIGGER
td
a(href=git_site+'/Arav/httpprocprobed') source
tr
td(colspan='5')
p It returns a list of processes and if they are running in a JSON, XML or plain text format via HTTP GET request on /processes endpoint. Under the hood it searches a /proc/ directory. It is being used on about page to show wether service's running or not.
tr
td ScrapTheChan
td 0.5.0 (3 May 2021)
td Python
td MIT
td
a(href=git_site+'/Arav/ScrapTheChan') source
|
a(href=git_site+'/Arav/ScrapTheChan/releases') releases
tr
td(colspan='5')
p Imageboards file scraper using theirs JSON API. Currently supported: 4chan.org, lainchan.org, 2ch.hk and 8kun.top.
tr
td OpenNIC active domains extraction script
td 10 July 2020
td Bash
td MIT
td
a(href=git_site+'/Arav/opennic-extract-domains') source
tr
td(colspan='5')
p Bash script for BIND9 that extracts domains from zone files of OpenNIC and forms a list of domains that have an IP-address.
tr
td PiggyBank
td 1.0.0 (8 July 2020)
td Python
td MIT
td
a(href=git_site+'/Arav/PiggyBank') source
|
a(href=git_site+'/Arav/PiggyBank/releases') releases
tr
td(colspan='5')
p A program to help you to keep track of your piggy bank. A simple script I once wrote that I rewrote and made into a package just to learn how to do it.
section#music
h2 Music
p There was a period in my life when I was playing with audio sequencers. I lost all project files and only 3 tracks survived in mp3 that #[a(href=files_site+"/music/My%20tracks,%20that%20survived/") you can get here].