mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +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%;
|
||||
background-color: #282c37;
|
||||
color: white;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -21,6 +23,9 @@ body {
|
|||
.large {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.small {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.centred {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -52,6 +57,7 @@ body {
|
|||
}
|
||||
input.button {
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
|
@ -101,3 +107,14 @@ label.important {
|
|||
font-weight: 300;
|
||||
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="row">
|
||||
<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>
|
||||
</div>
|
||||
<div class="column">
|
||||
|
|
|
@ -8,19 +8,29 @@
|
|||
|
||||
<body>
|
||||
<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 class="container centred">
|
||||
<form action="/do/login" method="POST">
|
||||
<form action="/do/{% if signup %}signup{% else %}login{% endif %}" method="POST">
|
||||
<p>
|
||||
<label for="email" class="important">Email</label>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
6
webui.py
6
webui.py
|
@ -12,4 +12,8 @@ def welcome():
|
|||
|
||||
@app.route("/login")
|
||||
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