Updated links to be optionall visible for registered users only
This commit is contained in:
parent
f90fdf2588
commit
286c08d231
3 changed files with 31 additions and 10 deletions
|
|
@ -47,9 +47,18 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"links":{
|
"links":{
|
||||||
"About": "/about",
|
"About": {
|
||||||
"Code": "https://git.ourfore.st/rainbownapkin/canopy",
|
"link": "/about",
|
||||||
"HRT": "/hrt"
|
"registeredOnly": false
|
||||||
|
},
|
||||||
|
"Code": {
|
||||||
|
"link": "https://git.ourfore.st/rainbownapkin/canopy",
|
||||||
|
"registeredOnly": false
|
||||||
|
},
|
||||||
|
"HRT": {
|
||||||
|
"link": "/hrt",
|
||||||
|
"registeredOnly": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"aboutText":"<a href=\"https://ourfore.st/\">ourfore.st</a> 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."
|
"aboutText":"<a href=\"https://ourfore.st/\">ourfore.st</a> 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."
|
||||||
}
|
}
|
||||||
|
|
@ -83,9 +83,18 @@
|
||||||
},
|
},
|
||||||
//Provides customizable links for navbar
|
//Provides customizable links for navbar
|
||||||
"links":{
|
"links":{
|
||||||
"About": "/about",
|
"About": {
|
||||||
"Code": "https://git.ourfore.st/rainbownapkin/canopy",
|
"link": "/about",
|
||||||
"HRT": "/hrt"
|
"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
|
//Fills the 'about ${instanceName}' section on the /about page, lets users know about your specific instance
|
||||||
"aboutText":"<a href=\"https://ourfore.st/\">ourfore.st</a> 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."
|
"aboutText":"<a href=\"https://ourfore.st/\">ourfore.st</a> 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."
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. %>
|
||||||
<p class="navbar-item" id="left-controls">
|
<p class="navbar-item" id="left-controls">
|
||||||
<span class="navbar-item-seperator first"> - </span>
|
<span class="navbar-item-seperator first"> - </span>
|
||||||
<a class="navbar-item first" href="javascript:">Channel Guide</a>
|
<a class="navbar-item first" href="javascript:">Channel Guide</a>
|
||||||
<% for(link of Object.keys(links)){ %>
|
<% for(link of Object.keys(links)){
|
||||||
|
const linkObj = links[link];
|
||||||
|
if(!linkObj.registeredOnly || user != null){ %>
|
||||||
-
|
-
|
||||||
<a target="_blank" class="navbar-item" href="<%- links[link] %>"><%= link %></a>
|
<a target="_blank" class="navbar-item" href="<%- links[link] %>"><%= link %></a>
|
||||||
<% } %>
|
<% }
|
||||||
|
} %>
|
||||||
</p>
|
</p>
|
||||||
</span>
|
</span>
|
||||||
<span class="navbar-item" id="right-navbar-cluster">
|
<span class="navbar-item" id="right-navbar-cluster">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue