This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
infoskjerm2/slides/templates/index.html
T
2016-08-05 00:01:36 +02:00

300 lines
6.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% load staticfiles %}
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Slides</title>
<script type="text/javascript" src="{% static "js/jquery-1.4.2.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery-ui-1.8.4.custom.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.cycle.all.min.js" %}"></script>
<style type="text/css">
#slideshow iframe, img, #overlay {
position: absolute;
left: 0;
top: 0;
border: 0;
width: 100%;
height: 100%;
bottom: 0;
overflow: hidden;
}
img {
z-index: 8;
}
#overlay {
z-index: 9;
cursor: none;
}
body {
padding: 0;
margin: 0;
overflow: hidden;
background: black url('{% static "img/bannerindex-400.png" %}') no-repeat center center;
}
</style>
</head>
<body>
<div id="content">
<div id="slideshow">
<iframe></iframe>
<iframe></iframe>
</div>
<div id="overlay">&nbsp;</div>
</div>
<script type="text/javascript">
var slides = [
{
"Slide": {
"id": "52",
"title": "Neste arr. #2",
"url": "http://studentersamfundet.no/program/neste-arrangement/?page=2",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "137",
"slide_id": "52",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "53",
"title": "Neste arr. #3",
"url": "http://studentersamfundet.no/program/neste-arrangement/?page=3",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "138",
"slide_id": "53",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "54",
"title": "Neste arr. #4",
"url": "http://studentersamfundet.no/program/neste-arrangement/?page=4",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "139",
"slide_id": "54",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "55",
"title": "Neste arr. #5",
"url": "http://studentersamfundet.no/program/neste-arrangement/?page=5",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "140",
"slide_id": "55",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "80",
"title": "Tilfeldig flickr-bilde (blant de 100 nyeste)",
"url": "http://flickr-infoskjerm.neuf.no/?oldest=100",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "164",
"slide_id": "80",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "79",
"title": "Tilfeldig flickr-bilde",
"url": "http://flickr-infoskjerm.neuf.no/",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "163",
"slide_id": "79",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "66",
"title": "Én by – ett studentersamfund",
"url": "http://infoskjerm.neuf.no/files/en-by.php",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "151",
"slide_id": "66",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "67",
"title": "Dagens program",
"url": "http://studentersamfundet.no/infoskjerm/daglig-program/",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "152",
"slide_id": "67",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "68",
"title": "Twitter feed q=dns1813",
"url": "http://emneknagg.neuf.no/?q=@dns1813",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "153",
"slide_id": "68",
"start": "0",
"stop": "604800"
}
]
},
{
"Slide": {
"id": "75",
"title": "Become a member",
"url": "http://misund.at.neuf.no/member.html",
"thumbnail": "",
"enabled": "1",
"order": null,
"start": null,
"stop": null
},
"DisplayTime": [
{
"id": "160",
"slide_id": "75",
"start": "0",
"stop": "604800"
}
]
}
];
var count = 0;
$(function () {
$("#slideshow iframe, img, #overlay").each(function () {
$(this).height(window.innerHeight).width(window.innerWidth);
});
$("#slideshow").cycle({
fx: "none",
timeout: 20000,
speed: 2000,
after: function (currSlideElement, nextSlideElement) {
count++;
if (slides && slides.length) {
currSlideElement.src = slides[count % slides.length]['Slide']['url'];
}
}
});
$("#slideshow iframe").each(function () {
$("#slideshow").cycle('next');
});
});
function updateSlides() {
$.getJSON("/slides/slideshow", function (newslides) {
slides = newslides;
});
}
updateSlides();
setInterval(updateSlides, 120000);
if ($("img").length) {
setTimeout(function () {
$("img").hide("fast");
}, 5000);
}
setTimeout(function () {
// FIXME: navigate to /
window.location = "http://infoskjerm.neuf.no/slideshow";
}, 10 * 60 * 1000);
</script>
</body>
</html>