From 7de70b423c37889579529d540cce00fb93681269 Mon Sep 17 00:00:00 2001 From: flifloo Date: Sun, 28 Apr 2019 15:09:39 +0200 Subject: [PATCH] Start dashboard --- site.py | 7 +++++ templates/dashboard.html | 64 ++++++++++++++++++++++++++++++++++++++++ templates/index.html | 4 +-- templates/settings.html | 2 +- templates/template.html | 1 + 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 templates/dashboard.html diff --git a/site.py b/site.py index 4d63c8c..5869ec8 100644 --- a/site.py +++ b/site.py @@ -75,6 +75,13 @@ def settings(): database.tradd(twapi_login(session).me().id, request.form["trtoken"]) return render_template("settings.html", login = True, trlogin = is_trlogin(session), trloginfail = trloginfail) +@app.route("/dashboard") +def dashboard(): + if not is_twlogin(session): + return redirect("/") + + return render_template("dashboard.html", login = True, tweets = ["test1", "test2", "test3"], timeline = [{"id": 1, "text": "test1"}, {"id": 2, "text": "test2"}, {"id": 3, "text": "test3"}, {"id": 4, "text": "test4"}]) + @app.route("/twpost") def twpost(): if is_twlogin(session): diff --git a/templates/dashboard.html b/templates/dashboard.html new file mode 100644 index 0000000..5ebf1ce --- /dev/null +++ b/templates/dashboard.html @@ -0,0 +1,64 @@ +{% extends "template.html" %} +{% block content %} + + +
+
+

Dashboard

+

Your personal dashboard

+
+
+
+ +

Current automatized tweets

+
+ + {% for t in tweets %} + + + + + {% endfor %} +
{{ t }}
Disable + Delet
+
+ +

Add an automatized tweet

+
+
+
+
+ {% for t in timeline %} +
+ + +
+ {% endfor %} +
+
+ + +
+
+
+ +
+ +

Trello board

+
+
+
+
+

Choose a board

+
+
+

Choose a columns

+
+
+
+
+
+
+
+ +{% endblock %} diff --git a/templates/index.html b/templates/index.html index 1a27c19..f50fb47 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8,9 +8,9 @@

Manage your commissions was never so easy with with the Cyberplanificateur

diff --git a/templates/settings.html b/templates/settings.html index 8be1dbc..c4495bd 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -5,7 +5,7 @@

Settings

-

Aliquam ut ex ut interdum donec amet imperdiet eleifend

+

Account settings of Cyberplanificateur

diff --git a/templates/template.html b/templates/template.html index 44565cb..2e9ecfe 100644 --- a/templates/template.html +++ b/templates/template.html @@ -28,6 +28,7 @@