schit/index.php

191 lines
6.1 KiB
PHP
Raw Permalink Normal View History

2019-09-20 17:33:00 +02:00
<?php
require('getSchedule.php');
?>
2019-07-14 16:04:45 +02:00
<!doctype html>
<html lang="de">
<head>
2019-07-14 16:04:45 +02:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="css/bootstrap.min.css">
2019-08-07 08:19:49 +02:00
<link rel="stylesheet" href="css/ds19.css">
2019-07-14 19:40:34 +02:00
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
2019-07-31 16:11:49 +02:00
<script type="text/javascript" src="js/Schedule.js"></script>
2019-07-14 16:04:45 +02:00
2019-07-31 23:49:24 +02:00
<title>Konferenz Wegweiser</title>
</head>
<body>
2019-09-20 23:42:49 +02:00
<div class="container w-100 fullscreen">
2019-09-20 22:14:57 +02:00
<div class="row">
<div class="col">
2019-09-20 23:42:49 +02:00
<h1>Konferenz Wegweiser</h1>
2019-09-20 22:14:57 +02:00
</div>
<div class="col">
2019-09-20 23:42:49 +02:00
<h1>
<span class="conf_title">loading schedule..</span>
</h1>
Fahrplan-Version: <span class="conf_version"></span>
2019-09-20 22:14:57 +02:00
</div>
</div>
2019-09-20 23:42:49 +02:00
2019-09-21 02:14:38 +02:00
<!-- PAGE 1 !-->
2019-09-20 23:42:49 +02:00
<div class="page page1">
<div class="row">
<div class="col">
<h3>nächste Talks:</h3>
</div>
</div>
<div class="row">
<div class="col">
2019-09-21 02:14:38 +02:00
<div class="card-deck talks talks_plan"></div>
2019-09-20 23:42:49 +02:00
</div>
</div>
2019-09-21 20:31:17 +02:00
<!--
2019-09-20 23:42:49 +02:00
<div class="row">
<div class="col-sm text-center mt-3">
<img class="img-fluid h-75" alt="Grundriss" src="img/plan4.svg" />
</div>
2019-09-20 22:14:57 +02:00
</div>
2019-09-21 20:31:17 +02:00
!-->
2019-09-10 20:55:37 +02:00
</div>
2019-07-31 23:49:24 +02:00
2019-09-20 23:42:49 +02:00
<!-- PAGE 2 !-->
2019-09-20 22:14:57 +02:00
2019-09-20 23:42:49 +02:00
<div class="page page2">
<div class="row mt-5">
<div class="col-sm text-center align-middle mt-3">
<img class="img-fluid h-100" alt="Grundriss" src="img/plan3.svg" />
</div>
</div>
2019-07-31 23:49:24 +02:00
</div>
2019-09-20 22:14:57 +02:00
2019-09-20 23:42:49 +02:00
<!-- PAGE 3 !-->
2019-09-20 22:14:57 +02:00
2019-09-20 23:42:49 +02:00
<div class="page page3">
2019-09-21 02:14:38 +02:00
<div class="row">
<div class="col">
<h3>nächste Talks:</h3>
2019-09-20 22:14:57 +02:00
</div>
2019-09-10 20:55:37 +02:00
</div>
2019-09-21 02:14:38 +02:00
<div class="card-columns talks talks_overview"></div>
2019-07-31 16:11:49 +02:00
</div>
2019-07-14 16:04:45 +02:00
<script>
2019-09-20 17:33:00 +02:00
setTimeout(function () {
location.reload();
}, 60000);
2019-09-20 22:14:57 +02:00
function setPage(num)
{
$('.page').hide();
$('.page'+num).fadeIn(500);
}
2019-09-22 12:23:00 +02:00
function event_view(event)
2019-09-21 00:41:20 +02:00
{
return ` <div class="card">
<div class="card-title">
<h2> ${event.title} </h2>
</div>
<div class="card-body">
<p> ${event.abstract} </p>
</div>
<div class="card-footer">
2019-09-22 12:23:00 +02:00
<h2>${(event.persons !== "\n") ? event.persons : "<br>"}</h2>
<h2 class="col text-right roomname">${event.room}</h2>
2019-09-21 00:41:20 +02:00
<p>
<h2 class="float-left ml-1">${event.start}Uhr</h2>
<h2 class="float-right mr-2">${event.duration}h</h2>
</p>
</div>
</div>`;
}
2019-09-22 12:23:00 +02:00
function event_view_small(event, noAbstract = false)
{
if (noAbstract === true){
event.abstract = '';
}
return ` <div class="card">
<div class="card-title ml-1">
<h4 class="font-weight-bold"> ${event.title} </h4>
</div>
<div class="card-title font-italic text-right mr-1">
<h4>${(event.persons !== "\n") ? event.persons : "<br>"}</h4>
</div>
<div class="card-footer">
<div class="col text-center roomname">
<div class="row">
<div class="col text-left">
<h4 class="">${event.start}Uhr</h4>
</div>
<div class="col">
<h4 class="roomname">${event.room}</h4>
</div>
<div class="col text-right">
<h4>${event.duration}h</h4>
</div>
</div>
</div>
</div>
</div>`;
}
$.when($.ready).then(function () {
2019-09-20 17:33:00 +02:00
let path = "./schedule/schedule.xml";
$.get(path, function (data) {
2019-07-31 23:49:24 +02:00
this.xml = new XMLSerializer().serializeToString(data);
2019-07-31 16:11:49 +02:00
2019-07-31 23:49:24 +02:00
// load your schedule
var scheduleXml = $($.parseXML(this.xml));
2019-07-31 16:11:49 +02:00
var s = new Schedule(scheduleXml);
2019-07-31 23:49:24 +02:00
// for testing purposes
// Example: ?faketime=2018-09-22T19:29:00
let faketime = new URL(window.location.href).searchParams.get("faketime");
if (faketime != null) {
s.setTimeTo(new Date(faketime));
2019-07-31 23:49:24 +02:00
}
2019-09-21 13:56:06 +02:00
s.getEvents();
2019-07-31 23:49:24 +02:00
// output part of the schedule
2019-09-20 17:33:00 +02:00
$('.conf_version').html(s.getScheduleVersion());
$('.conf_title').html(s.getScheduleTitle());
$('.conf_start').html(s.getScheduleStart());
$('.conf_end').html(s.getScheduleEnd());
2019-07-31 16:11:49 +02:00
2019-09-21 02:14:38 +02:00
// load events
2019-09-21 00:41:20 +02:00
var events = s.getNextEvents(3);
events.forEach(event => {
2019-09-21 02:14:38 +02:00
$('.talks_plan').append(event_view(event));
2019-09-21 00:41:20 +02:00
});
2019-09-21 02:14:38 +02:00
var eventObj = s.getEventsAllTracks(10);
eventObj.events.forEach(event => {
2019-09-22 12:23:00 +02:00
$('.talks_overview').append(event_view_small(event, true));
2019-09-21 00:41:20 +02:00
});
2019-07-31 16:11:49 +02:00
2019-09-21 02:14:38 +02:00
// change screen after 20Sek and 40Sek
2019-09-20 22:14:57 +02:00
setTimeout(function () {
2019-09-22 12:27:07 +02:00
setPage(1);
2019-09-20 22:14:57 +02:00
}, 1);
setTimeout(function () {
2019-09-21 02:31:43 +02:00
setPage(2);
2019-09-20 22:14:57 +02:00
}, 20000);
setTimeout(function () {
setPage(3);
}, 40000);
2019-07-31 16:11:49 +02:00
});
})
</script>
</body>
2019-07-14 16:04:45 +02:00
</html>