diff --git a/webroot/config.php b/webroot/config.php index 6e5f9e4b8c078001564e2213c637b0e81b469d1b..6a1eefdf3d6fd7b10244ebe824b6151bf1839bfb 100644 --- a/webroot/config.php +++ b/webroot/config.php @@ -8,13 +8,14 @@ $widgets = array( //array("widget_name", "style_name", position_x, position_y, size_x, size_y); array("Logo", "widget", 0,0, 2,1), - array("ZoneOffen", "widget_dark", 4,0, 2,1), + array("Clock", "widget", 2,0, 2,1), + array("ZoneOffen", "widget", 4,0, 2,1), array("Prepaid", "widget_light", 0,1, 2,7), array("Jukezone", "widget_dark", 4,1, 2,5), array("Abfahrtsmonitor", "widget_light", 2,1, 2,3), - array("RSSFeed", "widget_light", 0,8, 3,2), + array("RSSFeed", "widget_dark", 0,8, 3,2), array("Wettervorhersage", "widget_light", 3,8, 1,2), array("TwitterWall", "widget_light", 2,4, 2,4), diff --git a/webroot/css/widget.css b/webroot/css/widget.css index 30d6cc11c2ba6a6dd7d27a8a6fca13562227807f..eb72ad7f32f13dbd37744278f6cc2aad9ae9ca85 100755 --- a/webroot/css/widget.css +++ b/webroot/css/widget.css @@ -1,4 +1,82 @@ .widget, .widget td, .widget div { font-family: inherit; - color:#000000; + color:#ffffff; } + +.widget .box { + background-color:#261C13; + border: 1px dashed #F2EFE5; + font-family: inherit; + color:#ffffff; + margin: 10; + position:relative; +} + +.widget h1 { + margin-top: 10; + margin-left: 10; + margin-bottom: 0; + padding: 0; + font-family: inherit; + font-size: 1.0em; +} +.widget h2 { + margin: 0; + padding: 0; + font-family: inherit; + font-size: 0.8em; + color: #dddddd; +} +.widget h3 { + margin: 0; + padding: 0; + font-family: inherit; + font-size: 0.6em; + color: #bbbbbb; +} + +.widget ul { + background-color:#261C13; + margin: 0; + padding: 0; + list-style: none; + overflow:hidden; + position:relative; + height:auto; +} +.widget li { + background-color:#261C13; + float: left; + border-bottom: 1px dashed #F2EFE5; + width: 100%; + color: #999999; +} +.widget li img { + padding: 4; +} + +.widget a, .widget a:hover, .widget a:visited, .widget a:active { + text-decoration:none; + font-family: inherit; + font-size: 1em; + font-style: normal; + color: #aaaaaa; +} + +.widget img +{ + float:left; +} + +.widget .button +{ + display: inline; + border: 1px dashed #F2EFE5; + background-color:#2E241B; + margin: 0; + padding: 10; + text-align: center; + vertical-align: middle; + font-size: 1.4em; +} + diff --git a/webroot/widgets/Clock/Clock.js b/webroot/widgets/Clock/Clock.js new file mode 100644 index 0000000000000000000000000000000000000000..00b96f73f080c01dc1feb06dfbf7aa5225c5f1e0 --- /dev/null +++ b/webroot/widgets/Clock/Clock.js @@ -0,0 +1,18 @@ +function updateClock() { + var time = new Date(); + var hours = time.getHours(); + var minutes = time.getMinutes(); + + if (hours < 10) hours = "0" + hours; + if (minutes < 10) minutes = "0" + minutes; + $("#Clock").html(hours + ":" + minutes); +} + +$(document).ready(function() + { + addFunctionToMinuteTimer(updateClock); + updateClock(); + } +); + + diff --git a/webroot/widgets/Clock/Clock.php b/webroot/widgets/Clock/Clock.php new file mode 100644 index 0000000000000000000000000000000000000000..d23e235c9df46d5eafcc8e57d772615e857f2c09 --- /dev/null +++ b/webroot/widgets/Clock/Clock.php @@ -0,0 +1,22 @@ +<?php + +require_once 'widgets/iWidget.php'; + +class Clock implements iWidget +{ + public function __construct($width, $height) + { + + } + + public function giveOutput() + { + $widgetOutput = '<script src="widgets/Clock/Clock.js" type="text/javascript"></script>'."\n"; + $widgetOutput .= '<h1>Uhrzeit:</h1>'."\n"; + $widgetOutput .= '<center><div id="Clock" class="box" style="font-size:5em;">00:00</div></center>'."\n"; + + return $widgetOutput; + } +} + +?>