Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stop abusing the current element of the page configuration, and inste…

…ad add a

proper option to set body classes if appropriate.
  • Loading branch information...
commit 0f25c08b5e159a628115f79c6fdfb08d83295b0d 1 parent f1f0406
@LawnGnome LawnGnome authored
View
4 cal.php
@@ -4,7 +4,7 @@
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
$site_header_config = array(
- "current" => "calendar",
+ "current" => "community",
"css" => array('calendar.css'),
);
@@ -56,7 +56,7 @@
// Try to load events for that day, and display them all
if ($events = load_events($date)) {
- $site_header_config = array('current' => 'calendar calendar-day') + $site_header_config;
+ $site_header_config = array('classes' => 'calendar calendar-day') + $site_header_config;
site_header("Events: ".date("F j, Y", $date), $site_header_config);
echo "<h2>", date("F j, Y", $date), "</h2>\n";
foreach ($events as $event) {
View
2  include/header.inc
@@ -80,7 +80,7 @@ if (isset($shortname) && $shortname) {
<?php endif ?>
</head>
-<body class="<?php print $curr; ?>">
+<body class="<?php print $curr; ?> <?php echo $classes; ?>">
<div id="head-beta-warning">
<div id="beta-warning">
View
2  include/layout.inc
@@ -814,12 +814,14 @@ function site_header_beta($title = '', $config = array())
"lang" => myphpnet_language(),
"current" => "",
"meta-navigation" => array(),
+ 'classes' => '',
);
$config += $defaults;
$lang = language_convert($config["lang"]);
$curr = $config["current"];
+ $classes = $config['classes'];
if (empty($title)) {
$title = "Hypertext Preprocessor";
View
14 styles/calendar.css
@@ -104,36 +104,36 @@
}
/* Single day view: let's try putting the events into columns. */
-section.calendar-day .vevent {
+.calendar-day .vevent {
float: left;
width: 33%;
margin-bottom: 1.5em;
}
-section.calendar-day .vevent:nth-child(3n+2) {
+.calendar-day .vevent:nth-child(3n+2) {
clear: left;
}
-section.calendar-day .vevent td {
+.calendar-day .vevent td {
background: #eee;
border-right: solid 2.5em white;
padding: 0.4em;
}
-section.calendar-day .vevent .url {
+.calendar-day .vevent .url {
border-bottom: solid 1px #99c;
color: #3f438d;
font-size: 1em;
}
-section.calendar-day .vevent .url b {
+.calendar-day .vevent .url b {
font-weight: bold;
}
-section.calendar-day .vevent tr.description td {
+.calendar-day .vevent tr.description td {
padding-top: 1.5em;
}
-section.calendar-day > br {
+.calendar-day section > br {
display: none;
}
Please sign in to comment.
Something went wrong with that request. Please try again.