mirror of
https://github.com/TrentSPalmer/flask_photo_scaling_app.git
synced 2025-07-05 11:43:16 -07:00
initial commit
This commit is contained in:
67
app/templates/base.html
Normal file
67
app/templates/base.html
Normal file
@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="author" content="TrentSPalmer">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href='/css/photo_app.css'>
|
||||
<script type="text/javascript" src="/js/photo_app.js"></script>
|
||||
{% block head %} {% endblock %}
|
||||
{% if title %}
|
||||
<title>{{title}}</title>
|
||||
{% else %}
|
||||
<title>Mrs Trent's Recipes</title>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="navbarContainerContainer">
|
||||
<div id="hamburgerContainerContainer">
|
||||
<div id="hamburgerContainer">
|
||||
<button id="hamburger" onclick="hamburgerToggle(1)">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</button>
|
||||
<button id="hamburgerClose" onclick="hamburgerToggle(0)">
|
||||
<div id="xa"></div>
|
||||
<div id="xb"></div>
|
||||
</button>
|
||||
{% block morenavs %} {% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div id="navbarContainer">
|
||||
<div id="navbarLeftContainer">
|
||||
<nav id="navbar">
|
||||
<a href="{{ url_for('index') }}"><div class="navbarLink">home</div></a>
|
||||
{% if current_user.is_authenticated %}
|
||||
<div class="navbarSpacer"></div>
|
||||
<a href="{{ url_for('logout') }}"><div class="navbarLink">logout</div></a>
|
||||
<div class="navbarSpacer"></div>
|
||||
<a href="{{ url_for('edit_profile') }}"><div class="navbarLink">edit profile</div></a>
|
||||
<div class="navbarSpacer"></div>
|
||||
<a href="{{ url_for('photo_upload') }}"><div class="navbarLink">photo upload</div></a>
|
||||
{% else %}
|
||||
<div class="navbarSpacer"></div>
|
||||
<a href="{{ url_for('login') }}"><div class="navbarLink">contributor login</div></a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="flashContainer">{{message}}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% if current_user.is_authenticated %}
|
||||
<p id="userGreeting">Logged in as: {{ current_user.name }}</p>
|
||||
{% else %}
|
||||
<p id="userGreeting"> viewing as guest</p>
|
||||
{% endif %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
35
app/templates/change_password.html
Normal file
35
app/templates/change_password.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Change Password</h1>
|
||||
<form action='' method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=24) }}
|
||||
{% for error in form.password.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.new_password.label }}<br>
|
||||
<span class="inputInfo">
|
||||
min 15 chars and at least somewhat random
|
||||
</span><br>
|
||||
{{ form.new_password(size=24) }}
|
||||
{% for error in form.new_password.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.new_password2.label }}<br>
|
||||
{{ form.new_password2(size=24) }}
|
||||
{% for error in form.new_password2.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
24
app/templates/delete_photo.html
Normal file
24
app/templates/delete_photo.html
Normal file
@ -0,0 +1,24 @@
|
||||
<style>
|
||||
.formContainer {
|
||||
align-items: center;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
#submitContainer {
|
||||
margin-top: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class='formContainer'>
|
||||
|
||||
<form action={{ url_for('delete', photo_id=photo.id) }} method="post" novalidate>
|
||||
<h2>Delete Photo?</h2>
|
||||
<img style="width: 100%;" src={{ photo_url + '480_' + photo['photo_name'] }} alt={{ '480_' + photo['photo_name'] }}>
|
||||
{{ form.hidden_tag() }}
|
||||
<p id="submitContainer">{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
23
app/templates/disable_2fa.html
Normal file
23
app/templates/disable_2fa.html
Normal file
@ -0,0 +1,23 @@
|
||||
<style>
|
||||
.formContainer {
|
||||
align-items: center;
|
||||
margin-top: 100px;
|
||||
}
|
||||
|
||||
#submitContainer {
|
||||
margin-top: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class='formContainer'>
|
||||
|
||||
<form action="" method="post" novalidate>
|
||||
<h2>Disable 2FA?</h2>
|
||||
{{ form.hidden_tag() }}
|
||||
<p id="submitContainer">{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
49
app/templates/edit_profile.html
Normal file
49
app/templates/edit_profile.html
Normal file
@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Edit Profile</h1>
|
||||
<form action='' method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
<span class="inputInfo">
|
||||
letters and digits only (i.e. no spaces)
|
||||
</span><br>
|
||||
{{ form.username(size=24) }}
|
||||
{% for error in form.username.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.email.label }}<br>
|
||||
{{ form.email(size=24) }}
|
||||
{% for error in form.email.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=24) }}
|
||||
{% for error in form.password.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
{% if current_user.is_authenticated %}
|
||||
<div>
|
||||
<button class="formButton" onclick="location.href='{{ url_for('change_password') }}';">Change Password</button>
|
||||
</div>
|
||||
{% if contributor_use_totp %}
|
||||
<div>
|
||||
<button class="formButton" onclick="location.href='{{ url_for('disable_totp') }}';">Disable 2 Factor</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
<button class="formButton" onclick="location.href='{{ url_for('enable_totp') }}';">Enable 2 Factor</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
11
app/templates/email/reset_password_email_html.html
Normal file
11
app/templates/email/reset_password_email_html.html
Normal file
@ -0,0 +1,11 @@
|
||||
<p>Dear {{ contributor.name }},</p>
|
||||
<p>To reset your password
|
||||
|
||||
<a href="{{ external_url + '/reset-password/' + token }}">click here</a>.
|
||||
|
||||
</p>
|
||||
<p>Alternatively, you can paste the following link in your browser's address bar:</p>
|
||||
<p>{{ external_url + '/reset-password/' + token }}</p>
|
||||
<p>If you have not requested a password reset simply ignore this message.</p>
|
||||
<p>Sincerely,</p>
|
||||
<p>photo_app</p>
|
13
app/templates/email/reset_password_email_text.txt
Normal file
13
app/templates/email/reset_password_email_text.txt
Normal file
@ -0,0 +1,13 @@
|
||||
Dear {{ contributor.name }},
|
||||
|
||||
To reset your password click on the following link:
|
||||
|
||||
|
||||
{{ external_url + '/reset-password/' + token }}
|
||||
|
||||
|
||||
If you have not requested a password reset simply ignore this message.
|
||||
|
||||
Sincerely,
|
||||
|
||||
photo_app
|
45
app/templates/index.html
Normal file
45
app/templates/index.html
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block morenavs %}
|
||||
<style>
|
||||
|
||||
#main {
|
||||
max-width: unset;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.indexPagePhotos {
|
||||
margin-top: 50px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
row-gap: 55px;
|
||||
column-gap: 55px;
|
||||
}
|
||||
|
||||
.photoContainer {
|
||||
width: 400px;
|
||||
max-width: 80%;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="indexPagePhotos">
|
||||
{% for photo in photos %}
|
||||
<div class="photoContainer">
|
||||
<a href={{ url_for('photo', photo_id=photo['id']) }}>
|
||||
<img src={{ photo_url + '480_' + photo['photo_name'] }} alt={{ '480_' + photo['photo_name'] }}>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
39
app/templates/login.html
Normal file
39
app/templates/login.html
Normal file
@ -0,0 +1,39 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Sign In</h1>
|
||||
<h3>(username Or email)</h3>
|
||||
<form action='' method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
{{ form.username(size=24) }}
|
||||
{% for error in form.username.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.email.label }}<br>
|
||||
{{ form.email(size=24) }}
|
||||
{% for error in form.email.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
{{ form.password(size=24) }}
|
||||
{% for error in form.password.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.remember_me() }} {{ form.remember_me.label }}</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
<p>New User? <a href="{{ url_for('register') }}">Click to Register!</a></p>
|
||||
<p>
|
||||
Forgot Your Password? <a href="{{ url_for('reset_password_request') }}">Click to Reset It</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
233
app/templates/photo.html
Normal file
233
app/templates/photo.html
Normal file
@ -0,0 +1,233 @@
|
||||
<style>
|
||||
img {
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
{% block morenavs %}
|
||||
<button id="previousPhoto" class="navBracket" onclick="location.href='{{ url_for('photo', photo_id=photo.previous_photo_id) }}';">‹</button>
|
||||
<button class="navBracket delButton" onclick="location.href='{{ url_for('delete', photo_id=photo.id) }}';">DEL</button>
|
||||
<button id="nextPhoto" class="navBracket" onclick="location.href='{{ url_for('photo', photo_id=photo.next_photo_id) }}';">›</button>
|
||||
<style>
|
||||
#main {
|
||||
max-width: unset;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.delButton {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 0px;
|
||||
font-size: 2rem;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="photoContainer" id="gestureZone">
|
||||
<img style="width: 600;" src={{ photo_url + 'raw_' + photo['photo_name'] }} alt={{ 'raw_' + photo['photo_name'] }}>
|
||||
<div class="photoRow">
|
||||
<div class="dataContainer">
|
||||
<div class="headingRow">
|
||||
<h2 class="photoPageH2">Original as Uploaded</h2>
|
||||
<a href="{{ url_for('download', file='raw_' + photo.photo_name)}}" download="{{ 'raw_' + photo.photo_name }}" target="_blank">
|
||||
<button class="downloadButton">Download</button>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<a class="blue" href={{ photo_url + 'raw_' + photo['photo_name'] }}>{{ photo_url + 'raw_' + photo.photo_name }}</a>
|
||||
</p>
|
||||
{% if photo.Make != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Make:</div>
|
||||
<div class="dataRowRight">{{ photo.Make }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.Model != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Model:</div>
|
||||
<div class="dataRowRight">{{ photo.Model }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.Software != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Software:</div>
|
||||
<div class="dataRowRight">{{ photo.Software }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Upload Date:</div>
|
||||
<div class="dataRowRight">{{ photo.UploadDate }}</div>
|
||||
</div>
|
||||
{% if photo.DateTime != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">DateTime:</div>
|
||||
<div class="dataRowRight">{{ photo.DateTime }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.DateTimeOriginal != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">DateTimeOriginal:</div>
|
||||
<div class="dataRowRight">{{ photo.DateTimeOriginal }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.DateTimeDigitized != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">DateTimeDigitized:</div>
|
||||
<div class="dataRowRight">{{ photo.DateTimeDigitized }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.TimeZoneOffset != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">TimeZoneOffset:</div>
|
||||
<div class="dataRowRight">{{ photo.TimeZoneOffset }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">SizeOnDisc:</div>
|
||||
<div class="dataRowRight">{{ photo.SizeOnDisc }}</div>
|
||||
</div>
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Width / Height:</div>
|
||||
<div class="dataRowRight">{{ photo.photo_width }} / {{ photo.photo_height }}</div>
|
||||
</div>
|
||||
{% if photo.AspectRatio != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">AspectRatio:</div>
|
||||
<div class="dataRowRight">{{ photo.AspectRatio }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.DigitalZoomRatio != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">DigitalZoomRatio:</div>
|
||||
<div class="dataRowRight">{{ photo.DigitalZoomRatio }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.fnumber != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">fnumber:</div>
|
||||
<div class="dataRowRight">{{ photo.fnumber }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.GPSAltitude != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Altitude Meters:</div>
|
||||
<div class="dataRowRight">{{ photo.GPSAltitude }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.GPSAltitudeFeet != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Altitude Feet:</div>
|
||||
<div class="dataRowRight">{{ photo.GPSAltitudeFeet }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.GPSAboveSeaLevel != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Above Sea Level:</div>
|
||||
<div class="dataRowRight">{{ photo.GPSAboveSeaLevel }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photo.LatLong != None %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">GPS Coordinates:</div>
|
||||
<div class="dataRowRight">
|
||||
<a class="blue" href={{ photo.MapUrl }} rel="noopener noreferrer" target="_blank">
|
||||
{{ photo.LatLong }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">PhotoFormat:</div>
|
||||
<div class="dataRowRight">{{ photo.photo_format }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src={{ photo_url + 'raw_' + photo['photo_name'] }} alt={{ 'raw_' + photo['photo_name'] }}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photoRow">
|
||||
<div class="dataContainer">
|
||||
<div class="headingRow">
|
||||
<h2 class="photoPageH2">1280 Max-Conversion</h2>
|
||||
<a href="{{ url_for('download', file='1280_' + photo.photo_name)}}" download="{{ '1280_' + photo.photo_name }}" target="_blank">
|
||||
<button class="downloadButton">Download</button>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<a class="blue" href={{ photo_url + '1280_' + photo['photo_name'] }}>{{ photo_url + '1280_' + photo.photo_name }}</a>
|
||||
</p>
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">SizeOnDisc:</div>
|
||||
<div class="dataRowRight">{{ photo.SizeOnDisc1280 }}</div>
|
||||
</div>
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Width / Height:</div>
|
||||
<div class="dataRowRight">{{ photo.photo_1280_width }} / {{ photo.photo_1280_height }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src={{ photo_url + '1280_' + photo['photo_name'] }} alt={{ '1280_' + photo['photo_name'] }}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photoRow">
|
||||
<div class="dataContainer">
|
||||
<div class="headingRow">
|
||||
<h2 class="photoPageH2">480 Max-Conversion</h2>
|
||||
<a href="{{ url_for('download', file='480_' + photo.photo_name)}}" download="{{ '480_' + photo.photo_name }}" target="_blank">
|
||||
<button class="downloadButton">Download</button>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<a class="blue" href={{ photo_url + '480_' + photo['photo_name'] }}>{{ photo_url + '480_' + photo.photo_name }}</a>
|
||||
</p>
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">SizeOnDisc:</div>
|
||||
<div class="dataRowRight">{{ photo.SizeOnDisc480 }}</div>
|
||||
</div>
|
||||
<div class="dataRow">
|
||||
<div class="dataRowLeft">Width / Height:</div>
|
||||
<div class="dataRowRight">{{ photo.photo_480_width }} / {{ photo.photo_480_height }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src={{ photo_url + '480_' + photo['photo_name'] }} alt={{ '480_' + photo['photo_name'] }}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let touchstartX = 0;
|
||||
let touchendX = 0;
|
||||
|
||||
const gestureZone = document.getElementById('gestureZone');
|
||||
|
||||
gestureZone.addEventListener('touchstart', function(event) {
|
||||
touchstartX = event.changedTouches[0].screenX;
|
||||
}, false);
|
||||
|
||||
gestureZone.addEventListener('touchend', function(event) {
|
||||
touchendX = event.changedTouches[0].screenX;
|
||||
handleGesture();
|
||||
}, false);
|
||||
|
||||
function handleGesture() {
|
||||
if (touchendX <= touchstartX - 100) {
|
||||
console.log('Swiped left');
|
||||
location.href='{{ url_for('photo', photo_id=photo.next_photo_id) }}';
|
||||
}
|
||||
|
||||
if (touchendX >= touchstartX + 100) {
|
||||
console.log('Swiped right');
|
||||
location.href='{{ url_for('photo', photo_id=photo.previous_photo_id) }}';
|
||||
}
|
||||
}
|
||||
activateHotKeys();
|
||||
</script>
|
||||
{% endblock %}
|
53
app/templates/qr.html
Normal file
53
app/templates/qr.html
Normal file
@ -0,0 +1,53 @@
|
||||
<style>
|
||||
.formWarning {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#totpp {
|
||||
margin-top: 80px;
|
||||
margin-bottom: 50px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#submitContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#submit {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#svg_container {
|
||||
margin-top: 100px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
svg {
|
||||
transform: scale(1.5);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id='svg_container' class='formContainer'>
|
||||
<form action='' method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>{{ qr | safe }}</p>
|
||||
<p id="totpp">
|
||||
{{ form.totp_code.label }}<br>
|
||||
{% for error in form.totp_code.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
{{ form.totp_code(size=6) }}
|
||||
</p>
|
||||
<p id="submitContainer">{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
45
app/templates/register.html
Normal file
45
app/templates/register.html
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Register</h1>
|
||||
<form action="" method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.username.label }}<br>
|
||||
<span class="inputInfo">
|
||||
letters and digits only (i.e. no spaces)
|
||||
</span><br>
|
||||
{{ form.username(size=24) }}
|
||||
{% for error in form.username.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.email.label }}<br>
|
||||
{{ form.email(size=24) }}
|
||||
{% for error in form.email.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
<span class="inputInfo">
|
||||
min 15 chars and at least somewhat random
|
||||
</span><br>
|
||||
{{ form.password(size=24) }}
|
||||
{% for error in form.password.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password2.label }}<br>
|
||||
{{ form.password2(size=24) }}
|
||||
{% for error in form.password2.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
28
app/templates/reset_password.html
Normal file
28
app/templates/reset_password.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Reset Your Password</h1>
|
||||
<form action="" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.password.label }}<br>
|
||||
<span class="inputInfo">
|
||||
min 15 chars and at least somewhat random
|
||||
</span><br>
|
||||
{{ form.password(size=24) }}<br>
|
||||
{% for error in form.password.errors %}
|
||||
<span class="formWarning">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>
|
||||
{{ form.password2.label }}<br>
|
||||
{{ form.password2(size=24) }}<br>
|
||||
{% for error in form.password2.errors %}
|
||||
<span class="formWarning">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
18
app/templates/reset_password_request.html
Normal file
18
app/templates/reset_password_request.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>{{ title }}</h1>
|
||||
<form action="" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.email.label }}<br>
|
||||
{{ form.email(size=24) }}<br>
|
||||
{% for error in form.email.errors %}
|
||||
<span class="formWarning">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
45
app/templates/two_factor_input.html
Normal file
45
app/templates/two_factor_input.html
Normal file
@ -0,0 +1,45 @@
|
||||
<style>
|
||||
#totpp {
|
||||
margin-top: 10%;
|
||||
margin-bottom: 50px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#submitContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#submit {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
align-self: center;
|
||||
margin-top: 10%;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h3>{{ inst }}</h3>
|
||||
<div class='formContainer'>
|
||||
|
||||
<form action={{ url_for('two_factor_input') }} method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p id="totpp">
|
||||
{{ form.totp_code.label }}<br>
|
||||
{% for error in form.totp_code.errors %}
|
||||
<span class="formWarning">[{{error}}]</span>
|
||||
{% endfor %}
|
||||
{{ form.totp_code(size=6) }}
|
||||
</p>
|
||||
<p id="submitContainer">{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
19
app/templates/upload.html
Normal file
19
app/templates/upload.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>{{ title }}</h1>
|
||||
<form action="" method="post" enctype="multipart/form-data" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.image.label }}<br>
|
||||
<span class="inputInfo imageInputInfo">
|
||||
suggest max 3MB
|
||||
</span><br>
|
||||
{{ form.image(style="width: 100%; margin-top: 40px;") }}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user