1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-02 02:41:34 +00:00

Refactor sass for theming

This commit is contained in:
Cadence Ember 2020-05-09 21:34:00 +12:00
parent 710400c4f1
commit 23e2ffecbf
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
14 changed files with 226 additions and 128 deletions

View file

@ -12,8 +12,10 @@ function getPageTitle(post) {
module.exports = [
{
route: "/", methods: ["GET"], code: async () => {
route: "/", methods: ["GET"], code: async ({req}) => {
const settings = getSettings(req)
return render(200, "pug/home.pug", {
settings,
rssEnabled: constants.feeds.enabled,
allUnblocked: history.testNoneBlocked(),
torAvailable: switcher.canUseTor(),
@ -22,9 +24,11 @@ module.exports = [
}
},
{
route: "/privacy", methods: ["GET"], code: async () => {
route: "/privacy", methods: ["GET"], code: async ({req}) => {
if (constants.has_privacy_policy && pugCache.has("pug/privacy.pug")) {
return render(200, "pug/privacy.pug")
const settings = getSettings(req)
return render(200, "pug/privacy.pug", {settings})
} else {
return render(404, "pug/friendlyerror.pug", {
statusCode: 404,