Skip to content
Snippets Groups Projects
Commit f770cd29 authored by root's avatar root
Browse files

Loads of fixes. Redesign based around bibo:Document. Added search on person,...

Loads of fixes. Redesign based around bibo:Document. Added search on person, topic and collection. Timeline on collection started, but broken.
parent 5257413b
No related branches found
No related tags found
No related merge requests found
Showing
with 460 additions and 232 deletions
{
"timeline":
{
"headline":"Diplomsamlingen - tidslinje",
"type":"default",
"text":"<p>Se våre diplom på tidslinjen.</p>",
"asset": {
"media":"http://marcus.uib.no/instance/collection/diplomsamlingen"
},
"date": [
{%for row in models.timeline%}{%if !forloop.first && models.timeline|length > 1%},{%endif%}
{
"startDate":"{% if row.year %}{{row.year.value}}{% else %}1654{% endif %}{% if row.month %},{{row.month.value}}{% if row.day %}{% endif %},{{row.day.value}}{% endif %}",
"headline":"{{row.headline.value}}",
"text":"<p>{{row.text.value}}</p><p><a href=\"{{row.media.value}}\">Se mer</a></p>",
"asset": {
"media":"{{row.thumbnail.value}}",
"thumbnail":"{{row.thumbnail.value}}"
}
}{%endfor%}
]
}
}
\ No newline at end of file
SELECT DISTINCT ?startDate ?media ?headline ?text ?thumbnail ?year ?month ?day WHERE {
?media dct:isPartOf <{{uri}}> .
?media ubbont:hasPage/ubbont:hasThumbnail ?thumbnail;
dct:created ?startDate ;
rdfs:label ?headline ;
dct:description ?text .
BIND ( year(?startDate) AS ?year )
BIND ( month(?startDate) AS ?month )
BIND ( day(?startDate) AS ?day )
FILTER(regex(str(?thumbnail), "_1_thumb", "i"))
}
......@@ -2,22 +2,49 @@
<div class="container main-body">
<div class="row">
<div class="col-md-3">
<div class="sidebar hidden-xs hidden-sm affix">
<h4>Bla i:</h4>
<ul class="nav">
{%include "../../includes/nav.inc"%}
</ul>
<div class="bs-sidebar hidden-xs hidden-sm affix">
<form action="{{lodspk.this.local}}" method="POST">
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</span>
<input type="text" class="form-control" name="query" placeholder="Søk etter emne">
</div><!-- /input-group -->
</form>
<div class="browse-sidebar">
<h4>Bla i <span class="marcus-logo">Marcus</span></h4>
<ul class="list-unstyled">
{% include "../../includes/nav.inc" %}
</ul>
</div>
</div> <!-- End Sidebar -->
</div>
<div class="col-md-9">
<h1>Emner</h1>
<h1>Emner {% if lodspk.query %} / <small>"{{lodspk.query}}"</small> {%else%}/ <small>{{first.count.total.value}}</small>{%endif%}</h1>
{% if lodspk.query %}
<ul class="agent-list list-unstyled">
{% for row in models.search %}
<li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li>
{% endfor %}
</ul>
{% else %}
<ul class="nav nav-stacked">
{% for row in models.main %}
<li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-tag"></span> {{row.label.value}}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if lodspk.query %}
<p><span class="glyphicon glyphicon-arrow-left"></span> <a href="{{lodspk.this.local}}">Tilbake til emnelisten</a></p>
{% endif %}
</div>
</div>
</div>
......
SELECT (COUNT(?uri) AS ?total) WHERE {
?uri a skos:Concept .
}
SELECT DISTINCT ?uri ?label WHERE {
{% if lodspk.query %}
?uri text:query ( skos:prefLabel '{{lodspk.query}}') .
?uri a skos:Concept .
OPTIONAL { ?uri skos:prefLabel ?label . }
{% endif %}
}
LIMIT 100
......@@ -49,8 +49,14 @@
}
}
.bs-sidebar { margin-top: 20px;}
.bs-sidebar h3 {border-bottom: solid 1px #ddd; padding-bottom: 5px; font-size: 1.4em;}
.bs-sidebar p.maker { font-size: 1.3em; font-style: oblique; margin-bottom: 20px; }
.bs-sidebar ul span { color: black !important; padding-left: 2px; margin-right: 3px; }
.bs-sidebar ul.nav li a { padding: 10px 15px 10px 0; }
.marcus-logo { font-family: 'IM Fell Great Primer', serif; text-transform: uppercase; }
#resource-metadata { border-top: 1px solid #eee;}
#resource-metadata { }
/* HEADER */
.navbar-brand { font-family: 'IM Fell Great Primer', serif; font-size: 2.6em !important; text-transform: uppercase; color: white !important; }
......@@ -59,14 +65,16 @@
.beta { color: white !important; padding: 5px 15px 5px 15px; margin-bottom: 0 !important; background-color: #e05435; margin-top: 10px !important; font-style: italic; font-family: georgia, serif;}
/* MAP */
.map-wrap, #map-wrap { width: 100%; margin: 15px 0 15px 0; padding: 10px; background-color: #fffffa; border: 1px solid #ccc; -moz-box-shadow: 0px 0px 10px #bbb;
.map-wrap, #map-wrap { width: 100%; background-color: #fffffa; border: 1px solid #eee;
/*-moz-box-shadow: 0px 0px 10px #bbb;
-webkit-box-shadow: 0px 0px 10px #bbb;
box-shadow: 0px 0px 10px #bbb; clear: both;}
box-shadow: 0px 0px 10px #bbb; */
clear: both;}
#map {width: 100%; height: 450px;}
.no-map { background-image: url(../img/no-map-bg.png); }
/* DISQUS */
#disqus_thread { margin-top: 50px; padding-top: 20px; border-top: dotted 1px #bbb;}
#disqus_thread { margin-top: 50px; padding-top: 20px; border-top: dotted 1px #bbb; clear: both;}
/* CATALOGUE CARD */
......@@ -95,6 +103,11 @@ column-count:2;
.list-centered { text-align: center; }
.list-centered li { margin: 0 10px; }
/* DEPICTED */
#depicted { margin-bottom: 25px;}
#depicted .depicted { text-align: center; background-color: #eef9ff; padding: 20px 10px 10px 10px; }
#depicted .depicted img { width: 100px; margin-bottom: 10px; }
/* SPO view */
.full-metadata-div { margin: 15px 0 ;}
......@@ -105,7 +118,7 @@ figure { margin-left: 0; }
figcaption { font-size: 1.1em; }
.img-border { border: 1px solid #999; }
img.img-resource { margin: 10px 0 20px 0; border: #bbb solid 1px; padding: 10px; background-color: #fffffa; border: 1px solid #ccc; -moz-box-shadow: 0px 0px 10px #bbb; -webkit-box-shadow: 0px 0px 10px #bbb; box-shadow: 0px 0px 10px #bbb; }
.collection-logo { margin-bottom: 30px; }
/* iphone */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
img.img-resource { max-width: 98%; }
......@@ -224,7 +237,7 @@ footer {
/* DZI */
.dzi-wrap {
margin: 0; padding: 0 !important;
padding: 0 !important;
}
#dzi1 {
height: 800px;
......@@ -242,6 +255,11 @@ input[id="pagenum"] {
display: inline;
}
p.beta {
cursor: hand;
cursor: pointer;
}
/* SimpleCart.js styles
-------------------------------------------------- */
.item_Quantity {width: 40px;}
......
<!DOCTYPE html>
<html lang="no" prefix="og: http://ogp.me/ns#">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
......@@ -52,12 +53,14 @@
<link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.local.value}}.json" />
<style>
body {padding-top: 50px;}
/*
.wait{
background-image:url('{{lodspk.home}}img/wait.gif');
background-repeat:no-repeat;
padding-right:20px;
background-position: right;
}
*/
</style>
<!-- <link href="{{lodspk.home}}css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" media="screen" /> -->
......@@ -102,6 +105,26 @@
</button>
<a class="navbar-brand" href="{{lodspk.home}}">{{lodspk.title}}</a>
<a class="nav-subtitle hidden-xs hidden-sm" href="{{lodspk.home}}"><small>Spesialsamlingene ved <br>Universitetet i Bergen</small></a>
<div id="popover-beta-head" style="display: none;">
<strong>Marcus - Beta</strong>
</div>
<div id="popover-beta-content" style="display: none;">
<p>Marcus har fått en grundig overhaling og nettsidene kan ha noen feil. Vi jobber daglig med å gjøre sidene bedre.</p>
</div>
<p rel="popover" class="navbar-text pull-right hidden-xs hidden-sm beta">Beta</p>
<script>
$('.beta').popover({
placement : 'bottom',
html : true,
title: function() {
return $("#popover-beta-head").html();
},
content: function() {
return $("#popover-beta-content").html();
}
});
</script>
</div>
......@@ -109,11 +132,12 @@
<ul class="nav navbar-nav">
<!-- <li><a href="{{lodspk.home}}">Hjem</a></li> -->
<li class="dropdown">
<a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#">Meny <span class="caret"></span></a>
<a id="browse1" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#" href="#"> Manuskript- og librarsamlingen <span class="caret"></span></a>
<ul class="dropdown-menu list-unstyled" aria-labelledby="browse1" role="meny">
{%include "../includes/nav.inc"%}
</ul>
</li>
<li><a href="http://marcus.app.uib.no/">Billedsamlingen</a></li>
</ul>
<form class="navbar-form navbar-right" role="search" action="">
......@@ -129,25 +153,7 @@
}
</script>
<div id="popover-beta-head" style="display: none;">
<strong>Marcus - Beta</strong>
</div>
<div id="popover-beta-content" style="display: none;">
<p>Marcus har fått en grundig overhaling og nettsidene kan ha noen feil. Vi jobber daglig med å gjøre sidene bedre.</p>
</div>
<p rel="popover" class="navbar-text pull-right hidden-xs hidden-sm beta">Beta</p>
<script>
$('.beta').popover({
placement : 'bottom',
html : true,
title: function() {
return $("#popover-beta-head").html();
},
content: function() {
return $("#popover-beta-content").html();
}
});
</script>
</nav><!--/.nav-collapse -->
</header>
......@@ -270,7 +276,6 @@
<div class="row inline-browse-menu hidden-xs hidden-sm">
<ul class="list-unstyled list-centered list-inline">
<li><strong>Se også:</strong></li>
{%include "../includes/nav.inc"%}
</ul>
</div>
......
TimelineJS @ 974c19d1
Subproject commit 974c19d19bad13ba0003a7c9afec477cfea2548d
This diff is collapsed.
SELECT DISTINCT ?collection ?collectionName WHERE {
<{{ uri }}> dct:isPartOf ?collection .
OPTIONAL { ?collection dct:title ?collectionName . }
OPTIONAL { ?collection rdfs:label ?collectionName .}
}
SELECT DISTINCT ?uri ?label ?description ?logo WHERE {
<{{ uri }}> dct:isPartOf ?uri .
?uri a bibo:Collection .
OPTIONAL { ?uri dct:title ?label . }
OPTIONAL { ?uri rdfs:label ?label .}
OPTIONAL { ?uri dct:description ?description .}
OPTIONAL { ?uri foaf:logo ?logo .}
}
\ No newline at end of file
SELECT DISTINCT ?uri ?label ?img ?bio ?birthDate ?deathDate WHERE {
<{{ uri }}> foaf:depicts ?uri .
?uri foaf:name ?label .
OPTIONAL { ?uri foaf:img ?img . }
OPTIONAL { ?uri bio:biography ?bio . }
OPTIONAL { ?uri dbo:birthDate ?birthDate . }
OPTIONAL { ?uri dbo:deathDate ?deathDate . }
}
......@@ -4,14 +4,14 @@ SELECT DISTINCT ?hasPage ?imageLow ?imageHigh WHERE
<{{ uri }}> ubbont:hasPage ?hasPage .
?hasPage ubbont:hasRepresentation ?hasRepresentation .
?hasRepresentation ubbont:hasURI ?imageLow .
FILTER(regex(?imageLow, "low", "i"))
FILTER(regex(str(?imageLow), "low", "i"))
}
}
{ SELECT DISTINCT ?imageHigh ?hasPage WHERE {
<{{ uri }}> ubbont:hasPage ?hasPage .
?hasPage ubbont:hasRepresentation ?hasRepresentation .
?hasRepresentation ubbont:hasURI ?imageHigh .
FILTER(regex(?imageHigh, "high", "i"))
FILTER(regex(str(?imageHigh), "high", "i"))
}
}
}
......
SELECT DISTINCT ?title ?created ?date ?available ?identifier ?classLabel WHERE {
SELECT DISTINCT ?label ?alternative ?created ?date ?available ?identifier ?classLabel ?isbn ?hasLong WHERE {
<{{ uri }}> rdf:type ?class .
?class rdfs:label ?classLabel .
FILTER(langMatches(lang(?classLabel), ""))
OPTIONAL { <{{ uri }}> rdfs:label ?title . }
OPTIONAL { <{{ uri }}> dct:title ?title . }
OPTIONAL { <{{ uri }}> rdfs:label ?label . }
OPTIONAL { <{{ uri }}> dct:title ?label . }
OPTIONAL { <{{ uri }}> dct:alternative ?alternative . }
OPTIONAL { <{{ uri }}> dct:identifier ?identifier . }
OPTIONAL { <{{ uri }}> dct:created ?created .}
OPTIONAL { <{{ uri }}> dct:date ?date .}
OPTIONAL { <{{ uri }}> dct:available ?available .}
OPTIONAL { <{{ uri }}> bibo:isbn ?isbn . }
BIND ( EXISTS { <{{ uri }}> dct:spatial ?place . ?place geo:long ?long } AS ?hasLong )
}
SELECT DISTINCT ?maker ?makerName WHERE {
OPTIONAL { <{{ uri|deurifier }}> foaf:maker ?maker . ?maker foaf:name ?makerName .}
<{{ uri|deurifier }}> foaf:maker ?maker .
OPTIONAL { ?maker foaf:name ?makerName . }
OPTIONAL { ?maker ubbont:invertedName ?makerName . }
}
SELECT DISTINCT ?place ?placeName ?lat ?long WHERE {
OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?place . ?place rdfs:label ?placeName . OPTIONAL { ?place geo:lat ?lat ; geo:long ?long .}}
SELECT DISTINCT ?uri ?label ?lat ?long WHERE {
OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?uri . ?uri skos:prefLabel ?label .
OPTIONAL { ?uri geo:lat ?lat ; geo:long ?long .}}
}
SELECT DISTINCT ?uri ?label ?issn ?pages ?vol ?issue ?pageStart ?pageEnd WHERE {
<{{ uri }}> dct:isPartOf ?uri .
?uri a bibo:Journal .
OPTIONAL { ?uri dct:title ?label . }
OPTIONAL { ?uri rdfs:label ?label .}
OPTIONAL { <{{ uri }}> bibo:issn ?issn . }
OPTIONAL { <{{ uri }}> bibo:pages ?pages . }
OPTIONAL { <{{ uri }}> bibo:volume ?vol . }
OPTIONAL { <{{ uri }}> bibo:issue ?issue . }
OPTIONAL { <{{ uri }}> bibo:pageStart ?pageStart . }
OPTIONAL { <{{ uri }}> bibo:pageEnd ?pageEnd . }
}
SELECT DISTINCT ?uri ?label ?description ?logo WHERE {
<{{ uri }}> dct:publisher ?uri .
OPTIONAL { ?uri dct:title ?label . }
OPTIONAL { ?uri rdfs:label ?label .}
OPTIONAL { ?uri dct:description ?description .}
OPTIONAL { ?uri foaf:logo ?logo .}
}
SELECT DISTINCT ?subject ?subjectLabel WHERE {
SELECT DISTINCT ?uri ?label WHERE {
<{{ uri }}> dct:subject ?subject .
?subject skos:prefLabel ?subjectLabel ; a skos:Concept .
OPTIONAL { ?subject rdfs:label ?subjectLabel ; a skos:Concept .}
<{{ uri }}> dct:subject ?uri .
?uri skos:prefLabel ?label ; a skos:Concept .
OPTIONAL { ?uri rdfs:label ?label ; a skos:Concept .}
}
SELECT DISTINCT ?html ?xml WHERE
{
{ SELECT DISTINCT ?html WHERE {
<{{ uri }}> ubbont:hasTranscription ?transcription .
?transcription ubbont:hasRepresentation ?hasRepresentation .
?hasRepresentation ubbont:hasURI ?html .
FILTER(regex(str(?html), "html", "i"))
}
}
{ SELECT DISTINCT ?xml WHERE {
<{{ uri }}> ubbont:hasTranscription ?transcription .
?transcription ubbont:hasRepresentation ?hasRepresentation .
?hasRepresentation ubbont:hasURI ?xml .
FILTER(regex(str(?xml), "xml", "i"))
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment