mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 16:48:58 +00:00
created signup page
This commit is contained in:
parent
669babf033
commit
c04cec6aa8
4 changed files with 37 additions and 6 deletions
|
@ -3,6 +3,8 @@ body {
|
||||||
margin: 2.5%;
|
margin: 2.5%;
|
||||||
background-color: #282c37;
|
background-color: #282c37;
|
||||||
color: white;
|
color: white;
|
||||||
|
}
|
||||||
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +23,9 @@ body {
|
||||||
.large {
|
.large {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
.small {
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
.centred {
|
.centred {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +57,7 @@ body {
|
||||||
}
|
}
|
||||||
input.button {
|
input.button {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
|
@ -101,3 +107,14 @@ label.important {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 1.2em;
|
||||||
|
line-height:1.4em;
|
||||||
|
border: 3px grey solid;
|
||||||
|
border-radius: none;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
input:focus {
|
||||||
|
border: 3px mediumpurple solid;
|
||||||
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h2>Easy <i class="fas fa-check"></i></h2>
|
<h2>Simple <i class="fas fa-check"></i></h2>
|
||||||
<p>FediBooks is easy to use. Everything from the profile picture to the accounts learned from is customisable with an intuitive web UI.</p>
|
<p>FediBooks is easy to use. Everything from the profile picture to the accounts learned from is customisable with an intuitive web UI.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|
|
@ -8,19 +8,29 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="thin centred">Log in</h1>
|
<h1 class="thin centred">{% if signup %}Sign up{% else %}Log in{% endif %}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container centred">
|
<div class="container centred">
|
||||||
<form action="/do/login" method="POST">
|
<form action="/do/{% if signup %}signup{% else %}login{% endif %}" method="POST">
|
||||||
<p>
|
<p>
|
||||||
<label for="email" class="important">Email</label>
|
<label for="email" class="important">Email</label>
|
||||||
<input type="email" name="email" placeholder="you@example.com">
|
<input type="email" name="email" placeholder="you@example.com">
|
||||||
|
{% if signup %}
|
||||||
|
<p class="small">
|
||||||
|
FediBooks requires your email address in order to send you alerts when your bot stops working, and for password resets.
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
<label for="password" class="important">Password</label>
|
<label for="password" class="important">Password</label>
|
||||||
<input type="password" name="password" placeholder="password">
|
<input type="password" name="password">
|
||||||
|
{% if signup %}
|
||||||
|
<p class="small">
|
||||||
|
Passwords must be at least eight characters long.
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
<input type="submit" value="Log in" class="button btn-primary full-width">
|
<input type="submit" value="{% if signup %}Create my account{% else %}Log in{% endif %}" class="button btn-primary full-width">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
6
webui.py
6
webui.py
|
@ -12,4 +12,8 @@ def welcome():
|
||||||
|
|
||||||
@app.route("/login")
|
@app.route("/login")
|
||||||
def show_login_page():
|
def show_login_page():
|
||||||
return render_template("login.html")
|
return render_template("login.html", signup = False)
|
||||||
|
|
||||||
|
@app.route("/signup")
|
||||||
|
def show_signup_page():
|
||||||
|
return render_template("login.html", signup = True)
|
||||||
|
|
Loading…
Reference in a new issue