move meta tags to template, begin of user portal

This commit is contained in:
2018-06-25 23:05:18 +02:00
parent 24b74a1b60
commit 12d2560133
20 changed files with 136 additions and 423 deletions

View File

@@ -0,0 +1,20 @@
{{define "file_manager"}}<!DOCTYPE html>
<html>
<head>
{{template "meta_tags" "File Manager"}}
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>
<body>
{{template "menu" .}}
<div class="highlight_dark border_bottom">
These files were uploaded while logged in to your pixeldrain account,
<a href="/history">click here</a> to view files uploaded anonymously
in this browser.
</div>
{{template "analytics"}}
</body>
</html>
{{end}}

View File

@@ -1,75 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>File Browser ~ 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/history.css"/>
<link rel="stylesheet" href="/res/style/menu.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>
<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."/>
</head>
<body>
<div id='body' class="body">
<div th:replace="fragments :: menu"></div>
<br/>
<div style="margin-left: 0; margin-right: 0; text-align: center; font-size: 22px;">
<a th:href="'/account/files?pageid=' + ${pageid - 1}">Previous</a>
&nbsp;&nbsp;&#60;--&nbsp;&nbsp;<span th:text="${pageid}">0</span>&nbsp;&nbsp;--&#62;&nbsp;&nbsp;
<a th:href="'/account/files?pageid=' + ${pageid + 1}">Nextious</a>
</div>
<div id="uploadedFiles" class="uploadedFiles">
<div class="uploadItem" th:each="file,interation : ${files}">
<a th:href="'/u/' + ${file.getId()}" th:inline="text" target="_blank">
<img th:src="'/api/thumbnail/' + ${file.getId()}" th:alt="${file.getFileName()}" class="uploadItemImage"/>
</a>
<a th:href="'/u/' + ${file.getId()}" th:inline="text" target="_blank" class="uploadItemText">
[[${file.getFileName()}]]
<br/>
<span th:text="${file.getDateUpload().toString()}"></span>
</a>
</div>
</div>
<div style="margin-left: 0; margin-right: 0; text-align: center; font-size: 22px;">
<a th:href="'/account/files?pageid=' + ${pageid - 1}">Previous</a>
&nbsp;&nbsp;&#60;--&nbsp;&nbsp;<span th:text="${pageid}">0</span>&nbsp;&nbsp;--&#62;&nbsp;&nbsp;
<a th:href="'/account/files?pageid=' + ${pageid + 1}">Nextious</a>
</div>
</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>
</body>
</html>

View File

@@ -2,34 +2,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Login ~ PixelDrain</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<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"/>
{{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.
PixelDrain also supports previews for images, videos, audio, PDFs and much more.
Uncensored, unmonitored and unmoderated."/>
<meta property="og:type" content="website" />
<meta property="og:title" content="Login ~ PixelDrain" />
<meta property="og:site_name" content="PixelDrain" />
<meta property="og:description" content="Instant file and screenshot sharing." />
<meta property="og:url" content="http://pixeldra.in/" />
<meta property="og:image" content="/res/img/pixeldrain_big.png" />
<meta property="og:image:type" content="image/png" />
{{template "meta_tags" "Login"}}
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>
<body>
<div id='body' class="body">
{{template "menu" .}}

View File

@@ -1,30 +1,7 @@
{{define "logout"}}<!DOCTYPE html>
<html>
<head>
<title>Logging out... ~ Pixeldrain</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<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"/>
{{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.
PixelDrain also supports previews for images, videos, audio, PDFs and much more.
Uncensored, unmonitored and unmoderated."/>
<meta property="og:type" content="website" />
<meta property="og:title" content="Logging out... ~ Pixeldrain" />
<meta property="og:site_name" content="Pixeldrain" />
<meta property="og:description" content="Instant file and screenshot sharing." />
<meta property="og:url" content="http://pixeldra.in/" />
<meta property="og:image" content="/res/img/pixeldrain_big.png" />
<meta property="og:image:type" content="image/png" />
{{template "meta_tags" "Logging out..."}}
</head>
<body>
<div id='body' class="body">
@@ -39,15 +16,15 @@
<p>
We need you to confirm your action here so we can be sure that
you really requested a logout. If we didn't do this, anyone (or
any website) would be able to send you to the page
pixeldrain.com/logout and you would automatically get logged
out of Pixeldrain, which would be very annoying.
any website) would be able to send you to this page and you
would automatically get logged out of Pixeldrain, which would be
very annoying.
</p>
<p>
To prevent this from happening we're verifying that you actually
want to log out by making you submit this form. Because this
want to log out by making you click this button. Because this
logout button triggers a different request type than normal
page vitis we can confirm that you really want to log out.
page visit we can confirm that you really want to log out.
</p>
{{template "footer"}}

View File

@@ -1,34 +1,7 @@
{{define "register"}}
<!DOCTYPE html>
{{define "register"}}<!DOCTYPE html>
<html>
<head>
<title>Register ~ PixelDrain</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="theme-color" content="#82C13E"/>
<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" />
<meta property="og:title" content="Register ~ PixelDrain" />
<meta property="og:site_name" content="PixelDrain" />
<meta property="og:description" content="Instant file and screenshot sharing." />
<meta property="og:url" content="http://pixeldra.in/" />
<meta property="og:image" content="/res/img/pixeldrain_big.png" />
<meta property="og:image:type" content="image/png" />
<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"/>
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain.png"/>
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_big.png"/>
<script src="https://www.google.com/recaptcha/api.js"></script>
{{template "bgpattern"}}
{{template "meta_tags" "Register"}}
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>

View File

@@ -1,99 +1,18 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
{{define "user_home"}}<!DOCTYPE html>
<html>
<head>
<title>File Overview ~ 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/global.css"/>
<link rel="stylesheet" href="/res/style/history.css"/>
<link rel="stylesheet" href="/res/style/menu.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>
<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."/>
{{template "meta_tags" .Username}}
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>
<body>
<div id='body' class="body">
<div th:replace="fragments :: menu"></div>
<br/>
Logged in as <span th:text="${user.getUsername()}"></span>. <a href="/logout">Log out</a>.
<br/><br/>
Bandwidth used past 24 hours:<br/>
<div id="bandwidth-progress-bar" class="progress-bar">
<span th:text="${bandwidth_used} + ' / ' + ${bandwidth_available}"></span>
<div id="bandwidth-progress" th:style="'width: ' + ${bandwidth_percentage} + '%;'">
<span th:text="${bandwidth_used} + ' / ' + ${bandwidth_available}"></span>
</div>
</div>
<br/>
Total size of your files: <span th:text="${account_total_size}"></span>.
<br/><br/>
Your 20 most recently uploaded files:
<div id="uploadedFiles" class="uploadedFiles">
<div class="uploadItem" th:each="file,interation : ${files}">
<a th:href="'/u/' + ${file.getId()}" th:inline="text" target="_blank">
<img th:src="'/api/thumbnail/' + ${file.getId()}" th:alt="${file.getFileName()}" class="uploadItemImage"/>
</a>
<a th:href="'/u/' + ${file.getId()}" th:inline="text" target="_blank" class="uploadItemText">
[[${file.getFileName()}]]
<br/>
<span th:text="${file.getDateUpload().toString()}"></span>
</a>
</div>
</div>
<br/>
<div style="margin-left: 0; margin-right: 0; text-align: center; font-size: 20px;">
<a href="/account/files">Click here to view all your files</a>
</div>
<br/>
Your 20 most recently created lists:
<div id="uploadedFiles" class="uploadedFiles">
<div class="uploadItem" th:each="list,interation : ${lists}" th:inline="text">
<a th:href="'/l/' + ${list.getId()}" target="_blank">
<img th:src="'/api/thumbnail/' + ${list_db.getListItem(list.getId(), 0).getFileId()}" alt="" class="uploadItemImage"/>
</a>
<a th:href="'/l/' + ${list.getId()}" target="_blank" class="uploadItemText">
[[${list.getTitle()}]]
<br/>
<span th:text="${list.getSize()} + ' Items'"></span>
<br/>
<span th:text="${list.getDateCreated().toString()}"></span>
</a>
</div>
</div>
<div style="margin-left: 0; margin-right: 0; text-align: center; font-size: 20px;">
<a href="/account/lists">Click here to view all your lists</a>
</div>
{{template "menu" .}}
<h1>Welcome home, {{.Username}}!</h1>
{{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}}