front end html to look like existing capsul site without <pre>

This commit is contained in:
forest 2020-05-10 21:43:06 -05:00
parent d706ae7761
commit 5d37f26585
8 changed files with 204 additions and 51 deletions

16
capsulflask/console.py Normal file
View File

@ -0,0 +1,16 @@
from flask import Blueprint
from flask import flash
from flask import current_app
from flask import g
from flask import redirect
from flask import url_for
from flask import request
from flask import session
from flask import render_template
from flask_mail import Message
from werkzeug.exceptions import abort
from capsulflask.db import get_model
bp = Blueprint("console", __name__, url_prefix="/console")

16
capsulflask/landing.py Normal file
View File

@ -0,0 +1,16 @@
from flask import Blueprint
from flask import flash
from flask import current_app
from flask import g
from flask import redirect
from flask import url_for
from flask import request
from flask import session
from flask import render_template
from flask_mail import Message
from werkzeug.exceptions import abort
from capsulflask.db import get_model
bp = Blueprint("landing", __name__, url_prefix="/")

View File

@ -1,12 +1,23 @@
html {
body { color: #bdc7b8;
color: #c5c8c6;
font: calc(0.40rem + 1vmin) monospace; font: calc(0.40rem + 1vmin) monospace;
text-align: center;
overflow-y: scroll; overflow-y: scroll;
background-color: #241e1e; background-color: #241e1e;
}
body {
margin-right: auto;
margin-left: auto;
min-width: 33rem;
max-width: 53rem;
} }
@media only screen and (max-width: 53rem) {
body {
margin: 0 2rem;
}
}
a { a {
color:#6CF; color:#6CF;
} }
@ -17,21 +28,93 @@ a:hover, a:active, a:visited {
header { header {
display: flex; display: flex;
} justify-content: space-between;
span.home { margin: 2rem 0;
align-self: flex-start;
}
span.account {
align-self: flex-start;
}
.float-right {
display: inline-block;
float: right;
} }
.flash { .flash {
background: red; color: rgb(173, 74, 8);
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
border: 1px dashed rgb(173, 74, 8);
border-radius: 2em;
margin-bottom: 2em;
padding: 1em;
} }
main {
border: 1px dashed #bdc7b8;
padding: 1rem;
}
.hero {
display: flex;
flex-direction: column;
align-items: center;
}
.single-content {
margin: 4rem 0;
}
form {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-around;
}
input, label {
margin: 0.5em;
}
input {
background: none;
outline: 0;
padding: 0.25em 0.5em;
border-radius: 0.5em;
color: #bdc7b8;
}
input[type=text] {
font: calc(0.40rem + 1vmin) monospace;
border: 0;
border-bottom: 2px solid #777e73;
min-width: 20em;
outline: 0;
}
input[type=submit] {
font: calc(0.40rem + 1vmin) monospace;
cursor: pointer;
border: 1px solid #777e73;
background: #bdc7b810;
}
h1, h2, h3, h4, h5 {
font-size:calc(0.40rem + 1vmin);
margin: initial;
padding: initial;
text-transform: uppercase;
}
ul li {
margin-bottom: 1em;
}
footer, p {
text-align: left;
}
footer {
margin: 2rem 0;
}
.bigtext {
display: inline-block;
position: relative;
top: 0.17rem;
font-size: 1.8em;
}

View File

@ -1,38 +1,39 @@
<!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <link href="data:image/gif;base64,R0lGODlhEAAQAMIHAAAAAAAA//8AAP8A/wD/AAD/////AP///yH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAEKAAcALAAAAAAQABAAAANJeLrc/vCNOaKi0x66T/ngd21ZGF6cVyxEU5Wr0h5CPQRdAQDHThCCUU7XawFtAYNBtQP8gJfkwQAChGqCm5Kqs4Iey51mwRsfEgA7" rel="icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>{% block title %}{% endblock %}{% if self.title() %} - {% endif %}Capsul💊</title>
<title>{% block title %}{% endblock %}{% if self.title() %} - {% endif %}capsul💊</title> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" /> <meta name="Description" content="Cyberia Capsul">
<link rel="apple-touch-icon" href="/icon.png" /> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head> </head>
<body> <body>
<header> <header>
<div>
<div class="float-right"> <a href="/"><b>Capsul</b></a>💊
{% if session["account"] %} </div>
<span>Logged in as {{ session["account"] }}</span> <div>
<a href="{{ url_for('auth.logout') }}">Log Out</a> {% if session["account"] %}
{% else %} { {{ session["account"] }} <a href="{{ url_for('auth.logout') }}">Log Out</a> }
<a href="{{ url_for('auth.login') }}">Log In</a> {% else %}
{% endif %} <a href="{{ url_for('auth.login') }}">Login</a>
</div> {% endif %}
<h1> </div>
capsul
</h1>
</header> </header>
{% for message in get_flashed_messages() %}
<div class="flash">{{ message }}</div>
{% endfor %}
<main> <main>
{% for message in get_flashed_messages() %}
<div class="flash">{{ message }}</div>
{% endfor %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
</main> </main>
<footer> <footer>
(c) Attribution-ShareAlike 4.0 International <br/>
&nbsp;&nbsp;&nbsp;&nbsp;A service by Cyberia Computer Club 2020-<span class="bigtext"></span> <br/>
<br/>
<br/>
<a href="https://giit.cyberia.club/~forest/capsul-flask/tree/master/capsulflask{% block pagesource %}{% endblock %}">View page source</a>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -2,5 +2,35 @@
{% block content %} {% block content %}
Index Page! <div class="hero">
{% endblock %} <h1>CAPSUL</h1>
<pre>
.-.
/:::\
/::::/
/ `-:/
/ /
\ /
`"`
</pre>
</div>
<p>
Simple, fast, private compute by <a href="https://cyberia.club">https://cyberia.club</a><br/><br/>
Spin up your choice of virtual machine by sending an email. <br/><br/>
<ul>
<li>Simply log in with your email address </li>
<li>All root disks are backed up at no charge</li>
<li>All storage is fast, local, and solid-state</li>
<li>All network connections are low latency</li>
<li>Supported by amazing volunteers from Cyberia</li>
<li>Upfront prices, no confusing billing</li>
<li>A Minnesota non-profit organization that will never exploit you</li>
<li>We donate a portion of our proceeds to likeminded hacker groups around the globe</li>
</ul>
</p>
{% endblock %}
{% block pagesource %}/templates/index.html{% endblock %}

View File

@ -3,5 +3,9 @@
{% block title %}check your email{% endblock %} {% block title %}check your email{% endblock %}
{% block content %} {% block content %}
check your email. a login link has been sent to {{ email }} <div class="hero">
{% endblock %} <div class="single-content">check your email. a login link has been sent to {{ email }}</div>
</div>
{% endblock %}
{% block pagesource %}/templates/login-landing.html{% endblock %}

View File

@ -3,9 +3,14 @@
{% block title %}login{% endblock %} {% block title %}login{% endblock %}
{% block content %} {% block content %}
<form method="post"> <div class="hero">
<form method="post" class="single-content">
<label for="email">Email Address</label> <label for="email">Email Address</label>
<input name="email" id="email" required> <input type="text" name="email" id="email" required>
<input type="submit" value="Log In"> <input type="submit" value="Log In">
</form> </form>
{% endblock %} </div>
{% endblock %}
{% block pagesource %}/templates/login.html{% endblock %}

2
test
View File

@ -1,2 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKD3XzZTbTteIgnaFY+fiiOl9EnNN+twyNchnWjCkYqv forest@tower
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKD3XzZTbTteIgnaFY+fiiOl9EnNN+twyNchnWjCkYqv forest@tower