From 6bffdb774a8d249f82322167aa9675efbda4c641 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 23 Jan 2021 18:39:35 +0100 Subject: [PATCH] team page + donate + query for homepage --- daapinterface.py | 16 +++++++++++++++- static/css/style.css | 1 + templates/layout.html | 4 ++-- templates/team.html | 12 ++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 templates/team.html diff --git a/daapinterface.py b/daapinterface.py index d4d408e..8544015 100644 --- a/daapinterface.py +++ b/daapinterface.py @@ -65,7 +65,7 @@ def home(): wdt:P87 ?dateadded. FILTER(?work != wd:Q57) } - ORDER BY (?dateadded) + ORDER BY DESC (?dateadded) LIMIT 12 ''') sparql.setReturnFormat(JSON) @@ -1047,6 +1047,20 @@ def upload(): return render_template('upload.html', text=text) +# #################### TEAM +@app.route("/team") +def team(): + url="https://daap.bannerrepeater.org/w/index.php?title=Team&action=render" + # Make a GET request to fetch the raw HTML content + html_content = requests.get(url).text + # Parse the html content + soup = BeautifulSoup(html_content, "lxml") + # print(soup.prettify()) # print the parsed data of html + + text=soup.find("html") + + text=Markup(text) + return render_template('team.html', text=text) # #################### CASE STUDY @app.route("/casestudy") diff --git a/static/css/style.css b/static/css/style.css index 2ee3fc1..f888638 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1994,6 +1994,7 @@ div#tutorials-intro h3, div#tutorials-intro p { #link-search{ padding-right: 26px; + text-decoration: none; } #navigation { display: none !important; diff --git a/templates/layout.html b/templates/layout.html index 100765a..aabd58b 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -105,8 +105,8 @@ diff --git a/templates/team.html b/templates/team.html new file mode 100644 index 0000000..e4b639c --- /dev/null +++ b/templates/team.html @@ -0,0 +1,12 @@ +{% extends "layout.html" %} +{% block content %} + +{{ text }} + + + +{% endblock content %} \ No newline at end of file