diff --git a/webroot/css/widget.css b/webroot/css/widget.css index 20a47b81a3ff90000e43ab9ee7077d74569b5eb8..1859c7883ff48c275829da5e21491b5672601671 100644 --- a/webroot/css/widget.css +++ b/webroot/css/widget.css @@ -1,9 +1,58 @@ -.widget { +.widget_wide { border: 1px solid #F2EFE5; + background-color:#75695E; + font-family:Verdana; + color:#000000; + position:absolute; + width:800px; + height:380px; +} + +.widget_narrow { + border: 1px solid #F2EFE5; + background-color:#75695E; + font-family:Verdana; + color:#000000; + position:absolute; + width:380px; + height:800px; +} + +.widget_square { + border: 1px solid #F2EFE5; + background-color:#75695E; + font-family:Verdana; + color:#000000; + position:absolute; + width:380px; + height:380px; +} + +.widget_smallwide { + border: 1px solid #F2EFE5; + background-color:#75695E; + font-family:Verdana; + color:#000000; + position:absolute; + width:380px; + height:170px; +} + +.widget_smallnarrow { + border: 1px solid #F2EFE5; + background-color:#75695E; + font-family:Verdana; + color:#000000; + position:absolute; + width:170px; + height:170px; +} + +body, h1, h2 { font-family:Verdana; - color:#ffffff; background-color:#261C13; + color:#ffffff; } a { diff --git a/webroot/index.php b/webroot/index.php index 653348e837fbf52429e1b65d42c5effcbd63db1a..6619d25a09b2f87fb864ecf30d01e79f3c345306 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -1,37 +1,31 @@ <head> <link rel="stylesheet" type="text/css" href="css/widget.css" /> <script src="/js/jquery-1.4.4.js" type="text/javascript"></script> + <title>Marvin</title> </head> <body> + <h1>Marvin</h1> + <h2>Warpzone's widgetcenter</h2> <?php $widgets = array( array( - "ZoneOffen", // widget name - 16,16, // position - 320,320 // size + "ZoneOffen", // widget name + 16,16, // position + "widget_square" // css-class ) ); foreach ($widgets as $widgetconfig) { $widgetname = $widgetconfig[0]; - $widgetpositionx = $widgetconfig[1]; - $widgetpositiony = $widgetconfig[2]; - $widgetwidth = $widgetconfig[3]; - $widgetheight = $widgetconfig[4]; + $widgetposx = $widgetconfig[1]; + $widgetposy = $widgetconfig[2]; + $widgetclass = $widgetconfig[3]; include "widgets/$widgetname/$widgetname.php"; $widget = new $widgetname($widgetwidth,$widgetheight); $widgetoutput = $widget->giveOutput(); - print( - "<div - class='widget' - id='$widgetname' - style=' - position:absolute; - left:".$widgetpositionx."px; top:".$widgetpositiony."px; - width:".$widgetwidth."px; height:".$widgetheight."px;' - >"); + print("<div class='$widgetclass' id='$widgetname' style='left:".$widgetposx."px;top:".$widgetposy."px;'>"); print($widgetoutput); print("</div>"); }