mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
'Why CSS?' episode 412: 'Doing more with less'. Less code, less HTML output, but more flexibility in the layout. Seperating content from design, yay :-)
svn path=/web/trunk/; revision=1482
This commit is contained in:
+6
-25
@@ -10,44 +10,25 @@ class htmlmenu {
|
||||
|
||||
function htmlmenu($name)
|
||||
{
|
||||
global $file_root;
|
||||
|
||||
echo "<table width=120 border=0 cellspacing=0 cellpadding=0>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <td class=topMenu><span class=menuTitle> $name</span></td>\n";
|
||||
echo " <td align=right valign=top class=topMenu><img src='".$file_root."/images/main_right_top.gif' alt='---'></td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<table width=120 border=0 cellspacing=0 cellpadding=2>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <td class=sideMenu><img src='".$file_root."/images/blank.gif' height=5 width=1 alt='---'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<div class='sideMenu'>";
|
||||
echo "<div class='header'><div class='headerRight'>".$name."</div></div>";
|
||||
}
|
||||
|
||||
/* add a table row */
|
||||
function add($name, $url = null)
|
||||
{
|
||||
echo "<tr><td class=sideMenu><span class=menuItem> ";
|
||||
echo '<div class="item">';
|
||||
if($url) {
|
||||
echo "<a href='$url' class=menuItem>$name</a>";
|
||||
echo "<a href='$url'>$name</a>";
|
||||
} else {
|
||||
echo "$name";
|
||||
}
|
||||
echo "</span></td></tr>\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function done($extra = "")
|
||||
{
|
||||
global $file_root;
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<table width=120 border=0 cellspacing=0 cellpadding=0>\n";
|
||||
echo "<tr>\n";
|
||||
echo " <td align=right class=sideMenu><img src='".$file_root."/images/main_right_bottom.gif' alt='---'></td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "</table>";
|
||||
echo $extra;
|
||||
echo "<br>\n";
|
||||
echo "<div class='footer'><div class='footerRight'> </div></div></div><br>\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user