diff --git a/daapinterface.py b/daapinterface.py index 8c41e24..606ea51 100644 --- a/daapinterface.py +++ b/daapinterface.py @@ -131,6 +131,66 @@ def browsebycategory(): # CATEGORIES TO BE BROWSED ######################### +######################### OLDEST INDEX +@app.route("/datesindex_asc") +def datesindex_asc(): + sparql.setQuery(''' + SELECT ?work ?workLabel ?image ?date WHERE { + { + SELECT ?work ?workLabel (SAMPLE(?date) AS ?date) + WHERE + { ?work wdt:P1 wd:Q1; + wdt:P13 ?date. + FILTER(?work != wd:Q57) + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } + } + GROUP BY ?work ?workLabel + ORDER BY ?workLabel + } + ?work wdt:P1 wd:Q1. + + OPTIONAL {?work p:P90 ?statement. + ?statement ps:P90 ?image; + pq:P54 wd:Q90.} + FILTER(?work != wd:Q57) + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } +} +ORDER BY ASC(?date) + ''') + sparql.setReturnFormat(JSON) + results = sparql.query().convert() + return render_template('oldestindex.html', results=results) + +######################### NEWEST INDEX +@app.route("/datesindex_desc") +def datesindex_desc(): + sparql.setQuery(''' + SELECT ?work ?workLabel ?image ?date WHERE { + { + SELECT ?work ?workLabel (SAMPLE(?date) AS ?date) + WHERE + { ?work wdt:P1 wd:Q1; + wdt:P13 ?date. + FILTER(?work != wd:Q57) + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } + } + GROUP BY ?work ?workLabel + ORDER BY ?workLabel + } + ?work wdt:P1 wd:Q1. + + OPTIONAL {?work p:P90 ?statement. + ?statement ps:P90 ?image; + pq:P54 wd:Q90.} + FILTER(?work != wd:Q57) + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } +} +ORDER BY DESC(?date) + + ''') + sparql.setReturnFormat(JSON) + results = sparql.query().convert() + return render_template('newestindex.html', results=results) ######################### ARTIST INDEX @app.route("/artistsindex") diff --git a/static/css/style.css b/static/css/style.css index 415b3e2..1f67d56 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2214,10 +2214,11 @@ div#tutorials-intro h3, div#tutorials-intro p { margin-right: 10px; } - #header-keyword-search { - display: none; + div#header-top div.primary-button { + display: none; } + /********** MAIN **********/ #home-top-div > img { diff --git a/templates/browsebycategory.html b/templates/browsebycategory.html index baff94b..c64f2a9 100644 --- a/templates/browsebycategory.html +++ b/templates/browsebycategory.html @@ -4,6 +4,9 @@
BROWSE BY
+ +
BROWSE BY DATE FROM OLDEST
+
BROWSE BY DATE FROM NEWEST
BROWSE BY CREATOR/CONTRIBUTOR
BROWSE BY PUBLISHER
BROWSE ALL SELF-PUBLISHED
diff --git a/templates/browsethearchive.html b/templates/browsethearchive.html index 07645ff..0ad0306 100644 --- a/templates/browsethearchive.html +++ b/templates/browsethearchive.html @@ -2,7 +2,7 @@ {% block content %}
-
BROWSE THE ARCHIVE
+
BROWSE THE ARCHIVE FROM A–Z
diff --git a/templates/layout.html b/templates/layout.html index 0fb9e1d..e82e596 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -39,18 +39,19 @@ DAAP
- - - - - - + +
@@ -66,13 +67,7 @@ - - heart icon and link to donation page - +