mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 16:48:58 +00:00
Compare commits
No commits in common. "098fd2654b76745c1c905f0acd06c98bde16e083" and "669babf0331de46a1e28e61867ee1e7a784b38b5" have entirely different histories.
098fd2654b
...
669babf033
5 changed files with 9 additions and 114 deletions
|
@ -3,8 +3,6 @@ body {
|
|||
margin: 2.5%;
|
||||
background-color: #282c37;
|
||||
color: white;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -12,7 +10,7 @@ body {
|
|||
background-color: #444a5c;
|
||||
padding:10px;
|
||||
}
|
||||
.light {
|
||||
.container.light {
|
||||
background-color: #4d5366;
|
||||
}
|
||||
.column {
|
||||
|
@ -23,9 +21,6 @@ body {
|
|||
.large {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.small {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.centred {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -42,27 +37,6 @@ body {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.bot-icon {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: center/contain url("https://lynnesbian.space/img/bune.png");
|
||||
}
|
||||
.bot-icon, .bot-text, .bot-actions {
|
||||
display: inline-block;
|
||||
align-self: center;
|
||||
}
|
||||
.bot-text {
|
||||
flex-grow: 1;
|
||||
margin: 0 10px;
|
||||
}
|
||||
.bot-name {
|
||||
font-size: 1.8em;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.bot-actions {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.button {
|
||||
color: white;
|
||||
line-height:1.2em;
|
||||
|
@ -78,7 +52,6 @@ body {
|
|||
}
|
||||
input.button {
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
|
@ -101,13 +74,6 @@ input.button {
|
|||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.btn-dangerous {
|
||||
background-color: #e22;
|
||||
}
|
||||
.btn-dangerous:hover {
|
||||
background-color: #c22;
|
||||
}
|
||||
|
||||
a {
|
||||
color: mediumpurple;
|
||||
text-decoration: none;
|
||||
|
@ -135,14 +101,3 @@ 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>Simple <i class="fas fa-check"></i></h2>
|
||||
<h2>Easy <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">
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>FediBooks</title>
|
||||
{% include 'imports.html' %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container light">
|
||||
<h1 class='thin centred'>Home</h1>
|
||||
<p class="centred large">Hi there! You have 1 bots, all of which are currently active.</p>
|
||||
<p class="centred" style="margin: 50px 0;">
|
||||
<a class="button btn-primary btn-large" href="/bot/new" role="button"><i class="fas fa-robot"></i> New bot</a>
|
||||
<a class="button btn-secondary btn-large" href="/settings" role="button"><i class="fas fa-cog"></i> Account settings</a>
|
||||
<a class="button btn-secondary btn-large" href="/do/signout" role="button"><i class="fas fa-sign-out-alt"></i> Sign out</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="container" style="min-height: 300px;">
|
||||
<div class="row light">
|
||||
<div class="bot-icon"></div>
|
||||
<div class="bot-text">
|
||||
<div class="bot-name">My bot!!</div>
|
||||
<div class="bot-status">Online, learning from 3 accounts, 12345 posts in database</div>
|
||||
</div>
|
||||
<div class="bot-actions">
|
||||
<a class="button btn-dangerous" href="/bot/toggle/insert id here" title="Turn on/off"><i class="fas fa-power-off"></i></a><a class="button btn-secondary" href="/bot/edit/insert id here" title="Edit"><i class="fas fa-pencil-alt"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2>Support the author <i class="fas fa-heart"></i></h2>
|
||||
<p>FediBooks is a passion project I develop and maintain in my free time. If you'd like to contribute, you can do so here.</p>
|
||||
<a class="button btn-primary" href="https://patreon.com/Lynnesbian" role="button"><i class="fab fa-patreon"></i> Patreon</a>
|
||||
<a class="button btn-primary" href="https://paypal.me/Lynnesbian" role="button"><i class="fab fa-paypal"></i> PayPal</a>
|
||||
<a class="button btn-primary" href="https://ko-fi.com/Lynnesbian" role="button"><i class="fas fa-coffee"></i> Ko-fi</a>
|
||||
</div>
|
||||
{% include 'footer.html' %}
|
||||
</body>
|
||||
</html>
|
|
@ -8,29 +8,19 @@
|
|||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="thin centred">{% if signup %}Sign up{% else %}Log in{% endif %}</h1>
|
||||
<h1 class="thin centred">Log in</h1>
|
||||
</div>
|
||||
|
||||
<div class="container centred">
|
||||
<form action="/do/{% if signup %}signup{% else %}login{% endif %}" method="POST">
|
||||
<form action="/do/login" 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">
|
||||
{% if signup %}
|
||||
<p class="small">
|
||||
Passwords must be at least eight characters long.
|
||||
<input type="password" name="password" placeholder="password">
|
||||
</p>
|
||||
{% endif %}
|
||||
</p>
|
||||
<input type="submit" value="{% if signup %}Create my account{% else %}Log in{% endif %}" class="button btn-primary full-width">
|
||||
<input type="submit" value="Log in" class="button btn-primary full-width">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
13
webui.py
13
webui.py
|
@ -1,14 +1,9 @@
|
|||
from flask import Flask, render_template, session
|
||||
from flask import Flask, render_template
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = "debug key"
|
||||
|
||||
@app.route("/")
|
||||
def hello():
|
||||
session['userid'] = 1
|
||||
if 'userid' in session:
|
||||
return render_template("home.html")
|
||||
else:
|
||||
return render_template("front_page.html")
|
||||
|
||||
@app.route("/welcome")
|
||||
|
@ -17,8 +12,4 @@ def welcome():
|
|||
|
||||
@app.route("/login")
|
||||
def show_login_page():
|
||||
return render_template("login.html", signup = False)
|
||||
|
||||
@app.route("/signup")
|
||||
def show_signup_page():
|
||||
return render_template("login.html", signup = True)
|
||||
return render_template("login.html")
|
||||
|
|
Loading…
Reference in a new issue