Browse Source

daap with browse archive and categories and subcategories and also homepage

master
jules 4 years ago
parent
commit
965d22d0e4
  1. 3
      daapinterface.py
  2. 78
      templates/--layout.html
  3. 4
      templates/artistsindex.html
  4. 6
      templates/browsethearchive.html
  5. 20
      templates/layout.html
  6. 4
      templates/publishersindex.html
  7. 4
      templates/selfpublishedindex.html
  8. 4
      templates/zinesindex.html

3
daapinterface.py

@ -70,7 +70,7 @@ ORDER BY (?workLabel)
publication_date = publication["date"]["value"] publication_date = publication["date"]["value"]
if "image" in publication: if "image" in publication:
publication_image = publication["image"]["value"] publication_image = publication["image"]["value"]
return render_template('browsethearchive.html', results=results) return render_template('home.html', results=results)
@app.route("/browsethearchive") @app.route("/browsethearchive")
@ -133,6 +133,7 @@ def artistsindex():
''') ''')
sparql.setReturnFormat(JSON) sparql.setReturnFormat(JSON)
results = sparql.query().convert() results = sparql.query().convert()
print(results)
return render_template('artistsindex.html', results=results) return render_template('artistsindex.html', results=results)
######################### PUBLISHERS INDEX ######################### PUBLISHERS INDEX

78
templates/--layout.html

@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>D.A.A.P</title>
<link rel="stylesheet" href="{{ url_for('static', filename='/css/style.css') }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
</head>
<body>
<div id="header">
<div id="header-top">
<div id="animatedlogo">
<img src="{{ url_for('static', filename='/imgs/Logos/DAAP BR square logo -Animated Image (Small).gif') }}">
</div>
<div id="header-title">
<a href="{{ url_for('home') }}">DIGITAL ARCHIVE OF ARTISTS' PUBLISHING</a>
</div>
<div id="header-keyword-search">
<span>WEBSITE IN DEVELOPMENT</span>
</div>
</div>
<div id="navigation">
<div id="nav-about"><a href="{{ url_for('about') }}">About</a></div>
<div id="nav-browse-archive"><a href="{{ url_for('browsethearchive') }}">Browse the archive</a></div>
<div id="nav-browse-category">Browse by category</div>
<div id="nav-search"><a target="_blank" href="http://query.daap.bannerrepeater.org">Search tools</a></div>
<div id="nav-tutorials">Tutorials</div>
<div id="nav-upload">Upload</div>
<div id="nav-login"><a target="_blank" href="https://daap.bannerrepeater.org/w/index.php">Log in</a></div>
</div>
</div>
{% block content %}
{% endblock content %}
<div id="footer">
<!-- <div id="footer-br"> -->
<div id="footer-title-br"><p>A project by:</p></div>
<div id="footer-img-br"><a target="_blank" href="https://www.bannerrepeater.org/"><img src="{{ url_for('static', filename='/imgs/Logos/Banner-Repeater-Logo.png') }}"></a></div>
<!-- </div> -->
<!-- <div id="footer-others"> -->
<div id="footer-title-others"><p>With support from:</p></div>
<div id="footer-img-others">
<div id="footer-img-wiki"><a href="_blank" target="https://wikimedia.org.uk/"><img src="{{ url_for('static', filename='/imgs/Logos/wikimedia_logo.png') }}"></a></div>
<div id="footer-img-lottery"><a href="https://www.artscouncil.org.uk/" target=""><img src="{{ url_for('static', filename='/imgs/Logos/Lottery-white on black.png') }}"></a></div>
</div>
<div id="footer-title-socials"><p>SOCIAL</p></div>
<div id="footer-socials-links">
<p><a target="_blank" href="https://www.facebook.com/BannerRepeater">Facebook</a></p>
<p><a target="_blank" href="https://twitter.com/BANNERREPEATER">Twitter</a></p>
<p><a target="_blank" href="https://www.instagram.com/bannerrepeater/">Instagram</a></p>
<p><a target="_blank" href="mailto:daap.community@disroot.org">Email address</a></p>
</div>
<div id="footer-title-contact"><p>EXPRESSION OF INTEREST</p></div>
<div id="footer-contact"><a target="_blank" href="https://forms.gle/4EFpkQ9AKzZpdUmF6"><div class="bluebutton" id="contactform">FILL UP CONTACT FORM<span></span></div></a></div>
</div>
</body>
</html>

4
templates/artistsindex.html

@ -15,8 +15,8 @@
<tbody> <tbody>
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<tr> <tr>
<th><a href="person?id={{ x['creators']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['creators']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th> <th><a href="person?id={{ x['creators']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x['creators']['value'] | replace('http://wikibase.svc/entity/', '') }}</a></th>
<th class="label"><a href="person?id={{ x['creators']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["creatorsLabel"]['value'] }}</a></th> <th class="label"><a href="person?id={{ x['creators']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x["creatorsLabel"]['value'] }}</a></th>
<th> <th>
{% if "creatorsAltLabel" in x %} {% if "creatorsAltLabel" in x %}
{{ x["creatorsAltLabel"]["value"] }} {{ x["creatorsAltLabel"]["value"] }}

6
templates/browsethearchive.html

@ -9,15 +9,15 @@
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<div class="browsethearchive-items"> <div class="browsethearchive-items">
{% if "image" in x %} {% if "image" in x %}
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'> <a href='/artwork?id={{ x["work"]["value"] | replace("http://wikibase.svc/entity/", "") }}'>
<img class="browsethearchive-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'> <img class="browsethearchive-imgs" src='{{ x["image"]["value"] | replace("wiki/File:","wiki/Special:Redirect/file/") }}'>
</a> <br> </a> <br>
{% else %} {% else %}
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'> <a href='/artwork?id={{ x["work"]["value"] | replace("http://wikibase.svc/entity/", "") }}'>
<img class="browsethearchive-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}"><br> <img class="browsethearchive-imgs" src="{{ url_for('static', filename='/imgs/Icons/placeholder_no-image2.png') }}"><br>
</a> </a>
{% endif %} {% endif %}
<a href='/artwork?id={{ x["work"]["value"] | replace("http://daap.bannerrepeater.org/entity/", "") }}'> <a href='/artwork?id={{ x["work"]["value"] | replace("http://wikibase.svc/entity/", "") }}'>
{{ x["workLabel"]["value"]}} {{ x["workLabel"]["value"]}}
</a> <br> </a> <br>
{% if "date" in x %} {% if "date" in x %}

20
templates/layout.html

@ -21,7 +21,7 @@
<a href="{{ url_for('home') }}">DIGITAL ARCHIVE OF ARTISTS' PUBLISHING</a> <a href="{{ url_for('home') }}">DIGITAL ARCHIVE OF ARTISTS' PUBLISHING</a>
</div> </div>
<div id="header-keyword-search"> <div id="header-keyword-search">
<span>WEBSITE IN DEVELOPMENT</span> <input type="text" id="fname" name="fname" value="Keyword search">
</div> </div>
</div> </div>
@ -29,11 +29,11 @@
<div id="navigation"> <div id="navigation">
<div id="nav-about"><a href="{{ url_for('about') }}">About</a></div> <div id="nav-about"><a href="{{ url_for('about') }}">About</a></div>
<div id="nav-browse-archive"><a href="{{ url_for('browsethearchive') }}">Browse the archive</a></div> <div id="nav-browse-archive"><a href="{{ url_for('browsethearchive') }}">Browse the archive</a></div>
<div id="nav-browse-category">Browse by category</div> <div id="nav-browse-category"><a href="{{ url_for('browsebycategory') }}">Browse by category</a></div>
<div id="nav-search"><a target="_blank" href="http://query.daap.bannerrepeater.org">Search tools</a></div> <div id="nav-search"><a href="{{ url_for('searchtools') }}">Search tools</a></div>
<div id="nav-tutorials">Tutorials</div> <div id="nav-tutorials"><a href="{{ url_for('tutorials') }}">Tutorials</a></div>
<div id="nav-upload">Upload</div> <div id="nav-upload"><a href="{{ url_for('upload') }}">Upload</a></div>
<div id="nav-login"><a target="_blank" href="https://daap.bannerrepeater.org/w/index.php">Log in</a></div> <div id="nav-login"><a href="https://daap.bannerrepeater.org/w/index.php?title=Special:UserLogin&returnto=Main+Page">Log in</a></div>
</div> </div>
</div> </div>
@ -46,13 +46,13 @@
<!-- <div id="footer-br"> --> <!-- <div id="footer-br"> -->
<div id="footer-title-br"><p>A project by:</p></div> <div id="footer-title-br"><p>A project by:</p></div>
<div id="footer-img-br"><a target="_blank" href="https://www.bannerrepeater.org/"><img src="{{ url_for('static', filename='/imgs/Logos/Banner-Repeater-Logo.png') }}"></a></div> <div id="footer-img-br"><img src="{{ url_for('static', filename='/imgs/Logos/Banner-Repeater-logo.png') }}"></div>
<!-- </div> --> <!-- </div> -->
<!-- <div id="footer-others"> --> <!-- <div id="footer-others"> -->
<div id="footer-title-others"><p>With support from:</p></div> <div id="footer-title-others"><p>With support from:</p></div>
<div id="footer-img-others"> <div id="footer-img-others">
<div id="footer-img-wiki"><a href="_blank" target="https://wikimedia.org.uk/"><img src="{{ url_for('static', filename='/imgs/Logos/wikimedia_logo.png') }}"></a></div> <div id="footer-img-wiki"><img src="{{ url_for('static', filename='/imgs/Logos/wikimedia_logo.png') }}"></div>
<div id="footer-img-lottery"><a href="https://www.artscouncil.org.uk/" target=""><img src="{{ url_for('static', filename='/imgs/Logos/Lottery-white on black.png') }}"></a></div> <div id="footer-img-lottery"><img src="{{ url_for('static', filename='/imgs/Logos/Lottery-white on black.png') }}"></div>
</div> </div>
@ -66,7 +66,7 @@
<div id="footer-title-contact"><p>EXPRESSION OF INTEREST</p></div> <div id="footer-title-contact"><p>EXPRESSION OF INTEREST</p></div>
<div id="footer-contact"><a target="_blank" href="https://forms.gle/4EFpkQ9AKzZpdUmF6"><div class="bluebutton" id="contactform">FILL UP CONTACT FORM<span></span></div></a></div> <div id="footer-contact"><a href=""><div class="bluebutton" id="contactform">FILL UP CONTACT FORM<span></span></div></a></div>
</div> </div>

4
templates/publishersindex.html

@ -15,8 +15,8 @@
<tbody> <tbody>
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<tr> <tr>
<th><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th> <th><a href="person?id={{ x['publishers']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x['publishers']['value'] | replace('http://wikibase.svc/entity/', '') }}</a></th>
<th class="label"><a href="person?id={{ x['publishers']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th> <th class="label"><a href="person?id={{ x['publishers']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x["publishersLabel"]['value'] }}</a></th>
<th> <th>
{% if "publishersAltLabel" in x %} {% if "publishersAltLabel" in x %}
{{ x["publishersAltLabel"]["value"] }} {{ x["publishersAltLabel"]["value"] }}

4
templates/selfpublishedindex.html

@ -15,8 +15,8 @@
<tbody> <tbody>
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<tr> <tr>
<th><a href="artwork?id={{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th> <th><a href="artwork?id={{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}</a></th>
<th class="label"><a href="artwork?id={{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["workLabel"]['value'] }}</a></th> <th class="label"><a href="artwork?id={{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x["workLabel"]['value'] }}</a></th>
<th> <th>
{% if "workAltLabel" in x %} {% if "workAltLabel" in x %}
{{ x["workAltLabel"]["value"] }} {{ x["workAltLabel"]["value"] }}

4
templates/zinesindex.html

@ -15,8 +15,8 @@
<tbody> <tbody>
{% for x in results['results']['bindings']%} {% for x in results['results']['bindings']%}
<tr> <tr>
<th><a href="artwork?id={{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}</a></th> <th><a href="artwork?id={{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}</a></th>
<th class="label"><a href="artwork?id={{ x['work']['value'] | replace('http://daap.bannerrepeater.org/entity/', '') }}">{{ x["workLabel"]['value'] }}</a></th> <th class="label"><a href="artwork?id={{ x['work']['value'] | replace('http://wikibase.svc/entity/', '') }}">{{ x["workLabel"]['value'] }}</a></th>
<th> <th>
{% if "workAltLabel" in x %} {% if "workAltLabel" in x %}
{{ x["workAltLabel"]["value"] }} {{ x["workAltLabel"]["value"] }}

Loading…
Cancel
Save