add login/register forms. Restructure pixelapi

This commit is contained in:
2018-06-20 23:47:47 +02:00
parent 75197310bf
commit ffa9fb3395
18 changed files with 292 additions and 228 deletions

View File

@@ -1,24 +1,22 @@
{{define "login"}}
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Login ~ PixelDrain</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/res/style/home.css"/>
<link rel="stylesheet" href="/res/style/season.css"/>
<link rel="stylesheet" href="/res/style/form.css"/>
<link rel="stylesheet" href="/res/style/menu.css"/>
<link rel="stylesheet" href="/global.css"/>
<link rel="stylesheet" href="/res/style/layout.css"/>
<link href='https://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'/>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="/res/img/tray32.png"/>
<meta name="theme-color" content="#9FCF6C"/>
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain.png"/>
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_big.png"/>
<style th:include="fragments :: background-pattern" th:inline="text"></style>
{{template "bgpattern"}}
<meta name="description" content="PixelDrain is a free file sharing service, you
can upload any file and you will be given a shareable link right away.
<meta name="description" content="PixelDrain is a free file sharing service, you
can upload any file and you will be given a shareable link right away.
PixelDrain also supports previews for images, videos, audio, PDFs and much more.
Uncensored, unmonitored and unmoderated."/>
<meta property="og:type" content="website" />
@@ -32,49 +30,30 @@
<body>
<div id='body' class="body">
<div th:replace="fragments :: menu"></div>
<br/><br/>
<div id="message" th:switch="${messageType}">
<div th:case="'info'" th:utext="${message}" id="text-info" class="text-info"></div>
<div th:case="'warn'" th:utext="${message}" id="text-warning" class="text-warning"></div>
</div>
Log in to your PixelDrain account
<form action="/login" method="POST">
<table>
{{template "menu"}}
<h1>Log in to your PixelDrain account</h1>
<form action="/login" method="POST" class="highlight_dark border_top border_bottom">
<table style="margin-left: auto; margin-right: auto;">
<tr>
<td>Username</td>
<td><input name="username" type="text" value="" th:value="${form_username}"/></td>
<td><input name="username" type="text" value=""/></td>
</tr>
<tr>
<td>Password</td>
<td><input name="password" type="password"/></td>
</tr>
<tr>
<td colspan=2 style="text-align: right;"><input type="submit" value="Login"/></td>
</tr>
</table>
<input type="submit" value="Login"/>
</form>
<br/><br/>
If you don't have a PixelDrain account, you can <a href="/register">register here</a>.
<br/>
If you don't have a PixelDrain account, you can <a href="/register">register here</a>. No e-mail address required.<br/>
{{template "footer"}}
</div>
<!-- Google Analytics Tracking Code -->
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-24463738-4', 'auto');
ga('send', 'pageview');
</script>
{{template "analytics"}}
</body>
</html>
{{end}}