event_view_small

This commit is contained in:
Rob 2019-09-22 12:23:00 +02:00
parent 521ace7a21
commit 87d3ff52e9
1 changed files with 36 additions and 15 deletions

View File

@ -85,12 +85,8 @@
$('.page'+num).fadeIn(500); $('.page'+num).fadeIn(500);
} }
function event_view(event, noTitle = false) function event_view(event)
{ {
if (noTitle === true){
event.abstract = '';
}
return ` <div class="card"> return ` <div class="card">
<div class="card-title"> <div class="card-title">
<h2> ${event.title} </h2> <h2> ${event.title} </h2>
@ -99,14 +95,8 @@
<p> ${event.abstract} </p> <p> ${event.abstract} </p>
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="row"> <h2>${(event.persons !== "\n") ? event.persons : "<br>"}</h2>
<div class="col ml-1"> <h2 class="col text-right roomname">${event.room}</h2>
<h2>${(event.persons !== "\n") ? event.persons : "<br>"}</h2>
</div>
<div class="col text-center roomname">
<h2>${event.room}</h2>
</div>
</div>
<p> <p>
<h2 class="float-left ml-1">${event.start}Uhr</h2> <h2 class="float-left ml-1">${event.start}Uhr</h2>
<h2 class="float-right mr-2">${event.duration}h</h2> <h2 class="float-right mr-2">${event.duration}h</h2>
@ -115,6 +105,37 @@
</div>`; </div>`;
} }
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 () { $.when($.ready).then(function () {
let path = "./schedule/schedule.xml"; let path = "./schedule/schedule.xml";
$.get(path, function (data) { $.get(path, function (data) {
@ -145,12 +166,12 @@
}); });
var eventObj = s.getEventsAllTracks(10); var eventObj = s.getEventsAllTracks(10);
eventObj.events.forEach(event => { eventObj.events.forEach(event => {
$('.talks_overview').append(event_view(event, true)); $('.talks_overview').append(event_view_small(event, true));
}); });
// change screen after 20Sek and 40Sek // change screen after 20Sek and 40Sek
setTimeout(function () { setTimeout(function () {
setPage(1); setPage(3);
}, 1); }, 1);
setTimeout(function () { setTimeout(function () {