Refactor sass for theming

This commit is contained in:
Cadence Ember
2020-05-09 21:34:00 +12:00
parent 710400c4f1
commit 23e2ffecbf
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,