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

Dummy Layout Example

parent 75187ff4
No related branches found
No related tags found
No related merge requests found
body { background-color:#261C13; }
a { color:#0071BB; }
a:hover { color:#777878; }
td, div
{
font-family:Lucida Grande, Lucida Sans Unicode, Calibri, Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati;
......@@ -8,37 +9,18 @@ td, div
color:#000000;
}
.widget_wide, .widget_narrow, .widget_square, .widget_smallwide, .widget_smallnarrow {
.widget_4x2, .widget_2x4, .widget_2x2, .widget_2x1, .widget_1x2 {
position:absolute;
border: 1px solid #F2EFE5;
background-color:#75695E;
font-family:Lucida Grande, Lucida Sans Unicode, Calibri, Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati;
font-size:1.5em;
font-size:16pt;
color:#000000;
}
.widget_wide {
width:800px;
height:380px;
}
.widget_narrow {
width:380px;
height:800px;
}
.widget_square {
width:380px;
height:380px;
}
.widget_smallwide {
width:380px;
height:170px;
}
.widget_smallnarrow {
width:170px;
height:170px;
}
.widget_4x2 { width:800px; height:380px; }
.widget_2x4 { width:380px; height:800px; }
.widget_2x2 { width:380px; height:380px; }
.widget_2x1 { width:380px; height:170px; }
.widget_1x2 { width:170px; height:380px; }
webroot/img/warpzone.png

5.81 KiB

<head>
<link rel="stylesheet" type="text/css" href="css/widget.css" />
<title>Warpzone's Marvin</title>
<link rel="stylesheet" type="text/css" href="css/widget.css" />
<script src="js/jquery-1.4.4.js" type="text/javascript"></script>
<script src="js/marvin.js" type="text/javascript"></script>
<script src="js/marvin.js" type="text/javascript"></script>
</head>
<body>
<img src="img/warpzone.png">
<?php
$widgets = array(
array(
"ZoneOffen", // widget name
16,200, // position
"widget_smallwide" // css-class
)
);
<div style="position:absolute;left:40px;top:200px;">
<?php
$widgets = array(
//array("widget_name",x,y,"size_class");
array("Dummy",0,0,"widget_4x2"),
array("ZoneOffen",4,0,"widget_2x1"),
array("Dummy",4,1,"widget_2x4"),
array("Dummy",0,2,"widget_1x2"),
array("Dummy",1,2,"widget_2x2"),
array("Dummy",3,2,"widget_1x2"),
array("Dummy",0,4,"widget_2x1"),
array("Dummy",2,4,"widget_2x1")
);
foreach ($widgets as $widgetconfig)
{
$widgetname = $widgetconfig[0];
$widgetposx = $widgetconfig[1];
$widgetposy = $widgetconfig[2];
$widgetclass = $widgetconfig[3];
foreach ($widgets as $widgetconfig)
{
$widgetname = $widgetconfig[0];
$widgetposx = $widgetconfig[1] * 210;
$widgetposy = $widgetconfig[2] * 210;
$widgetclass = $widgetconfig[3];
include "widgets/$widgetname/$widgetname.php";
$widget = new $widgetname($widgetwidth,$widgetheight);
$widgetoutput = $widget->giveOutput();
print("<div class='$widgetclass' id='$widgetname' style='left:".$widgetposx."px;top:".$widgetposy."px;'>");
print($widgetoutput);
print("</div>");
}
?>
include_once "widgets/$widgetname/$widgetname.php";
$widget = new $widgetname($widgetwidth,$widgetheight);
$widgetoutput = $widget->giveOutput();
print("<div class='$widgetclass' id='$widgetname' style='left:".$widgetposx."px;top:".$widgetposy."px;'>");
print($widgetoutput);
print("</div>");
}
?>
</div>
</body>
<?php
require_once 'widgets/iWidget.php';
class Dummy implements iWidget
{
public function __construct($width, $height)
{
}
public function giveOutput()
{
$widgetOutput .= '<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">'."\n";
$widgetOutput .= ' <tr>'."\n";
$widgetOutput .= ' <td align="center"><b>Dummy</b></td>'."\n";
$widgetOutput .= ' </tr>'."\n";
$widgetOutput .= '</table>'."\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