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

Collection view updated with non-working, experimental timeline.js

parent 80f48743
No related branches found
No related tags found
No related merge requests found
......@@ -31,51 +31,32 @@
<h1>{{first.main.label.value}} <span class="badge">{{ first.count.total.value }}</span></h1>
<p class="lead">{{ first.main.description.value }}</p>
<div id="timeline-embed"></div>
<script type="text/javascript">
var {{first.main.label.value}} = '{
"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%}
]
}
}';
var timeline_config = {
width: '100%',
height: '450',
source: '{{first.main.label.value}}',
//source: 'timeline.json',
embed_id: 'timeline-embed', //OPTIONAL USE A DIFFERENT DIV ID FOR EMBED
start_at_end: false, //OPTIONAL START AT LATEST DATE
start_at_slide: '1', //OPTIONAL START AT SPECIFIC SLIDE
start_zoom_adjust: '2', //OPTIONAL TWEAK THE DEFAULT ZOOM LEVEL
hash_bookmark: true, //OPTIONAL LOCATION BAR HASHES
debug: true, //OPTIONAL DEBUG TO CONSOLE
maptype: 'sterrain', //OPTIONAL MAP STYLE
lang: 'no', //OPTIONAL LANGUAGE
js: '{{lodspk.home}}js/TimelineJS/compiled/js/timeline-min.js', //OPTIONAL PATH TO JS
css: '{{lodspk.home}}js/TimelineJS/compiled/css/timeline.css' //OPTIONAL PATH TO CSS
}
</script>
<script type="text/javascript" src="{{lodspk.home}}js/TimelineJS/compiled/js/storyjs-embed.js"></script>
<!-- <div id="timeline-embed"></div> -->
<!-- BEGIN TimelineJS -->
<script>
var timeline_config = {
type: 'timeline',
width: '100%',
height: '450',
//source: 'test',
source: 'http://marcus.uib.no/instance/collection/diplomsamlingen.json',
embed_id: 'timeline-embed', //OPTIONAL USE A DIFFERENT DIV ID FOR EMBED
start_at_end: false, //OPTIONAL START AT LATEST DATE
start_at_slide: '1', //OPTIONAL START AT SPECIFIC SLIDE
start_zoom_adjust: '2', //OPTIONAL TWEAK THE DEFAULT ZOOM LEVEL
debug: true, //OPTIONAL DEBUG TO CONSOLE
css: '{{lodspk.home}}js/TimelineJS/compiled/css/timeline.css', //OPTIONAL PATH TO CSS
js: '{{lodspk.home}}js/TimelineJS/compiled/js/timeline-min.js' //OPTIONAL PATH TO JS
};
</script> <script type="text/javascript" src="{{lodspk.home}}js/TimelineJS/compiled/js/storyjs-embed.js"></script>
<!-- END TimelineJS -->
<h2>{% if lodspk.query %} / <small>"{{lodspk.query}}"</small> {%else%}{%endif%}</h2>
{% if lodspk.query %}
<ul class="list-unstyled">
......@@ -104,7 +85,7 @@
<ul class="list-unstyled">
{% for row in models.haspart %}
<li>
<strong><a href="{{ row.uri.value }}"><span class="glyphicon glyphicon-book"></span> {{row.label.value}}</a></strong> {% if row.classLabel %}<span class="label label-info">{{row.classLabel.value}}</span> {% endif %} {% if row.hasTranscription.value == "true" %}<span class="label label-primary">Transkribert</span>{% endif %} {% if row.hasPage.value == "true" %}<span class="label label-default">Faksimile</span>{% endif %}<br>
<strong><span class="glyphicon glyphicon-book"></span><a href="{{ row.uri.value }}"> {{row.label.value}}</a></strong><br>{% if row.classLabel %}<span class="label label-info">{{row.classLabel.value}}</span> {% endif %} {% if row.hasTranscription.value == "true" %}<span class="label label-primary">Transkribert</span>{% endif %} {% if row.hasPage.value == "true" %}<span class="label label-default">Faksimile</span>{% endif %}<br>
<p>{{row.description.value}}</p>
</li>
{% endfor %}
......
......@@ -2,14 +2,14 @@
"timeline":
{
"headline":"Diplomsamlingen - tidslinje",
"type":"default",
"type":"timeline",
"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%}
{%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}}",
......
File mode changed from 100644 to 100755
SELECT DISTINCT ?startDate ?media ?headline ?text ?thumbnail ?year ?month ?day WHERE {
SELECT DISTINCT ?media ?startDate ?headline ?text ?thumbnail ?year ?month ?day WHERE {
?media dct:isPartOf <{{uri}}> .
?media ubbont:hasPage/ubbont:hasThumbnail ?thumbnail;
?media ubbont:hasPage/ubbont:hasThumbnail ?thumbnail ;
dct:created ?startDate ;
rdfs:label ?headline ;
dct:description ?text .
......
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