aboutsummaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorLarsVomMars2020-07-30 20:16:54 +0200
committerLarsVomMars2020-07-30 20:16:54 +0200
commitf02c4054984fb8c12bfa4af9560a5b2be38810c0 (patch)
treed4519a92b739640e061847831d221e3e2488a83c /src/views
parent86c68c3648c94ca9f66f3eb408973368bed28681 (diff)
Added views and server setup
Diffstat (limited to 'src/views')
-rw-r--r--src/views/admin.ejs32
-rw-r--r--src/views/index.ejs18
-rw-r--r--src/views/login.ejs24
3 files changed, 66 insertions, 8 deletions
diff --git a/src/views/admin.ejs b/src/views/admin.ejs
new file mode 100644
index 0000000..009b029
--- /dev/null
+++ b/src/views/admin.ejs
@@ -0,0 +1,32 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport"
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>Admin</title>
+</head>
+<body>
+<% if (initial) { %>
+ <form id="setup-form">
+ <div>
+ <label for="username">Username:</label>
+ <input type="text" name="username" id="username">
+ </div>
+ <div>
+ <label for="email">Email:</label>
+ <input type="email" name="email" id="email">
+ </div>
+ <div>
+ <label for="password">Password:</label>
+ <input type="password" name="password" id="password">
+ </div>
+ <input type="submit" value="Setup">
+ </form>
+ <script src="/js/setup.js"></script>
+<% } else { %>
+ <!-- TODO: Render default admin page -->
+<% } %>
+</body>
+</html>
diff --git a/src/views/index.ejs b/src/views/index.ejs
index 0e3ab11..daca490 100644
--- a/src/views/index.ejs
+++ b/src/views/index.ejs
@@ -1,11 +1,13 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width" />
- <title>Index</title>
- </head>
- <body>
- <% if (files) { %> <%= files %>! <% } %>
- </body>
+<head>
+ <meta charset="UTF-8"/>
+ <meta name="viewport" content="width=device-width"/>
+ <title>Index</title>
+</head>
+<body>
+<% if (files) { %>
+ <%= files %>
+<% } %>
+</body>
</html>
diff --git a/src/views/login.ejs b/src/views/login.ejs
new file mode 100644
index 0000000..607d099
--- /dev/null
+++ b/src/views/login.ejs
@@ -0,0 +1,24 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport"
+ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
+ <title>Login</title>
+</head>
+<body>
+<form class="login-form" id="login-form">
+ <div>
+ <label for="username">Username:</label>
+ <input type="text" id="username" placeholder="Username">
+ </div>
+ <div>
+ <label for="password">Password:</label>
+ <input type="password" id="password" placeholder="Password">
+ </div>
+ <input type="submit" value="Login">
+</form>
+<script src="/js/login.js"></script>
+</body>
+</html>