aboutsummaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorMaZderMind2014-11-07 00:11:21 +0100
committerMaZderMind2014-11-07 00:17:40 +0100
commit5704413298c15cb05e0a55dbaff0274da01ef39a (patch)
tree9ac56ca3b268319cb41505ff833bf91735d606d8 /template
parentdb0a85ea97096af4529b0ea3b903d182144c1310 (diff)
program snimation & styling
Diffstat (limited to 'template')
-rw-r--r--template/assemblies/program.phtml50
-rw-r--r--template/page.phtml1
2 files changed, 29 insertions, 22 deletions
diff --git a/template/assemblies/program.phtml b/template/assemblies/program.phtml
index 9575d8c..6eb418a 100644
--- a/template/assemblies/program.phtml
+++ b/template/assemblies/program.phtml
@@ -1,38 +1,44 @@
<?
-$room = 'Grossbaustelle BER';
-foreach($program[$room] as $event)
-{
- $width += intval(isset($event['duration']) ? $event['duration'] : 5);
-}
+foreach(reset($program) as $event)
+ $width += $event['duration'];
+
?>
+<div class="program scroll-container" data-offset="<?=h($GLOBALS['CONFIG']['SCHEDULE_OFFSET'])?>">
+ <div class="scroll-element">
+ <div class="now"><span>now</span></div>
+ <? foreach($program as $name => $events): ?>
+ <div class="room" style="width: <?=$width * $GLOBALS['CONFIG']['SCHEDULE_SCALE'] ?>px">
+ <? foreach($events as $event): ?>
-<div class="program">
- <div class="now">now</div>
- <div class="inner" style="width: <?=$width * $GLOBALS['CONFIG']['SCHEDULE_SCALE'] ?>px">
- <? foreach($program[$room] as $event): ?>
- <? if(@$event['special'] == 'daychange'): ?>
+ <div
+ class="block <?=h(@$event['special'] ?: 'event')?>"
+ style="width: <?=h($event['duration'] * $GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>px"
+ data-start="<?=intval($event['start'])?>"
+ data-end="<?=intval($event['end'])?>"
+ >
+ <? if(@$event['special'] == 'daychange'): ?>
- <div class="block daychange" style="width: <?=h($GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>px"></div>
+ <h3><?=h($event['title'])?></h3>
- <? elseif(@$event['special'] == 'gap'): ?>
+ <? elseif(@$event['special'] == 'gap'): ?>
- <div class="block daychange" style="width: <?=h($event['duration'] * $GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>px"></div>
+ <!--h3>Gap</h3-->
- <? elseif(@$event['special']): ?>
+ <? elseif(@$event['special'] == 'pause'): ?>
- <div class="block <?=h($event['special'])?>" style="width: <?=h($event['duration'] * $GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>px">
- <h3><?=h($event['title'])?></h3>
- </div>
+ <h3><?=h($event['title'])?></h3>
- <? else: ?>
+ <? else: ?>
- <div class="block event" style="width: <?=h($event['duration'] * $GLOBALS['CONFIG']['SCHEDULE_SCALE'])?>px">
- <h3><?=h($event['title'])?></h3>
- </div>
+ <h4><?=h(strftime('%H:%M', $event['start']))?>&nbsp;&ndash;&nbsp;<?=h(strftime('%H:%M', $event['end']))?></h4>
+ <h3><?=h($event['title'])?></h3>
- <? endif ?>
+ <? endif ?>
+ </div>
+ <? endforeach ?>
+ </div>
<? endforeach ?>
</div>
</div>
diff --git a/template/page.phtml b/template/page.phtml
index 2e5efa6..08271b1 100644
--- a/template/page.phtml
+++ b/template/page.phtml
@@ -33,6 +33,7 @@
<link type="text/css" rel="stylesheet" href="assets/css/lustige-styles.css" />
<script type="text/javascript" src="assets/js/lib/jquery.min.js"></script>
+ <script type="text/javascript" src="assets/js/lib/jquery.scrollTo.min.js"></script>
<script type="text/javascript" src="assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/lib/mediaelement-and-player.min.js"></script>
<script type="text/javascript" src="assets/js/lustiges-script.js"></script>