[Xfce4-commits] <www:nick/gettext> Fix special css for frontpage.
Nick Schermer
noreply at xfce.org
Thu Mar 24 21:54:02 CET 2011
Updating branch refs/heads/nick/gettext
to e86852b52f03d75ad1c18d9312051e39bfe0f7dc (commit)
from 337189cbc506443b7dbfbf509d3ee3cffa9a5c2a (commit)
commit e86852b52f03d75ad1c18d9312051e39bfe0f7dc
Author: Nick Schermer <nick at xfce.org>
Date: Thu Mar 24 21:52:28 2011 +0100
Fix special css for frontpage.
index.php | 4 ++++
pages/footer.php | 2 +-
pages/header.php | 2 +-
style/base.css | 3 +--
style/home.css | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/index.php b/index.php
index 79bb193..e1756d9 100644
--- a/index.php
+++ b/index.php
@@ -37,6 +37,10 @@ $navigation_file = dirname ($content_file) . '/nav.php';
if (is_file ($navigation_file))
$toc['filename'] = $navigation_file;
+/* unique class name for the page content */
+$page_class = str_replace (array ('pages/', '/'), array ('', '_'),
+ basename ($content_file, '.php'));
+
/* load the page header */
include ('pages/header.php');
diff --git a/pages/footer.php b/pages/footer.php
index 05c2d2b..be94529 100644
--- a/pages/footer.php
+++ b/pages/footer.php
@@ -1,10 +1,10 @@
- </div> <!-- page-contents -->
<div id="footer">
<hr />
<p>
<?php printf (R_('Copyright %s <a href="/about/credits">Xfce Development Team</a>. This page was last modified on %s.'), '2003-'.date ('Y'), $footer['mtime']) ?>
</p>
</div>
+ </div> <!-- page-contents -->
</div> <!-- page-wrap -->
</body>
diff --git a/pages/header.php b/pages/header.php
index 42d7591..61e6b86 100644
--- a/pages/header.php
+++ b/pages/header.php
@@ -130,4 +130,4 @@ else
echo '</div>';
}
?>
- <div id="page-contents">
+ <div id="page-contents" class="page_contents file_<?php echo $page_class ?>">
diff --git a/style/base.css b/style/base.css
index a50a905..ce58e26 100644
--- a/style/base.css
+++ b/style/base.css
@@ -14,7 +14,7 @@ body {
max-width: 1100px;
}
-#page-contents {
+.page_contents {
margin-right: 205px;
}
@@ -86,7 +86,6 @@ body {
color: #999;
font-size: small;
margin-bottom: 5em;
- margin-right: 205px;
}
#footer hr {
diff --git a/style/home.css b/style/home.css
index 8643ef8..debb648 100644
--- a/style/home.css
+++ b/style/home.css
@@ -1,5 +1,5 @@
-#page-contents, #footer {
+.file_frontpage {
margin-right: 0;
}
More information about the Xfce4-commits
mailing list