aboutsummaryrefslogtreecommitdiff
path: root/templates/base.qtpl
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-12 18:37:30 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-09-12 18:40:00 +0200
commitae10e121875982d6956d6bff453544cc59a75616 (patch)
tree9b6508c9b2a105ce3027bb24342916050e2f50cc /templates/base.qtpl
parentd33ba9ee675eedf47ce4a7977d116bf81dda5b2e (diff)
downloadlens-ae10e121875982d6956d6bff453544cc59a75616.tar.gz
lens-ae10e121875982d6956d6bff453544cc59a75616.tar.bz2
lens-ae10e121875982d6956d6bff453544cc59a75616.zip
feat: Add admin control
Now only admins can access settings.
Diffstat (limited to 'templates/base.qtpl')
-rw-r--r--templates/base.qtpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/base.qtpl b/templates/base.qtpl
index a80803a..30b084e 100644
--- a/templates/base.qtpl
+++ b/templates/base.qtpl
@@ -21,7 +21,7 @@ Page {
Page prints a page implementing Page interface.
-{% func PageTemplate(p Page) %}
+{% func PageTemplate(p Page, isAdmin bool) %}
<html lang="en">
<head>
<meta charset="utf-8">
@@ -33,18 +33,20 @@ Page prints a page implementing Page interface.
<body>
<nav class="navbar">
<div class="navbar-start">
- <a href="/fs/" class="navbar-item text-size-1">
+ <a href="/fs" class="navbar-item text-size-1">
file
</a>
- <a href="/media/" class="navbar-item text-size-1">
+ <a href="/media" class="navbar-item text-size-1">
media
</a>
- <a href="/album/" class="navbar-item text-size-1">
+ <a href="/album" class="navbar-item text-size-1">
album
</a>
- <a href="/settings/" class="navbar-item text-size-1">
+ {% if isAdmin %}
+ <a href="/settings" class="navbar-item text-size-1">
settings
</a>
+ {% endif %}
</div>
</nav>
<div class="container is-fullhd">