aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views/index.rocker.html
blob: cc18d3bcc58e1f13ddd278444b1e37a18b30af34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@import space.anity.DatabaseController
@import space.anity.UserHandler
@args (String username)

@layout.template("Index", RockerContent.NONE, RockerContent.NONE) -> {
<div class="flex">
    <h1>Welcome to Kloud<span class="username">@(username == "" ? "" : " " + username)</span>!</h1>

    <div>
        @if(username.length() > 0) {
        <a class="button" href="/user/logout">Logout</a>
        @if((new UserHandler()).isAdmin(username)) {
        <a class="button" href="/admin">Admin</a>
        }
        } else if (!(new DatabaseController()).isSetup()) {
        <a class="button" href="/setup">Setup</a>
        } else {
        <a class="button" href="/user/login">Login</a>
        }

        <a class="button" href="/files/">Files</a>
    </div>
</div>
}