diff options
author | Jeroen Bensch <jeroen@44.no-reply.drupal.org> | 2001-04-15 01:54:22 +0000 |
---|---|---|
committer | Jeroen Bensch <jeroen@44.no-reply.drupal.org> | 2001-04-15 01:54:22 +0000 |
commit | 460706b9034b4f61b908448744e4e0eabf2469b7 (patch) | |
tree | cd1aeac46cecb133d23601a5b8d960867dcbf7d9 /themes | |
parent | 024c75e7205302a99a48710888f1b5cfb46345ab (diff) | |
download | brdo-460706b9034b4f61b908448744e4e0eabf2469b7.tar.gz brdo-460706b9034b4f61b908448744e4e0eabf2469b7.tar.bz2 |
Hey,
OK after a boring family 50 year marriage anniversary (what's the exact word...) of my grand-parents which lasted twelve hours (no computer in the mean time, ack) I got home and stared themeing. All I did in these three hours is fix the navigation box. In the code there was an attribute "selected" set in <option> main of the drop-down list. I copied that from linux.com... But now it seems that the option with selected appears as default in the list. So, when going to account it should be account appearing as default in the drop down list. But we load the same HTML for each page in Drupal. This caused Main to be "selected" for every page we load. That's where the problem was. So, how do we change that... After some time I went to irc.homelien.no #php (cool people by the way) and asked how I could get the URL the browser was currently on. They told me about $REQUEST_URI. OK... REQUEST_URI... Then the standard procedure followed when discovering something new. You tink that it returns the whole URL, but it doesn't only the last significant part (which is a good thing) After finding that out, you wonder why it still doesn't work, and it takes you some more time to find out that you have to globlify the variable $REQUEST_URI if you want to use it. OK, and after that it worked. :) So what I do now for every option in the list is: <?if ($REQUEST_URI == "/index.php") echo "selected"; ?> And this for every page we have. Houston we have a working drop-down list. :) Not only that I found out but also that NS 4.76 can't do CSS good. It just sucks actually, it can't even do a a:hover { color: <?php echo $color; ?> } That's one of the reasons Dries why you didn't notice much. It can't even do a a.active or a.visited either... (40 minutes and a NS 4.76-looking-nice theme later, happy Easter Dries :), it is 03.40, I should really start getting some normal hours again, school starts Tuesday...) OK Dries as you read, I added some twenty <font face="Helvetica">'s in the theme (NS 4.76 didn't seem to be able to do Arial) set the color links differently and hope that you like it a bit. I know the font is still a bit small, but if I do a +1 there it's huge in NS 6.01. But Dries, why don't you just back off from the NS 4.76 (there's a new version 4.77 btw) and get yourself something a bit more recent. You'll be astonished of how beautiful the wired actually is :) There is however still one pain in the ass. I can't the vertical spacer to be only one pixel in width. But I'll manage to get that right to eventually. OK, I am off to bed. Goodnight, and to all of you, a happy Easter (Google's cool too :))
Jeroen.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/yaroon/jeroen2.theme | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/themes/yaroon/jeroen2.theme b/themes/yaroon/jeroen2.theme index fff14603c..afa3eba4c 100644 --- a/themes/yaroon/jeroen2.theme +++ b/themes/yaroon/jeroen2.theme @@ -2,10 +2,10 @@ /********************************************************************* - Theme: try-out + Theme: Yaroon Author: Jeroen Bensch (Jeroen) E-mail: jeroen@drop.org - Description: Lots of tables again, argg... + Description: Rather cool theme with some colors, problems with NS 4.76 *********************************************************************/ @@ -13,6 +13,8 @@ function header() { + global $REQUEST_URI; + switch (rand(0,8)) { case 0: $color = "#c4a2a2"; break; case 1: $color = "#a2c4a7"; break; @@ -23,7 +25,6 @@ case 7: $color = "#383838"; break; default: $color = "#a3b1c7"; } - ?> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> --> @@ -32,44 +33,44 @@ <head> <title><?php echo variable_get(site_name, "drupal"); ?></title> <style type="text/css"> - <!-- - a { text-decoration: none; color: #24677f } - a.active { color: #24677f } - a.visited { color: #24677f } - a:hover { color: <?php echo $color; ?> } - td { font-family: Arial; font-size: 10pt } - .spacer1 { background-color: #000000 } + a { text-decoration: none; color: #24677f } + a.active { color: #24677f } + a.visited { color: #24677f } + a:hover { color: <?php echo $color; ?> } + td { font-family: Arial; font-size: 10pt } + .spacer1 { background-color: #000000 } .small { font-family: Arial; font-size: 10pt } - .box { font-size: 12pt } - --> + .box { font-size: 12pt } </style> <script language="JavaScript"> <!-- function do_nav() { - if (document.navmenu.sitedrop.options[document.navmenu.sitedrop.selectedIndex].value != "none") { - location = document.navmenu.sitedrop.options[document.navmenu.sitedrop.selectedIndex].value; + if (document.navform.navdrop.options[document.navform.navdrop.selectedIndex].value != "none") { + location = document.navform.navdrop.options[document.navform.navdrop.selectedIndex].value; } } --> </script> </head> - <body bgcolor="#878787" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> + <body bgcolor="#878787" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" link="#24677f" alink="#24677f" vlink="#24677f"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> - <td align="left" valign="middle" width="20%" heigth="5%" class="header"> + <td align="left" valign="middle" width="20%" class="header"> + <font face="Helvetica" size="+1"> <b><a href="http://drop.org/">drop.org</a></b> + </font> </td> <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> - <form name="navmenu" action="" method="get"> + <form name="navform" action="" method="get"> <td align="right" valign="top" width="80%"> - <select name="sitedrop" onChange="do_nav()" class="small"> - <option value="index.php" selected>Main</option> - <option value="account.php">Account</option> - <option value="module.php?mod=diary">Diary</option> - <option value="module.php?mod=book">Handbook</option> - <option value="submit.php">Submit news</option> - <option value="search">Search</option> + <select name="navdrop" onChange="do_nav()" class="small"> + <option value="index.php" <?php if ($REQUEST_URI == "/index.php") echo "selected"; ?>>Main</option> + <option value="account.php" <?php if ($REQUEST_URI == "/account.php") echo "selected"; ?>>Account</option> + <option value="module.php?mod=diary" <?php if ($REQUEST_URI == "/module.php?mod=diary") echo "selected"; ?>>Diary</option> + <option value="module.php?mod=book" <?php if ($REQUEST_URI == "/module.php?mod=book") echo "selected"; ?>>Handbook</option> + <option value="submit.php" <?php if ($REQUEST_URI == "/submit.php") echo "selected"; ?>>Submit news</option> + <option value="search.php" <?php if ($REQUEST_URI == "/search.php") echo "selected"; ?>>Search</option> </select> <noscript><input type="submit" value="Go!"></noscript> </td> @@ -88,6 +89,7 @@ ?> </td> + <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> <td align="center" valign="top" bgcolor="#f4f4f4" width="80%" height="100%"> <br /> @@ -114,8 +116,9 @@ <table border="0" cellpadding="0" cellspacing="1" width="95%" height="100%"> <tr> <td> - <a href="search.php?category=<?php echo urlencode($story->section); ?>"><img src="themes/jeroen2/images/<?php echo $img; ?>" border="0" /></a> <b style="font-size: 12pt"><?php echo check_output($story->title); ?></b> + <a href="search.php?category=<?php echo urlencode($story->section); ?>"><img src="themes/jeroen2/images/<?php echo $img; ?>" border="0" /></a> <font face="Helvetica"><b style="font-size: 12pt"><?php echo check_output($story->title); ?></b> <?php echo strtr(t("by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp), "small")); ?> + </font> </td> </tr> <tr><td bgcolor="<?php echo $color; ?>"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr> @@ -124,14 +127,14 @@ <?php - echo "<br />". check_output($story->abstract, 1) ."<br />"; + echo "<br /><font face=\"Helvetica\">". check_output($story->abstract, 1) ."<br />"; if ($reply && $story->body) - echo "<br />". check_output($story->body, 1) ."<br />"; + echo "<br />". check_output($story->body, 1) ."</font><br />"; echo" </td> </tr> <tr> <td align=\"right\"> - <font color=\"". $color ."\">"; + <font face=\"Helvetica\" color=\"". $color ."\">"; if (!$reply) echo "". theme_morelink($this, $story) .""; else @@ -157,7 +160,7 @@ <tr> <td class="box"> <img src="themes/jeroen2/images/square.gif" /> <b><?php echo check_output($comment->subject); ?></b> - <font size="-1"><?php echo strtr(t(" by %a on %b"), array("%a" => format_username($comment->userid), "%b" => format_date($comment->timestamp), "small")); ?></font> + <font face="Helvetica" size="-1"><?php echo strtr(t(" by %a on %b"), array("%a" => format_username($comment->userid), "%b" => format_date($comment->timestamp), "small")); ?></font> </td> <td align="right"><?php echo comment_moderation($comment); ?></td> </tr> @@ -198,13 +201,15 @@ <table width="90%" border="0" cellpadding="0" cellspacing="1"> <tr> - <td class="box"><img src="themes/jeroen2/images/square.gif" /> <b><?php echo $subject; ?></b></td> + <td class="box"><img src="themes/jeroen2/images/square.gif" /> <b><font face="Helvetica"><?php echo $subject; ?></font></b></td> </tr> <tr><td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /><br></td></tr> <tr> <td> <br /> + <font face="Helvetica"> <?php echo $content; ?> + </font> </td> </tr> <tr><td align="right" class="box"><img src="themes/jeroen2/images/<?php echo $img; ?>" /><br /> </td></tr> @@ -224,11 +229,16 @@ <tr><td colspan="3" class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr> <tr> <td align="left"> + <font face="Helvetica"> <a href="mailto:info@drop.org">info@drop.org</a> + </font> </td> + <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> <td align="right"> + <font face="Helvetica"> The weblog for a dynamic community powered by Drupal + </font> </td> </tr> </table> |