Skip to content
Snippets Groups Projects
Commit 74062257 authored by ands's avatar ands
Browse files

added clockwidget, updated widget.css

parent 318af84f
No related branches found
No related tags found
No related merge requests found
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
$widgets = array( $widgets = array(
//array("widget_name", "style_name", position_x, position_y, size_x, size_y); //array("widget_name", "style_name", position_x, position_y, size_x, size_y);
array("Logo", "widget", 0,0, 2,1), 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("Prepaid", "widget_light", 0,1, 2,7),
array("Jukezone", "widget_dark", 4,1, 2,5), array("Jukezone", "widget_dark", 4,1, 2,5),
array("Abfahrtsmonitor", "widget_light", 2,1, 2,3), 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("Wettervorhersage", "widget_light", 3,8, 1,2),
array("TwitterWall", "widget_light", 2,4, 2,4), array("TwitterWall", "widget_light", 2,4, 2,4),
......
.widget, .widget td, .widget div { .widget, .widget td, .widget div {
font-family: inherit; 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;
}
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();
}
);
<?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;
}
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment