You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.4 KiB
HTML

<!doctype html>
<html lang="de">
<head>
<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">
<link rel="stylesheet" href="css/ds19.css">
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/Schedule.js"></script>
<title>Konferenz Wegweiser</title>
</head>
<body>
<div class="container h-100 w-100 fullscreen">
<div class="row">
<div class="col">
<h1>Konferenz Wegweiser</h1>
</div>
<div class="col">
<h1>
<span class="conf_title">loading schedule..</span>
<small>(<span class="conf_start"></span> - <span class="conf_end"></span>)</small>
</h1>
</div>
</div>
<div class="row">
<div class="col">
<h3>demnächst stattfindende Talks</h3>
</div>
</div>
<div class="row">
<div class="col">
<div class="card-deck talks">
</div>
</div>
</div>
<div class="row">
<div class="col-sm">
<h2>Plan</h2>
<img class="img-fluid" alt="Grundriss" src="img/zw.png"/>
</div>
<div class="col-sm">
<img class="img-fluid patch float-right" src="img/patchgehabt.svg"/>
</div>
</div>
</div>
<script>
$.when($.ready).then(function () {
let path = "./src/schedule.xml";
$.get(path, function (data) {
this.xml = new XMLSerializer().serializeToString(data);
//console.log(xml2json(this.xml));
// load your schedule
var scheduleXml = $($.parseXML(this.xml));
var s = new Schedule(scheduleXml);
// 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));
}
// output part of the schedule
$('.conf_title').html(s.getScheduleTitle());
$('.conf_start').html(s.getScheduleStart());
$('.conf_end').html(s.getScheduleEnd());
var events = s.getNextEvents();
for (var i = 0; i < events.length; i++) {
console.log(events[i]);
event = ` <div class="card">
<div class="card-title">
<h2> ${events[i].title} </h2>
</div>
<div class="card-body">
<p> ${events[i].abstract} </p>
</div>
<div class="card-footer">
<p class="ml-1">${(events[i].persons !== "\n") ? events[i].persons : "<br>"}</p>
<p>
<span class="float-left ml-1">${events[i].start}Uhr</span>
<span class="float-right mr-2">${events[i].duration}h</span>
</p>
</div>
</div>`;
$('.talks').append(event);
if (i >= 2) {
break;
}
}
});
})
</script>
</body>
</html>