diff options
Diffstat (limited to 'src/main/resources/views/index.rocker.html')
-rw-r--r-- | src/main/resources/views/index.rocker.html | 8 |
1 files changed, 7 insertions, 1 deletions
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> |