Compare commits
11 Commits
v0.1
...
8be441bab9
| Author | SHA1 | Date | |
|---|---|---|---|
| 8be441bab9 | |||
| 56ec2cfb15 | |||
| 4260ca0e92 | |||
| 3b8cf7e53d | |||
| b8c2bea4ae | |||
| 937bf9787c | |||
| c77f6017d4 | |||
| 8ddd7a972c | |||
| 1c971975dd | |||
| 2d964e0a29 | |||
| 4f9fb5ac4d |
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"TINF22B3": [
|
||||||
|
"raplaTINF22B3.ical",
|
||||||
|
"https://rapla.dhbw-karlsruhe.de/rapla?page=ical&user=vollmer&file=tinf22b3"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -119,9 +119,9 @@ def getResults(token, cookie: str, resl: str):
|
|||||||
vorlist = []
|
vorlist = []
|
||||||
for row in vorl:
|
for row in vorl:
|
||||||
cols = row.find_all("td")
|
cols = row.find_all("td")
|
||||||
col = [e.text.strip() for e in cols]
|
col = [[e.text.strip()] for e in cols]
|
||||||
if len(col) != 0:
|
if len(col) != 0:
|
||||||
if len(col[4]) == 0:
|
if len(col[4][0]) == 0:
|
||||||
col[2] = getPruefung(row.find("a")["href"])
|
col[2] = getPruefung(row.find("a")["href"])
|
||||||
vorlist += [col[1:4]]
|
vorlist += [col[1:4]]
|
||||||
return vorlist
|
return vorlist
|
||||||
@ -132,20 +132,23 @@ def getPruefung(url):
|
|||||||
Ermittelt Noten "geschachtelter" Prüfungen, die nicht auf der Hauptseite angezeigt werden.
|
Ermittelt Noten "geschachtelter" Prüfungen, die nicht auf der Hauptseite angezeigt werden.
|
||||||
TODO: Namen der spezifischen Prüfungen auch zurückgeben, um Zusammensetzung zu spezifizieren.
|
TODO: Namen der spezifischen Prüfungen auch zurückgeben, um Zusammensetzung zu spezifizieren.
|
||||||
:param url:
|
:param url:
|
||||||
:return:
|
:return list:
|
||||||
"""
|
"""
|
||||||
response = requests.request("GET", "https://dualis.dhbw.de" + url, headers=headers, data={})
|
response = requests.request("GET", "https://dualis.dhbw.de" + url, headers=headers, data={})
|
||||||
html = BeautifulSoup(response.content.decode("utf-8"), 'lxml')
|
html = BeautifulSoup(response.content.decode("utf-8"), 'lxml')
|
||||||
table = html.find('table')
|
table = html.find('table')
|
||||||
pruefung = table.find_all("tr")
|
pruefung = table.find_all("tr")
|
||||||
ret = " "
|
ret = []
|
||||||
for row in pruefung:
|
for row in pruefung:
|
||||||
cols = row.find_all("td")
|
cols = row.find_all("td")
|
||||||
col = [e.text.strip() for e in cols]
|
col = [e.text.strip() for e in cols]
|
||||||
if len(col) == 6:
|
if len(col) == 6 and len(col[3]) <= 13:
|
||||||
ret = col[3][:3]
|
if len(col[3]) != 0:
|
||||||
if ret[1] != ",":
|
ret += [col[0] + ": " + col[3][:3]]
|
||||||
ret = "noch nicht gesetzt"
|
if ret[-1][0] == ':':
|
||||||
|
ret[-1] = "Gesamt" + ret[-1]
|
||||||
|
if len(ret) == 0:
|
||||||
|
ret = ["Noch nicht gesetzt"]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,6 @@ def getMealsFromAPI(day: str, dbentry: bool = False):
|
|||||||
response = response.content
|
response = response.content
|
||||||
jres = json.loads(response.decode("utf-8"))
|
jres = json.loads(response.decode("utf-8"))
|
||||||
essen = []
|
essen = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
num = len(jres["data"][0]["lines"])
|
num = len(jres["data"][0]["lines"])
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
@ -99,11 +98,15 @@ def formatDay(day: datetime):
|
|||||||
:param day:
|
:param day:
|
||||||
:return str:
|
:return str:
|
||||||
"""
|
"""
|
||||||
|
if day.month < 10:
|
||||||
|
mon = "0" + str(day.month)
|
||||||
|
else:
|
||||||
|
mon = str(day.month)
|
||||||
if day.day < 10:
|
if day.day < 10:
|
||||||
tag = "0" + str(day.day)
|
tag = "0" + str(day.day)
|
||||||
else:
|
else:
|
||||||
tag = str(day.day)
|
tag = str(day.day)
|
||||||
day = str(day.year) + "-" + str(day.month) + "-" + tag
|
day = str(day.year) + "-" + mon + "-" + tag
|
||||||
return day
|
return day
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -93,13 +93,13 @@ def getRaplas():
|
|||||||
return sorted(kursl), sorted(filel), sorted(urll)
|
return sorted(kursl), sorted(filel), sorted(urll)
|
||||||
|
|
||||||
|
|
||||||
@scheduler.task("interval", id="refreshRapla", minutes=30)
|
@scheduler.task("interval", id="refreshRapla", minutes=5)
|
||||||
def refreshRapla():
|
def refreshRapla():
|
||||||
"""
|
"""
|
||||||
Aktualisiert alle 30 Minuten alle gespeicherten Raplas.
|
Aktualisiert alle 5 Minuten alle gespeicherten Raplas.
|
||||||
"""
|
"""
|
||||||
filel = getRaplas()[1]
|
filel = getRaplas()[1]
|
||||||
urll = getRaplas()[2]
|
urll = getRaplas()[2]
|
||||||
for i in range(len(filel)):
|
for i in range(len(filel)):
|
||||||
|
print("Update Rapla: " + filel[i][:-5])
|
||||||
urlretrieve(urll[i], "calendars/" + filel[i])
|
urlretrieve(urll[i], "calendars/" + filel[i])
|
||||||
print("Update die Kalender...")
|
|
||||||
|
|||||||
8
init.py
8
init.py
@ -1,10 +1,11 @@
|
|||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_login import LoginManager, UserMixin
|
from flask_login import LoginManager, UserMixin
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from talisman import Talisman
|
from flask_talisman import Talisman
|
||||||
from get_mysql import get_mysql
|
from get_mysql import get_mysql
|
||||||
import atexit
|
import atexit
|
||||||
from flask_apscheduler import APScheduler
|
from flask_apscheduler import APScheduler
|
||||||
|
from turbo_flask import Turbo
|
||||||
|
|
||||||
|
|
||||||
def create():
|
def create():
|
||||||
@ -13,6 +14,7 @@ def create():
|
|||||||
:return app:
|
:return app:
|
||||||
"""
|
"""
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
turbo.init_app(app)
|
||||||
dbpw = get_mysql()[1]
|
dbpw = get_mysql()[1]
|
||||||
dbun = get_mysql()[0]
|
dbun = get_mysql()[0]
|
||||||
|
|
||||||
@ -70,8 +72,10 @@ class Meals(db.Model):
|
|||||||
|
|
||||||
|
|
||||||
scheduler = APScheduler()
|
scheduler = APScheduler()
|
||||||
|
turbo = Turbo()
|
||||||
app = create()
|
app = create()
|
||||||
Talisman(app)
|
def_src = ["*.paulmartin.cloud", '\'self\'']
|
||||||
|
# Talisman(app, content_security_policy={"default-src": def_src, "script-src": def_src # + ["'unsafe-inline'"]})
|
||||||
scheduler.init_app(app)
|
scheduler.init_app(app)
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
scheduler.api_enabled = True
|
scheduler.api_enabled = True
|
||||||
|
|||||||
24
routing.py
24
routing.py
@ -7,6 +7,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
|||||||
import hashlib
|
import hashlib
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
|
import random
|
||||||
|
|
||||||
import fetchDUALIS
|
import fetchDUALIS
|
||||||
import fetchRAPLA
|
import fetchRAPLA
|
||||||
@ -22,10 +23,14 @@ def index():
|
|||||||
Leitet den normalen Website-Aufruf zum Login weiter.
|
Leitet den normalen Website-Aufruf zum Login weiter.
|
||||||
:return HTML:
|
:return HTML:
|
||||||
"""
|
"""
|
||||||
return redirect(url_for("login"))
|
if current_user.is_authenticated:
|
||||||
|
return welcome()
|
||||||
|
else:
|
||||||
|
return login()
|
||||||
|
|
||||||
|
|
||||||
@app.route("/dashboard")
|
|
||||||
|
@app.route("/dashboard", methods=["GET", "POST"])
|
||||||
@login_required
|
@login_required
|
||||||
def welcome():
|
def welcome():
|
||||||
"""
|
"""
|
||||||
@ -45,6 +50,14 @@ def welcome():
|
|||||||
else:
|
else:
|
||||||
t = "hidden"
|
t = "hidden"
|
||||||
p = ""
|
p = ""
|
||||||
|
if turbo.can_stream():
|
||||||
|
print ("Streaming...")
|
||||||
|
return turbo.stream([
|
||||||
|
turbo.update(
|
||||||
|
render_template('dashboard.html', kurs=kurs, name=name, theorie=t, praxis=p), target="content")
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
print ("Not streaming!")
|
||||||
return render_template('dashboard.html', kurs=kurs, name=name, theorie=t, praxis=p)
|
return render_template('dashboard.html', kurs=kurs, name=name, theorie=t, praxis=p)
|
||||||
|
|
||||||
|
|
||||||
@ -118,7 +131,7 @@ def displayPlan(kurs):
|
|||||||
samstag = False
|
samstag = False
|
||||||
events = getWeek(week, plan, samstag)
|
events = getWeek(week, plan, samstag)
|
||||||
return render_template("plan-anon.html", events=events[0], eventdays=events[1], kurs=kurs,
|
return render_template("plan-anon.html", events=events[0], eventdays=events[1], kurs=kurs,
|
||||||
prev=str(events[2])[:10], next=str(events[3])[:10], mon=events[4])
|
prev=str(events[2])[:10], next=str(events[3])[:10], mon=events[4], praxis="hidden")
|
||||||
else:
|
else:
|
||||||
return redirect(url_for("login"))
|
return redirect(url_for("login"))
|
||||||
|
|
||||||
@ -150,6 +163,9 @@ def getKurs():
|
|||||||
if not current_user.kurs:
|
if not current_user.kurs:
|
||||||
kurs = fetchDUALIS.getKurs(d.token, cookie)
|
kurs = fetchDUALIS.getKurs(d.token, cookie)
|
||||||
if kurs != 0:
|
if kurs != 0:
|
||||||
|
if not fetchRAPLA.getIcal(kurs):
|
||||||
|
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden",
|
||||||
|
file=False)
|
||||||
current_user.kurs = kurs
|
current_user.kurs = kurs
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
else:
|
else:
|
||||||
@ -161,7 +177,7 @@ def getKurs():
|
|||||||
else:
|
else:
|
||||||
e = True
|
e = True
|
||||||
kurs = ""
|
kurs = ""
|
||||||
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden")
|
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden", file=True)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/set-up/semester")
|
@app.route("/set-up/semester")
|
||||||
|
|||||||
@ -32,7 +32,7 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userbuttons {
|
.userbuttons {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
@ -146,6 +146,10 @@ option {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event:hover {
|
||||||
|
transform: scale(102%);
|
||||||
|
}
|
||||||
|
|
||||||
.space,
|
.space,
|
||||||
.date {
|
.date {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@ -233,6 +237,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -241,6 +246,25 @@ nav li .bottom {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.start-0100 {
|
.start-0100 {
|
||||||
grid-row-start: 1;
|
grid-row-start: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
{"version":3,"sourceRoot":"","sources":["cal.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAMF;EACE;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAKF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAKF;EACI;EACA;;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAIJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AASJ;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;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ACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA","file":"cal.css"}
|
{"version":3,"sourceRoot":"","sources":["cal.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAMF;EACE;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;AAAA;EAEE;;;AAKF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAKF;EACI;EACA;;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;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;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAKA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA","file":"cal.css"}
|
||||||
@ -32,7 +32,7 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userbuttons {
|
.userbuttons {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
@ -148,6 +148,10 @@ option {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event:hover{
|
||||||
|
transform: scale(102%);
|
||||||
|
}
|
||||||
|
|
||||||
.space,
|
.space,
|
||||||
.date {
|
.date {
|
||||||
height: 100px
|
height: 100px
|
||||||
@ -241,6 +245,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -249,6 +254,24 @@ nav li .bottom {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
// Place on Timeline
|
// Place on Timeline
|
||||||
|
|
||||||
|
|||||||
7
static/dropdown.js
Normal file
7
static/dropdown.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
|
const dropdown = document.getElementById("dropdown");
|
||||||
|
dropdown.addEventListener("change", function() {
|
||||||
|
dropdown.submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
@ -67,6 +67,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -123,6 +124,29 @@ nav li .bottom {
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 80%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIJ;EACI;EACA;;;AAGJ;AACA;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACH;;;AAKD;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA","file":"style.css"}
|
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIJ;EACI;EACA;;;AAGJ;AACA;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACH;;;AAGD;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACE;;;AAGF;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA","file":"style.css"}
|
||||||
@ -67,6 +67,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -122,9 +123,30 @@ nav li .bottom {
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
width:50px;
|
width:50px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 80%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
|||||||
@ -3,36 +3,40 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>DualHub</title>
|
<title>DualHub</title>
|
||||||
<link rel="stylesheet" type="text/css" href={{ url_for("static", filename="style.css") }}>
|
<link rel="stylesheet" type="text/css" href={{ url_for("static", filename="style.css") }}>
|
||||||
|
<meta http-equiv="refresh" content="510">
|
||||||
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
||||||
|
{{ turbo() }}
|
||||||
|
{% block head %}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul id = "navbar-items">
|
||||||
{% if theorie=="hidden" and praxis=="hidden" %}
|
{% if theorie=="hidden" and praxis=="hidden" %}
|
||||||
<li class="top"><a class="top" href={{ url_for("welcome", sel="theorie") }}>Theorie</a></li>
|
<li class="top"><a class="top" href={{ url_for("index", sel="theorie") }}>Theorie</a></li>
|
||||||
<li class="top"><a class="top" href={{ url_for("welcome", sel="praxis") }}>Praxis</a></li>
|
<li class="top"><a class="top" href={{ url_for("index", sel="praxis") }}>Praxis</a></li>
|
||||||
{% elif theorie == "hidden" %}
|
{% elif theorie == "hidden" %}
|
||||||
<li class="top"><a class="top" href={{ url_for("welcome", sel="theorie") }}>Theorie</a></li>
|
<li class="top"><a class="top" href={{ url_for("index", sel="theorie") }}>Theorie</a></li>
|
||||||
<li class="top selected"><a class="top selected" href={{ url_for("welcome", sel="praxis") }}>Praxis</a></li>
|
<li class="top selected"><a class="top selected" href={{ url_for("index", sel="praxis") }}>Praxis</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="top selected"><a class="top selected" href={{ url_for("welcome", sel="theorie") }}>Theorie</a></li>
|
<li class="top selected"><a class="top selected" href={{ url_for("index", sel="theorie") }}>Theorie</a></li>
|
||||||
<li class="top"><a class="top" href={{ url_for("welcome", sel="praxis") }}>Praxis</a></li>
|
<li class="top"><a class="top" href={{ url_for("index", sel="praxis") }}>Praxis</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li {{ theorie }}><a {% if s == "n" %} class="selected" {% endif %} href={{ url_for("displayNoten") }}>Noten</a></li>
|
<li {{ theorie }}><a {% if s == "n" %} class="selected" {% endif %} href={{ url_for("displayNoten") }}>Noten</a></li>
|
||||||
<li {{ theorie }}><a {% if s == "p" %} class="selected" {% endif %} href={{ url_for("displayRapla") }}>Stundenplan</a></li>
|
<li {{ theorie }}><a {% if s == "p" %} class="selected" {% endif %} href={{ url_for("displayRapla") }}>Stundenplan</a></li>
|
||||||
<li {{ praxis }}><a {% if s == "t" %} class="selected" {% endif %} href="">To Dos</a></li>
|
<li {{ praxis }}><a {% if s == "t" %} class="selected" {% endif %} href="">To Dos</a></li>
|
||||||
<li><a {% if s == "s" %} class="selected" {% endif %} href={{ url_for("redKurs") }}>Konfiguration</a></li>
|
<li><a {% if s == "s" %} class="selected" {% endif %} href={{ url_for("redKurs") }}>Konfiguration</a></li>
|
||||||
{% if request.endpoint %}
|
<li {% block logout %}{% endblock %}><a class="bottom" href={{ url_for("logout") }}>Log-Out</a></li>
|
||||||
{% if request.endpoint[:7] != "login" %}
|
|
||||||
<li><a class="bottom" href={{ url_for("logout") }}>Log-Out</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="cs1">
|
<turbo-frame>
|
||||||
|
<div class="cs1" id = 'page'>
|
||||||
|
<div id="content">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</turbo-frame>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not detected[1] %}
|
{% if not detected[1] %}
|
||||||
|
{% if file %}
|
||||||
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Falls er nicht stimmt, kannst du ihn unten auswählen.</h1>
|
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Falls er nicht stimmt, kannst du ihn unten auswählen.</h1>
|
||||||
{% if not request.args.get("next") %}
|
{% if not request.args.get("next") %}
|
||||||
<form action={{ url_for("getSemester") }}>
|
<form action={{ url_for("getSemester") }}>
|
||||||
@ -10,7 +11,10 @@
|
|||||||
<input type="submit" value="Der Kurs stimmt!">
|
<input type="submit" value="Der Kurs stimmt!">
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>Dein Kurs konnte leider nicht ermittelt werden. Klicke den Button, um direkt zur Auswahl zu kommen.</h1>
|
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Für ihn ist aber noch kein Rapla hinterlegt.</h1>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<h1>Dein Kurs konnte leider nicht ermittelt werden. Klicke den Button, um zur Auswahl zu kommen.</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action={{ url_for("chooseRaplas", next=request.args.get("next")) }}>
|
<form action={{ url_for("chooseRaplas", next=request.args.get("next")) }}>
|
||||||
<input type="submit" value="Manuell auswählen!">
|
<input type="submit" value="Manuell auswählen!">
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
|
{% block logout %}
|
||||||
|
hidden
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="cs">
|
<div class="cs">
|
||||||
<h1>Einloggen</h1>
|
<h1>Einloggen</h1>
|
||||||
|
|||||||
21
templates/noten-list.html
Normal file
21
templates/noten-list.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{% for i in range (semester|length) %}
|
||||||
|
{% if semester[i][1]==sel %}
|
||||||
|
<h1>Deine Noten im {{ semester[i][0] }}</h1>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
{% for i in noten %}
|
||||||
|
{% if i[1]|length == 1 %}
|
||||||
|
{% if i[1][0][0].isnumeric() or i[1][0][-1].isalpha()%}
|
||||||
|
<h2>{{ i[0][0] }}: {{ i[1][0] }} (Credits: {{ i[2][0] }})</h2>
|
||||||
|
{% else %}
|
||||||
|
<h2>{{ i[0][0] }}: {{ i[1][0][-3:] }} (Credits: {{ i[2][0] }})</h2>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<h2>{{ i[0][0] }} (Credits: {{ i[2][0] }}):</h2>
|
||||||
|
{% for e in i[1] %}
|
||||||
|
<h2>      {{ e }}</h2>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
@ -1,24 +1,22 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<script type="text/javascript" src="{{ url_for("static", filename="dropdown.js") }}"></script>
|
||||||
|
<meta http-equiv="Refresh" content="600">
|
||||||
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for i in range (semester|length) %}
|
<turbo-frame>
|
||||||
{% if semester[i][1]==sel %}
|
<div id="noten">
|
||||||
<h1>Deine Noten im {{ semester[i][0] }}</h1>
|
{% include "noten-list.html" %}
|
||||||
{% endif %}
|
</div>
|
||||||
{% endfor %}
|
</turbo-frame>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
{% for i in noten %}
|
<form id= "dropdown" method="post" action={{ url_for ("setSemester", next=url_for("displayNoten")) }}>
|
||||||
<h2>{{ i[0] }}: {{ i[1].capitalize() }} (Credits: {{ i[2] }})</h2>
|
|
||||||
{% endfor %}
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<form method="post" action={{ url_for ("setSemester", next=url_for("displayNoten")) }}>
|
|
||||||
<label for="sem">Semester wählen! </label>
|
<label for="sem">Semester wählen! </label>
|
||||||
<select name="sem" id="sem">
|
<select name="sem" id="sem">
|
||||||
{% for i in range (semester|length) %}
|
{% for i in range (semester|length) %}
|
||||||
<option value= {{ semester [i] [1] }} {% if semester[i][1]==sel %} selected {% endif %}>{{ semester [i] [0] }} </option>
|
<option value= {{ semester [i] [1] }} {% if semester[i][1]==sel %} selected {% endif %}>{{ semester [i] [0] }} </option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Semester setzen!">
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -4,6 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Vorlesungsplan</title>
|
<title>Vorlesungsplan</title>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='cal.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='cal.css') }}">
|
||||||
|
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<script type="text/javascript" src="{{ url_for("static", filename="dropdown.js") }}"></script>
|
||||||
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Bitte wähle aus der unten stehenden Liste das Semester, dessen Noten du sehen möchtest.</h1>
|
<h1>Bitte wähle aus der unten stehenden Liste das Semester, dessen Noten du sehen möchtest.</h1>
|
||||||
<form method="post" action={{ url_for ("setSemester", next=request.args.get("next")) }}>
|
<form id="dropdown" method="post" action={{ url_for ("setSemester", next=request.args.get("next")) }}>
|
||||||
<label for="sem">Semester wählen! </label>
|
<label for="sem">Semester wählen! </label>
|
||||||
<select name="sem" id="sem">
|
<select name="sem" id="sem">
|
||||||
<option value = "none" selected disabled hidden></option>
|
<option value = "none" selected disabled hidden></option>
|
||||||
@ -9,6 +12,5 @@
|
|||||||
<option value= {{ semester [i] [1] }}>{{ semester [i] [0] }} </option>
|
<option value= {{ semester [i] [1] }}>{{ semester [i] [0] }} </option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Semester setzen!">
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user