From aec82ffde8ee450c9a7dd3fb74586b6df782b260 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 3 Dec 2020 15:57:35 +0100 Subject: [PATCH] corrections css from google doc --- daapinterface.py | 43 ++++++++++++++++++++++++++++++++++-------- static/css/style.css | 16 +++++++++------- templates/artwork.html | 3 +-- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/daapinterface.py b/daapinterface.py index cf5bc1f..4f68779 100644 --- a/daapinterface.py +++ b/daapinterface.py @@ -473,22 +473,49 @@ def artwork(): copiesincollection = sparql.query().convert() # related works + # sparql.setQuery(''' + # SELECT ?relatedWorks ?relatedWorksLabel ?image ?daterelatedWorks + # WHERE { + # { + # SELECT ?relatedWorks ?relatedWorksLabel (SAMPLE(?daterelatedWorks) AS ?daterelatedWorks) + # WHERE + # { VALUES ?work {wd:'''+artwork_id+'''} + # ?work wdt:P44 ?relatedWorks. + # OPTIONAL {?relatedWorks wdt:P13 ?daterelatedWorks.} + # SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } + # } + # GROUP BY ?relatedWorks ?relatedWorksLabel + # ORDER BY ?relatedWorksLabel + # } + # OPTIONAL {?relatedWorks wdt:P90 ?image.} + # } ''') sparql.setQuery(''' SELECT ?relatedWorks ?relatedWorksLabel ?image ?daterelatedWorks WHERE { { SELECT ?relatedWorks ?relatedWorksLabel (SAMPLE(?daterelatedWorks) AS ?daterelatedWorks) WHERE - { VALUES ?work {wd:'''+artwork_id+'''} - ?work wdt:P44 ?relatedWorks. - OPTIONAL {?relatedWorks wdt:P13 ?daterelatedWorks.} - SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } - } + { VALUES ?work {wd:'''+artwork_id+'''} + ?work wdt:P44 ?relatedWorks. + OPTIONAL {?relatedWorks wdt:P13 ?daterelatedWorks.} + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } + } + GROUP BY ?relatedWorks ?relatedWorksLabel + ORDER BY ?relatedWorksLabel + } + { + SELECT ?relatedWorks ?relatedWorksLabel (SAMPLE(?image) AS ?image) + WHERE + { VALUES ?work {wd:'''+artwork_id+'''} + ?work wdt:P44 ?relatedWorks. + OPTIONAL {?relatedWorks wdt:P90 ?image.} + SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } + } GROUP BY ?relatedWorks ?relatedWorksLabel ORDER BY ?relatedWorksLabel - } - OPTIONAL {?relatedWorks wdt:P90 ?image.} - } ''') + } + } + ''') sparql.setReturnFormat(JSON) relatedworks = sparql.query().convert() diff --git a/static/css/style.css b/static/css/style.css index 5ac25b8..12be54d 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -240,7 +240,7 @@ html { -webkit-box-sizing: inherit; -moz-box-sizing: inherit; box-sizing: inherit; - margin: 0 + /*margin: 0*/ } body { @@ -1489,7 +1489,7 @@ div.browsebycategory-categories:hover { display: grid; row-gap: 0rem; column-gap: 1rem; - grid-template-columns: repeat(19, 1fr); + grid-template-columns: repeat(18, 1fr); } .artwork-relatedwrapper,.artwork-copieswrapper, .artwork-lists { width: 100%; @@ -1548,7 +1548,7 @@ div.browsebycategory-categories:hover { .artwork-rightcolumn-top, .artwork-rightcolumn-bottom { margin: 0 0 0 0 !important; display: grid; - padding: 0 0 20px 0; + /*padding: 0 0 20px 0;*/ grid-template-columns: repeat(10, 1fr); column-gap: 1rem; } @@ -1637,7 +1637,7 @@ div.browsebycategory-categories:hover { .text-description { grid-column-start: 1; - grid-column-end: 6; + grid-column-end: 8; grid-row-start: 2; grid-row-end: 2; } @@ -1840,13 +1840,14 @@ img.artwork-relatedworks-imgs, .artwork-lists-img img{ margin: 0px; padding-bottom: 20px; padding-right: 15px; + padding-top: 10px; } .tns-nav > [aria-controls] { width: 16px; height: 16px; padding: 0; margin: 0 10px 0 0; - border-radius: 50%; +/* border-radius: 50%;*/ border: 1px solid #000; /*background: #FFF;*/ } @@ -2106,13 +2107,14 @@ div#tutorials-intro h3, div#tutorials-intro p { } #footer-title-others {text-align: right;} - #footer-title-contact {text-align: left;} + #footer-title-contact {text-align: left; padding-bottom: 20px;} #footer-socials {width: 100%; } - #footer-socials-links{ + #footer-socials-links { display: flex; flex-direction: row; justify-content: space-between; width: 100%; + padding-top: 10px; } a#footer-img-wiki { diff --git a/templates/artwork.html b/templates/artwork.html index 32c24ff..62b0b31 100644 --- a/templates/artwork.html +++ b/templates/artwork.html @@ -62,7 +62,7 @@ {% endif %} {% if "licenseLabel" in x %} -

{{ x['licenseLabel']['value'] }}

+

License: {{ x['licenseLabel']['value'] }}

{% endif %} @@ -70,7 +70,6 @@ {% endif %} -