initial
This commit is contained in:
28
docker-pwss/code/templates/index.html
Normal file
28
docker-pwss/code/templates/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8/>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes" />
|
||||
<style>
|
||||
body {
|
||||
background-color: #2c3338;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
window.location.href = '{{ url_for("login") }}';
|
||||
}, 3000);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
196
docker-pwss/code/templates/layout.html
Normal file
196
docker-pwss/code/templates/layout.html
Normal file
@@ -0,0 +1,196 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8/>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
|
||||
<style>
|
||||
.align {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.grid {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 320px;
|
||||
max-width: 20rem;
|
||||
width: 90%;
|
||||
}
|
||||
.hidden {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.icons {
|
||||
display: none;
|
||||
}
|
||||
.icon {
|
||||
display: inline-block;
|
||||
fill: #606468;
|
||||
font-size: 16px;
|
||||
font-size: 1rem;
|
||||
height: 1em;
|
||||
vertical-align: middle;
|
||||
width: 1em;
|
||||
}
|
||||
* {
|
||||
-webkit-box-sizing: inherit;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-size: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #2c3338;
|
||||
color: #606468;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 400;
|
||||
height: 100%;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
a {
|
||||
color: #eee;
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
input {
|
||||
background-image: none;
|
||||
border: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
-webkit-transition: background-color 0.3s;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
input[type='submit'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form {
|
||||
margin: -14px;
|
||||
margin: -0.875rem;
|
||||
}
|
||||
|
||||
.form input[type='password'],
|
||||
.form input[type='text'],
|
||||
.form input[type='submit'] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form__field {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
margin: 14px;
|
||||
margin: 0.875rem;
|
||||
}
|
||||
|
||||
.form__input {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
.login {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.login label,
|
||||
.login input[type='text'],
|
||||
.login input[type='password'],
|
||||
.login input[type='submit'] {
|
||||
border-radius: 0.25rem;
|
||||
padding: 16px;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.login label {
|
||||
background-color: #363b41;
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
padding-left: 20px;
|
||||
padding-left: 1.25rem;
|
||||
padding-right: 20px;
|
||||
padding-right: 1.25rem;
|
||||
}
|
||||
|
||||
.login input[type='password'],
|
||||
.login input[type='text'] {
|
||||
background-color: #3b4148;
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.login input[type='password']:focus,
|
||||
.login input[type='password']:hover,
|
||||
.login input[type='text']:focus,
|
||||
.login input[type='text']:hover {
|
||||
background-color: #434a52;
|
||||
}
|
||||
|
||||
.login input[type='submit'] {
|
||||
background-color: #ea4c88;
|
||||
color: #eee;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.login input[type='submit']:focus,
|
||||
.login input[type='submit']:hover {
|
||||
background-color: #d44179;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 1.5rem;
|
||||
margin-top: 24px;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
ul {
|
||||
margin-top: 0;
|
||||
list-style-type: disclosure-closed;
|
||||
}
|
||||
.text--center {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class=align>
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
52
docker-pwss/code/templates/login.html
Normal file
52
docker-pwss/code/templates/login.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
<div class="grid">
|
||||
{% if sessions %}
|
||||
<div>
|
||||
|
||||
Open sessions:<br/>
|
||||
{% for session in sessions %}
|
||||
<a href={{ url_for('serve', path = session[0] + "/" ) }}>{{ session[0] }}/</a>
|
||||
<ul>
|
||||
<li>Session expires: {{ session[1] }} minutes</li>
|
||||
<li>Share expires: {{ session[2] }} days</li>
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<p>Login to a share:</p>
|
||||
</div>
|
||||
<form action="{{ url_for('login') }}" method="post" class="form login">
|
||||
|
||||
<div class="form__field">
|
||||
<label for="login__folder">
|
||||
<svg class=icon style="width:24px;height:24px" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M20 6H12L10 4H4C2.89 4 2 4.89 2 6V18C2 19.1 2.89 20 4 20H20C21.1 20 22 19.1 22 18V8C22 6.9 21.1 6 20 6M18.42 13.5L15 17L11.59 13.5C11.22 13.12 11 12.62 11 12.05C11 10.92 11.9 10 13 10C13.54 10 14.05 10.23 14.42 10.61L15 11.2L15.59 10.6C15.95 10.23 16.46 10 17 10C18.1 10 19 10.92 19 12.05C19 12.61 18.78 13.13 18.42 13.5Z" />
|
||||
</svg>
|
||||
<span class="hidden">Share</span>
|
||||
</label>
|
||||
<input id="login__folder" type="text" name="folder" class="form__input"
|
||||
placeholder="Share" required="" value="{{ folder }}">
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<label for="login__password">
|
||||
<svg class="icon" style="width:24px;height:24px" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" />
|
||||
</svg>
|
||||
<span class="hidden">Password</span>
|
||||
</label>
|
||||
<input id="login__password" type="password" name="password" class="form__input"
|
||||
placeholder="Password" required="" autofocus="">
|
||||
</div>
|
||||
<div class="form__field">
|
||||
<input type="submit" value="Sign In">
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<p>Visit <a href="{{ url_for('logout') }}">Logout</a> to log out all sessions.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
55
docker-pwss/code/templates/ratelimit.html
Normal file
55
docker-pwss/code/templates/ratelimit.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8/>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes" />
|
||||
<style>
|
||||
html {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-size: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #2c3338;
|
||||
color: #fff;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 24px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 400;
|
||||
height: 100%;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.align {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class=align>
|
||||
Ratelimit exceeded: {{ description }}
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 60000);
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user