From 87a156a24453275fc27f1a3842a7c8bf0cdd6b0e Mon Sep 17 00:00:00 2001 From: ands <ands@andspad.(none)> Date: Sun, 5 Dec 2010 00:42:25 +0100 Subject: [PATCH] =?UTF-8?q?css=20Gr=C3=B6=C3=9Fenklassen=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/css/widget.css | 53 ++++++++++++++++++++++++++++++++++++++++-- webroot/index.php | 26 ++++++++------------- 2 files changed, 61 insertions(+), 18 deletions(-) diff --git a/webroot/css/widget.css b/webroot/css/widget.css index 20a47b8..1859c78 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 653348e..6619d25 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>"); } -- GitLab