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 59 additions and 57 deletions
...@@ -7,6 +7,7 @@ RewriteCond %{SCRIPT_FILENAME} !.*/index.php$ ...@@ -7,6 +7,7 @@ RewriteCond %{SCRIPT_FILENAME} !.*/index.php$
RewriteRule ^(.*)$ index.php?q=$1 [L] RewriteRule ^(.*)$ index.php?q=$1 [L]
AddType application/xml .dzi AddType application/xml .dzi
AddType text/plain .log AddType text/plain .log
AddType application/javascript .jsonp
## EXPIRES CACHING ## ## EXPIRES CACHING ##
<IfModule mod_expires.c> <IfModule mod_expires.c>
......
...@@ -216,6 +216,9 @@ class Utils{ ...@@ -216,6 +216,9 @@ class Utils{
case 'json': case 'json':
$ser = ARC2::getRDFJSONSerializer(); $ser = ARC2::getRDFJSONSerializer();
break; break;
case 'jsonp':
$ser = ARC2::getRDFJSONSerializer();
break;
case 'rdf': case 'rdf':
$ser = ARC2::getRDFXMLSerializer(); $ser = ARC2::getRDFXMLSerializer();
break; break;
......
...@@ -61,7 +61,8 @@ class StaticModule extends abstractModule{ ...@@ -61,7 +61,8 @@ class StaticModule extends abstractModule{
'css' => 'text/css', 'css' => 'text/css',
'js' => 'application/javascript', 'js' => 'application/javascript',
'json' => 'application/json', 'json' => 'application/json',
'nt' => 'text/plain', 'jsonp'=> 'application/javascript',
'nt' => 'text/plain',
'ttl' => 'text/turtle', 'ttl' => 'text/turtle',
'png' => 'image/png', 'png' => 'image/png',
'jpg' => 'image/jpeg', 'jpg' => 'image/jpeg',
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
</div> </div>
</div> </div>
</div>
</footer> </footer>
<script type="text/javascript"> <script type="text/javascript">
...@@ -96,7 +97,7 @@ $('.bs-sidebar').affix({ ...@@ -96,7 +97,7 @@ $('.bs-sidebar').affix({
offset: { offset: {
top: 0, top: 0,
bottom: function () { bottom: function () {
return (this.bottom = $('.footer').outerHeight(false)) return (this.bottom = $('.footer').outerHeight(false)+35)
} }
} }
}) })
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{{lodspk.title}}</title> <title>{{lodspk.title}}</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" type="image/x-icon" href="{{lodspk.home}}/img/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="{{lodspk.home}}/img/favicon.ico">
<!-- Latest compiled and minified CSS --> <!-- Latest compiled and minified CSS -->
...@@ -26,18 +27,22 @@ ...@@ -26,18 +27,22 @@
<meta name="author" content=""> <meta name="author" content="">
<!-- FACEBOOK OPEN GRAPH --> <!-- FACEBOOK OPEN GRAPH -->
<meta property=”og:title” content=”{{first.main.label.value}}”/> <meta property="og:title" content="{{first.main.label.value}}"/>
<meta property=”og:type” content=”article”/> <meta property="og:type" content="article"/>
<meta property=”og:description” content=”“/> {% for row in models.description %}
<meta property=”og:image” content=”{{ first.main.img.value }}”/> <meta property="og:description" content="{{ row.description.value }}"/>
<meta property=”og:url” content=”{{ uri }}”/> {% endfor %}
<meta property=”og:site_name” content=”Marcus”/> <meta property="og:image" content="{{ first.main.img.value }}"/>
<meta property="og:url" content="{{lodspk.local.curie}}"/>
<meta property="og:site_name" content="Marcus"/>
<!-- TWITTER CARD --> <!-- TWITTER CARD -->
<meta name=”twitter:card” content=”photo”> <meta name="twitter:card" content="photo">
<meta name=”twitter:url” content=”{{ uri }}“> <meta name="twitter:url" content="{{lodspk.local.curie}}">
<meta name=”twitter:description” content=”“> {% for row in models.description %}
<meta name=”twitter:image” content=”{{ first.main.img.value }}”> <meta name="twitter:description" content="{{ row.description.value }}">
{% endfor %}
<meta name="twitter:image" content="{{ first.main.img.value }}">
<script src="//code.jquery.com/jquery.js"></script> <script src="//code.jquery.com/jquery.js"></script>
<!-- <script type="text/javascript" src="{{lodspk.home}}js/jquery.js"></script> --> <!-- <script type="text/javascript" src="{{lodspk.home}}js/jquery.js"></script> -->
...@@ -51,9 +56,6 @@ ...@@ -51,9 +56,6 @@
<link rel="alternate" type="text/turtle" title="Turtle Version" href="{{lodspk.local.value}}.ttl" /> <link rel="alternate" type="text/turtle" title="Turtle Version" href="{{lodspk.local.value}}.ttl" />
<link rel="alternate" type="text/plain" title="N-Triples Version" href="{{lodspk.local.value}}.nt" /> <link rel="alternate" type="text/plain" title="N-Triples Version" href="{{lodspk.local.value}}.nt" />
<link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.local.value}}.json" /> <link rel="alternate" type="application/json" title="RDFJSON Version" href="{{lodspk.local.value}}.json" />
<style>
</style>
<script type="text/javascript" src="{{lodspk.home}}js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="{{lodspk.home}}js/bootstrap-typeahead.js"></script>
<script type="text/javascript"> <script type="text/javascript">
...@@ -72,7 +74,7 @@ ...@@ -72,7 +74,7 @@
window.location = obj.uri; window.location = obj.uri;
} }
}); });
$("input").on('keyup', function(){$("form").attr("action", 'http://marcus.uib.no/search/'+$(this).val())}); $(".header-search").on('keyup', function(){$("form").attr("action", 'http://marcus.uib.no/search/'+$(this).val())});
}); });
</script> </script>
...@@ -98,26 +100,7 @@ ...@@ -98,26 +100,7 @@
</button> </button>
<a class="navbar-brand" href="{{lodspk.home}}">{{lodspk.title}}</a> <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> <a class="nav-subtitle hidden-xs hidden-sm" href="{{lodspk.home}}"><small>Spesialsamlingene ved <br>Universitetet i Bergen</small></a>
</div> <div id="popover-beta-head" style="display: none;">
<nav class="collapse navbar-collapse">
<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> <ul class="dropdown-menu" aria-labelledby="browse1" role="meny">
{%include "../../includes/nav.inc"%}
</ul>
</li>
</ul>
<form class="navbar-form navbar-right" role="search" action="">
<div class="form-group">
<input type="text" data-provide="typeahead" class="typeahead form-control search-query" placeholder="Søk"/>
</div>
</form>
<div id="popover-beta-head" style="display: none;">
<strong>Marcus - Beta</strong> <strong>Marcus - Beta</strong>
</div> </div>
<div id="popover-beta-content" style="display: none;"> <div id="popover-beta-content" style="display: none;">
...@@ -136,6 +119,26 @@ ...@@ -136,6 +119,26 @@
} }
}); });
</script> </script>
</div>
<nav class="collapse navbar-collapse">
<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="#"> Manuskript- og librarsamlingen <span class="caret"></span></a>
<ul class="dropdown-menu" 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="">
<div class="form-group">
<input class="header-search" type="text" data-provide="typeahead" class="typeahead form-control search-query" placeholder="Søk"/>
</div>
</form>
<!-- <!--
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
......
<li><a href="{{ row.x.value }}"><span class="glyphicon glyphicon-user"></span> {{row.name.value}}</a><br /> <li><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-user"></span> {{row.label.value}}</a></li>
{% if row.imgUriUri.value %}
<a href="{{ row.imgUriUri.value }}"><img class="col-md-10 thumbnail" data-src="holder.js/300x200" src="{{row.depictionImage.value}}" alt=""></a>
{% endif %}
</li>
<form action="{{uri}}" method="POST"> <form action="{{lodspk.this.local}}" method="POST">
<div class="col-lg-6">
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" name="query">
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type="submit">Søk</button> <button class="btn btn-info" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</span> </span>
<input type="text" class="form-control" name="query">
</div><!-- /input-group --> </div><!-- /input-group -->
</div><!--col-lg-6-->
</form> </form>
SELECT DISTINCT ?title ?description ?identifier ?reference ?spatial WHERE { SELECT DISTINCT ?title ?description ?identifier ?reference ?spatial WHERE {
<{{ uri }}> ubbont:showWeb true ; <{{ uri }}> ubbont:showWeb true ;
dct:title ?title . rdfs:label ?title .
OPTIONAL { <{{ uri }}> dct:description ?description . } OPTIONAL { <{{ uri }}> dct:description ?description . }
OPTIONAL { <{{ uri }}> dct:identifier ?identifier . } OPTIONAL { <{{ uri }}> dct:identifier ?identifier . }
OPTIONAL { <{{ uri }}> dct:reference ?reference . } OPTIONAL { <{{ uri }}> dct:reference ?reference . }
......
SELECT DISTINCT ?place ?placeName ?lat ?long WHERE {
OPTIONAL { <{{ uri|deurifier }}> dct:spatial ?place . ?place skos:prefLabel ?placeName .
OPTIONAL { ?place geo:lat ?lat ; geo:long ?long .}}
}
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<ul class="places-inline-list"> <ul class="places-inline-list">
{% for row in models.places %} {% for row in models.places %}
<li><a href="{{ row.place.value }}" /><span class="glyphicon glyphicon-map-marker"></span> {{row.placeName.value}}</a></li> <li><a href="{{ row.uri.value }}" /><span class="glyphicon glyphicon-map-marker"></span> {{row.label.value}}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
{% for row in models.places %} {% for row in models.places %}
{% if row.long.value != null %} {% if row.long.value != null %}
L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.place.value }}\">{{row.placeName.value}}</a></b>").openPopup(); L.marker([{{ row.lat.value }}, {{ row.long.value }}]).addTo(map).bindPopup("<b><a href=\"{{ row.uri.value }}\">{{row.label.value}}</a></b>").openPopup();
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</script> </script>
......
SELECT DISTINCT ?title ?created ?available ?identifier ?hasLong WHERE { SELECT DISTINCT ?title ?created ?available ?identifier ?hasLong ?hasLong WHERE {
<{{ uri }}> rdfs:label|dct:title ?title . <{{ uri }}> rdfs:label|dct:title ?title .
OPTIONAL { <{{ uri }}> dct:identifier ?identifier . } OPTIONAL { <{{ uri }}> dct:identifier ?identifier . }
......
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 .}}
}
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