Browse Source

updated css

master
JoBCB 4 years ago
parent
commit
9a53526a44
  1. 57
      daapinterface.py
  2. 2
      static/css/style.css
  3. 3
      templates/home.html
  4. 3
      templates/layout.html
  5. 14
      templates/tutorials.html

57
daapinterface.py

@ -37,16 +37,18 @@ sparql3 = SPARQLWrapper("https://query.daap.bannerrepeater.org/proxy/wdqs/bigdat
@app.route("/")
def home():
sparql.setQuery('''
SELECT ?work ?workLabel ?image ?date WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1.
OPTIONAL { ?work p:P30 ?statement.
SELECT ?work ?workLabel ?image ?date ?dateadded WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1;
wdt:P87 ?dateadded.
?work p:P30 ?statement.
?statement ps:P30 ?image;
pq:P54 wd:Q90.}
OPTIONAL { ?work wdt:P13 ?date. }
FILTER(?work != wd:Q57)
}
ORDER BY (?workLabel)
pq:P54 wd:Q90.
?work wdt:P13 ?date.
FILTER(?work != wd:Q57)
}
ORDER BY (?dateadded)
LIMIT 12
''')
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
@ -157,13 +159,17 @@ def publishersindex():
@app.route("/selfpublishedindex")
def selfpublishedindex():
sparql.setQuery('''
SELECT ?work ?workLabel ?workAltLabel ?workDescription
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1;
wdt:P10 wd:Q71.
FILTER(?work != wd:Q57)
}
SELECT ?work ?workLabel ?image ?date
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1;
wdt:P10 wd:Q71.
OPTIONAL {?work p:P30 ?statement.
?statement ps:P30 ?image;
pq:P54 wd:Q90.}
OPTIONAL { ?work wdt:P13 ?date. }
FILTER(?work != wd:Q57)
}
''')
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
@ -173,16 +179,21 @@ def selfpublishedindex():
@app.route("/zinesindex")
def zinesindex():
sparql.setQuery('''
SELECT ?work ?workLabel ?workAltLabel ?workDescription
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1;
wdt:P16 wd:Q152.
FILTER(?work != wd:Q57)
}
SELECT ?work ?workLabel ?image ?date
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?work wdt:P1 wd:Q1;
wdt:P10 wd:Q71.
OPTIONAL {?work p:P30 ?statement.
?statement ps:P30 ?image;
pq:P54 wd:Q90.}
OPTIONAL { ?work wdt:P13 ?date. }
FILTER(?work != wd:Q57)
}
''')
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
print(results)
return render_template('zinesindex.html', results=results)

2
static/css/style.css

@ -701,7 +701,7 @@ div#home-top-div{
animation-fill-mode: forwards;
animation-direction: normal;
animation-timing-function: linear; /* or ease*/
opacity: 0.4;
opacity: 0.4; /* 0.3 */
}
#home-top-div img:nth-of-type(even) { }

3
templates/home.html

@ -33,8 +33,7 @@
</div>
<div id="wrapper-vid">
<video preload="meta" autoplay="" loop="">
<source src="{{ url_for('static', filename='/vid/archive-links-video-temp.mp4') }}" type="video/mp4">
<source src="{{ url_for('static', filename='/vid/DAAP_video_update.mp4') }}" type="video/mp4">
</video>
</div>
</div>

3
templates/layout.html

@ -13,7 +13,8 @@
<div id="header">
<div id="animatedlogo">
<img src="{{ url_for('static', filename='/imgs/Logos/DAAP BR square logo -Animated Image (Small).gif') }}">
<a href="{{ url_for('home') }}">
<img src="{{ url_for('static', filename='/imgs/Logos/DAAP BR square logo -Animated Image (Small).gif') }}"></a>
</div>
<div id="title-nav">
<div id="header-top">

14
templates/tutorials.html

@ -1,15 +1,13 @@
{% extends "layout.html" %}
{% block content %}
<div id="tutorials-intro">
<h3>TUTORIALS</h3>
<p>Tutorials page upcoming</p>
</div>
<div id="tutorials-content">
<div id="tutorials-content-left"></div>
<div id="tutorials-content-right"></div>
</div>
{{ text }}
<style type="text/css">
div#toc{
display: none
}
</style>
{% endblock content %}
Loading…
Cancel
Save