Fixed a clusterfuck with links. Added set of links to Git service. And made them dynamic on stuff page.

This commit is contained in:
Alexander Andreev 2021-11-28 03:41:13 +04:00
parent 447dd15e06
commit 0c12bf47d6
Signed by: Arav
GPG Key ID: 610DF2574456329F
4 changed files with 14 additions and 12 deletions

View File

@ -52,8 +52,7 @@ function setRoutes() {
ctx.type = 'xml';
await ctx.render('rss', {
doctype: 'xml',
protocol: ctx.protocol,
host: ctx.header.host,
schemahost: `${ctx.header.schema}://${ctx.header.host}`,
author: "me@arav.top (Alexander \"Arav\" Andreev)",
items: await mindflow.getPostsForRSS()
})
@ -61,7 +60,8 @@ function setRoutes() {
.get('/stuff', async ctx => {
await ctx.render('stuff', {
title: "/ Stuff",
description: "Here I share my programs, scripts, articles, may be other stuff."
description: "Here I share my programs, scripts, articles, may be other stuff.",
git_site: util.getServiceByHost(ctx.request.host, "git")
})
})
.get('/mindflow', async ctx => {

View File

@ -5,7 +5,7 @@ rss(version='2.0')
title Arav's dwelling
description Updates on my websites and infrastructure.
language en-gb
link #{protocol}://#{host}/
link= schemahost
each item in items
item

View File

@ -44,7 +44,7 @@ block content
td Go
td GPLv3
td
a(href='http://git.arav.top/Arav/httpprocwatchd') source
a(href=git_site+'/Arav/httpprocwatchd') source
tr
td(colspan='5')
p It is a process watcher that gives processes' statuses in a JSON format via HTTP GET request on /processes endpoint. Under the hood it calls a pgrep to get PIDs by process name. It is being used on about page to show wether service's running or not.
@ -54,9 +54,9 @@ block content
td Python
td MIT
td
a(href='http://git.arav.top/Arav/PiggyBank') source
a(href=git_site+'/Arav/PiggyBank') source
|
a(href='http://git.arav.top/Arav/PiggyBank/releases') releases
a(href=git_site+'/Arav/PiggyBank/releases') releases
tr
td(colspan='5')
p One of the most autistic shit I ever made. :)
@ -68,9 +68,9 @@ block content
td Python
td MIT
td
a(href='http://git.arav.top/Arav/ScrapTheChan') source
a(href=git_site+'/Arav/ScrapTheChan') source
|
a(href='http://git.arav.top/Arav/ScrapTheChan/releases') releases
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.
@ -80,11 +80,10 @@ block content
td Bash
td MIT
td
a(href='http://git.arav.top/Arav/opennic-extract-domains') source
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.
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. #[a(href=files_site+"/music/My%20tracks,%20that%20survived/") You can get them here]. I've maybe like 15-20-ish project files ever created and just like 5 of them was finished.
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. #[a(href=files_site+"/music/My%20tracks,%20that%20survived/") You can get them here]. I've maybe like 15-20-ish project files ever created and just like 5 of them was finished.

View File

@ -25,18 +25,21 @@ exports.getServiceByHost = (host, service="") => {
switch (service) {
case "radio": return "http://wsmkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion";
case "files": return "http://qf5e43nlhvnrutmikuvbdfj3cmtthokpbaxtkm6mjlslttzvtgm4fxid.onion";
case "git": return "http://qqitm7qlsbbubwmjos4cqzmvkqidg34rfnbyhuydhalep33fbvh22xyd.onion";
default: return "http://moq7aejnf4xk5k2bkaltli3ftkhusy2mbrd3pj23nrca343ku2mgk4yd.onion";
}
else if (host.endsWith("i2p"))
switch (service) {
case "radio": return "http://radio.arav.i2p";
case "files": return "http://files.arav.i2p";
case "git": return "http://git.arav.i2p";
default: return "http://arav.i2p";
}
else
switch (service) {
case "radio": return "https://radio.arav.top";
case "files": return "https://files.arav.top";
case "git": return "https://git.arav.top";
default: return "https://arav.top";
}
}