aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/resources/css/layout.css4
-rw-r--r--src/main/resources/views/index.rocker.html8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main/resources/css/layout.css b/src/main/resources/css/layout.css
index f016c76..b319e24 100644
--- a/src/main/resources/css/layout.css
+++ b/src/main/resources/css/layout.css
@@ -44,7 +44,7 @@ button {
border-radius: 10px;
}
-.flex .button {
+.flex .button, .switch {
text-decoration: none;
background-color: #424242;
padding: 5px;
@@ -53,7 +53,7 @@ button {
color: #fff;
}
-.flex .button:visited {
+.flex .button:visited, .switch {
color: #fff;
}
diff --git a/src/main/resources/views/index.rocker.html b/src/main/resources/views/index.rocker.html
index 2e1b9dd..ee681f8 100644
--- a/src/main/resources/views/index.rocker.html
+++ b/src/main/resources/views/index.rocker.html
@@ -14,7 +14,13 @@
@layout.template("Index", ctx, css, js) -> {
<div class="flex">
@if (username.length() > 0) {
- <button class="toggle" id="toggle">Dark theme</button>
+ <button class="toggle" id="toggle">
+ @if((new DatabaseController()).isDarkTheme((new UserHandler()).getVerifiedUserId(ctx))) {
+ Light theme
+ } else {
+ Dark theme
+ }
+ </button>
}
<h1>Welcome to Kloud<span class="username">@(username == "" ? "" : " " + username)</span>!</h1>