From 286c08d231bc6e9da4798752f0832f7f0a99993d Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 7 Nov 2026 09:18:05 -0500 Subject: [PATCH] Updated links to be optionall visible for registered users only --- config.example.json | 15 ++++++++++++--- config.example.jsonc | 15 ++++++++++++--- src/views/partial/navbar.ejs | 11 +++++++---- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/config.example.json b/config.example.json index 71798f6..d9ae7fa 100644 --- a/config.example.json +++ b/config.example.json @@ -47,9 +47,18 @@ ] }, "links":{ - "About": "/about", - "Code": "https://git.ourfore.st/rainbownapkin/canopy", - "HRT": "/hrt" + "About": { + "link": "/about", + "registeredOnly": false + }, + "Code": { + "link": "https://git.ourfore.st/rainbownapkin/canopy", + "registeredOnly": false + }, + "HRT": { + "link": "/hrt", + "registeredOnly": true + } }, "aboutText":"ourfore.st is the one and only original canopy instance. Setup, ran, and administered by rainbownapkin herself. This site exists to provide a featureful, preformant, and comfy replacement for the TTN community." } \ No newline at end of file diff --git a/config.example.jsonc b/config.example.jsonc index aac767b..a9b8b4a 100644 --- a/config.example.jsonc +++ b/config.example.jsonc @@ -83,9 +83,18 @@ }, //Provides customizable links for navbar "links":{ - "About": "/about", - "Code": "https://git.ourfore.st/rainbownapkin/canopy", - "HRT": "/hrt" + "About": { + "link": "/about", + "registeredOnly": false + }, + "Code": { + "link": "https://git.ourfore.st/rainbownapkin/canopy", + "registeredOnly": false + }, + "HRT": { + "link": "/hrt", + "registeredOnly": true //Hides from un-registered users + } }, //Fills the 'about ${instanceName}' section on the /about page, lets users know about your specific instance "aboutText":"ourfore.st is the one and only original canopy instance. Setup, ran, and administered by rainbownapkin herself. This site exists to provide a featureful, preformant, and comfy replacement for the TTN community." diff --git a/src/views/partial/navbar.ejs b/src/views/partial/navbar.ejs index 696805b..21fabcf 100644 --- a/src/views/partial/navbar.ejs +++ b/src/views/partial/navbar.ejs @@ -20,10 +20,13 @@ along with this program. If not, see . %>