com web/php: New home page layout. This initial commit focuses on implementing the look and layout of the home page mockup, not the functionality. We
still need to flesh out the footer, replace placeholder text and make content dynamic in places (e.g. elephpants, announcements, news, conferences,
user groups, etc.): images/home-sprites.png include/footer.inc include/header.inc include/layout.inc index-beta.php styles/home.css styles/theme.css
| From: | Paul Dragoonis | Date: | Thu, 07 Jul 2011 07:13:56 +0000 |
| Subject: | com web/php: New home page layout. This initial commit focuses on implementing the look and layout of the home page mockup, not the functionality. We still need to flesh out the footer, replace placeholder text and make content dynamic in places (e.g. elephpants, announcements, news, conferences, user groups, etc.): images/home-sprites.png include/footer.inc include/header.inc include/layout.inc index-beta.php styles/home.css styles/theme.css |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-23508@lists.php.net to get a copy of this message | ||
Commit: 416375d350c5778215a345ed8352283d9e8fadf4
Author: Stewart Lord <stewartlord@php.net> Thu, 7 Jul 2011 07:13:56 +0000
Parents: 314df6c99244ea6708a9adf558798760d1525c5b
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=416375d350c5778215a345ed8352283d9e8fadf4
Log:
New home page layout. This initial commit focuses on implementing the
look and layout of the home page mockup, not the functionality. We still
need to flesh out the footer, replace placeholder text and make content
dynamic in places (e.g. elephpants, announcements, news, conferences,
user groups, etc.)
Changed paths:
A images/home-sprites.png
M include/footer.inc
M include/header.inc
M include/layout.inc
M index-beta.php
M styles/home.css
M styles/theme.css
diff --git a/images/home-sprites.png b/images/home-sprites.png new file mode 100644 index 0000000..0eb1edb Binary files /dev/null and b/images/home-sprites.png differ diff --git a/include/footer.inc b/include/footer.inc index 3c33111..faf45ce 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -1,18 +1,20 @@ </section><!-- layout-content --> </div><!-- layout --> - <footer> - <ul class="footmenu copyright"> - <li><a href="/copyright.php">Copyright © 2001-2011 The PHP Group</a></li> - </ul> - <ul class="footmenu"> - <li><a href="/my.php">My PHP.net</a></li> - <li><a href="/contact.php">Contact</a></li> - <li><a href="/sites.php">Other PHP.net sites</a></li> - <li><a href="/mirrors.php">Mirror sites</a></li> - <li><a href="/privacy.php">Privacy policy</a></li> - </ul> - </footer> + <footer> + <div class="footer-content"> + <ul class="footmenu copyright"> + <li><a href="/copyright.php">Copyright © 2001-2011 The PHP Group</a></li> + </ul> + <ul class="footmenu"> + <li><a href="/my.php">My PHP.net</a></li> + <li><a href="/contact.php">Contact</a></li> + <li><a href="/sites.php">Other PHP.net sites</a></li> + <li><a href="/mirrors.php">Mirror sites</a></li> + <li><a href="/privacy.php">Privacy policy</a></li> + </ul> + </div> + </footer> </body> </html> diff --git a/include/header.inc b/include/header.inc index bf18fdd..e200c49 100644 --- a/include/header.inc +++ b/include/header.inc @@ -214,6 +214,16 @@ if (isset($shortname) && $shortname) { </div> </div> +<?php +if ($config['elephpants']) { + print "<div class='elephpants'><div class=images>"; + foreach ($elephpants as $image) { + print "<img src='$image'>"; + } + print "</div></div>"; +} +?> + <div id="layout"> <?php if (!empty($SIDEBAR_DATA)) { diff --git a/include/layout.inc b/include/layout.inc index b16e21e..3fe0069 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -821,6 +821,24 @@ function site_header_beta($title = '', $config = array()) $STATIC_ROOT = "/"; } + // Prepare elephpant photo-stream. + // FIXME: This needs to be dynamically generated (randomized?) + // and delivered in a single http request (e.g. using data:// + // uri scheme). + if ($config['elephpants']) { + $elephpants = array( + 'http://farm5.static.flickr.com/4111/5037379813_c727c94d83_s.jpg', + 'http://farm6.static.flickr.com/5046/5246051917_77bd222e31_s.jpg', + 'http://farm5.static.flickr.com/4116/4856848556_b8f64c1699_s.jpg', + 'http://farm5.static.flickr.com/4114/4934705762_e67cc7a5a3_s.jpg', + 'http://farm5.static.flickr.com/4081/4934704224_8f6d16ef1c_s.jpg', + 'http://farm5.static.flickr.com/4097/4795284575_16f7692c31_s.jpg', + 'http://farm5.static.flickr.com/4139/4795926308_4fa1038908_s.jpg', + 'http://farm5.static.flickr.com/4135/4795285595_ec6c565c10_s.jpg' + ); + $elephpants = array_merge($elephpants, $elephpants, $elephpants, $elephpants, $elephpants, $elephpants); + } + require dirname(__FILE__) ."/header.inc"; } function site_footer_beta($config = array()) diff --git a/index-beta.php b/index-beta.php index 6bc4205..752defe 100644 --- a/index-beta.php +++ b/index-beta.php @@ -49,6 +49,7 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-confs.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-news.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc'; +// Prepare news headings. $news = "<ul>"; foreach (print_news($NEWS_ENTRIES, "frontpage", 5, null, true) as $entry) { $news .= <<< EOT @@ -58,121 +59,112 @@ EOT; $news .= "</ul>"; $news .= '<p class="center"><a href="/archive/index.php">News Archive</a></p>'; -$MIRROR_IMAGE = ''; -// Try to find a sponsor image in case this is an official mirror -if (is_official_mirror()) { - - // Iterate through possible mirror provider logo types in priority order - $types = array("gif", "jpg", "png"); - while (list(,$ext) = each($types)) { - - // Check if file exists for this type - if (file_exists("backend/mirror." . $ext)) { - - // Add text to rigth sidebar - $MIRROR_IMAGE = "<h3 class=\"fat-border\">This mirror sponsored by:</h3>\n"; - - // Create image HTML code - $img = make_image( - 'mirror.' . $ext, - htmlspecialchars(mirror_provider()), - FALSE, - FALSE, - 'backend', - 0 - ); - - // Add size information depending on mirror type - if (is_primary_site() || is_backup_primary()) { - $img = resize_image($img, 125, 125); - } else { - $img = resize_image($img, 120, 60); - } - - // End mirror specific part - $MIRROR_IMAGE .= '<a href="' . mirror_provider_url() . '">' . - $img . "</a><br />\n"; - - // We have found an image - break; - } - } -} - -$confs = ""; -if (is_array($CONF_TEASER) && count($CONF_TEASER)) { - $categories = array("conference" => "Upcoming conferences", "cfp" => "Calling for papers"); - foreach($CONF_TEASER as $k => $a) { - if (is_array($a) && count($a)) { - $confs .= "<h4 class=\"fat-border\">" .$categories[$k]."</h4><ul>\n"; - $count = 0; - $a = preg_replace("'([A-Za-z0-9])([\s\:\-\,]*?)call for(.*?)$'i", "$1", $a); - foreach($a as $url => $title) { - if ($count++ >= 4) { - break; - } - $confs .= ' <li><a href="' . $url. '">' . $title. '</a></li>' . "\n"; - } - $confs .= "</ul>"; - } // if set - } -} - -/* {{{ Generate latest release info */ -/* Do we have any release candidates to brag about? */ -$RCS = array( - $PHP_5_4_RC => $PHP_5_4_RC_DATE, - $PHP_5_3_RC => $PHP_5_3_RC_DATE, -); -$rel = $rc = ""; -if (isset($RCS)) { - foreach ((array)$RCS as $r => $d) { - if ($r) { - $rc .= ' <li class="php5"><a href="http://qa.php.net/"><span class="release">' . "$r ($d)</span></a></li>\n"; - } - } -} - -if (!empty($rc)) { - $rel .= <<< EOT - <h3 class="fat-border"><a href="http://qa.php.net/rc.php">Release Candidates</a></h3> - <ol id="candidates"> -$rc - </ol> +// Prepare sidebar. +$sidebar = <<< EOT +<div class=home-sidebar> + <h2>Recent News</h2> + <ul> + <li>PHP 5.3.5 and 5.2.17 Released!</li> + <li>PHP 5.2.16 Released!</li> + <li>PHP 5.3.4 Released!</li> + </ul> + + <h2>Conferences</h2> + <ul> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + </ul> + + <h2>User Group Events</h2> + <ul> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + </ul> + + <h2>Thanks To</h2> + <ul> + <li><a href="http://www.easydns.com/?V=698570efeb62a6e2" title="DNS Hosting provided by easyDNS">easyDNS</a></li> + <li><a href="http://www.directi.com/">Directi</a></li> + <li><a href="http://promote.pair.com/direct.pl?php.net">pair Networks</a></li> + <li><a href="http://www.servercentral.net/">Server Central</a></li> + <li><a href="http://www.hostedsolutions.com/">Hosted Solutions</a></li> + <li><a href="http://www.spry.com/">Spry VPS Hosting</a></li> + <li><a href="http://ez.no/">eZ Systems</a> / <a href="http://www.hit.no/">HiT</a></li> + <li><a href="http://www.osuosl.org">OSU Open Source Lab</a></li> + <li><a href="http://www.yahoo.com/">Yahoo! Inc.</a></li> + <li><a href="http://www.binarysec.com/">BinarySEC</a></li> + <li><a href="http://www.nexcess.net/">NEXCESS.NET</a></li> + <li><a href="http://www.rackspace.com/">Rackspace</a></li> + <li><a href="http://www.eukhost.com/">EUKhost</a></li> + <li><a href="http://www.micfo.com/">micfo</a></li> + </ul> +</div> EOT; -} -$thanks = <<< EOT -<h3 class="fat-border"><a href="/thanks.php">Thanks To</a></h3> -<ul class="simple"> - <li><a href="http://www.easydns.com/?V=698570efeb62a6e2" title="DNS Hosting provided by easyDNS">easyDNS</a></li> - <li><a href="http://www.directi.com/">Directi</a></li> - <li><a href="http://promote.pair.com/direct.pl?php.net">pair Networks</a></li> - <li><a href="http://www.servercentral.net/">Server Central</a></li> - <li><a href="http://www.hostedsolutions.com/">Hosted Solutions</a></li> - <li><a href="http://www.spry.com/">Spry VPS Hosting</a></li> - <li><a href="http://ez.no/">eZ Systems</a> / <a href="http://www.hit.no/">HiT</a></li> - <li><a href="http://www.osuosl.org">OSU Open Source Lab</a></li> - <li><a href="http://www.yahoo.com/">Yahoo! Inc.</a></li> - <li><a href="http://www.binarysec.com/">BinarySEC</a></li> - <li><a href="http://www.nexcess.net/">NEXCESS.NET</a></li> - <li><a href="http://www.rackspace.com/">Rackspace</a></li> - <li><a href="http://www.eukhost.com/">EUKhost</a></li> - <li><a href="http://www.micfo.com/">micfo</a></li> -</ul> -EOT; - -/* }}} */ -// This goes to the left sidebar of the front page -$SIDEBAR_DATA = ' -<h3>Recent news</h3> -' . $news . ' -' . $MIRROR_IMAGE . ' -' . $rel . ' -' . $confs . ' -' . $thanks . ' -'; - +// Prepare announcements. +$announcements = " +<div class='announcements'> +Upcoming conferences: PHP North West, 2011 +</div> +"; + +// Prepare featured content. +$features = " +<div class=featured-content> + <div class='feature top-left'> + <span class=graphic></span> + <h2>Get Involved!</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='feature top-right'> + <span class=graphic></span> + <h2>Need Help?</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='separator'></div> + <div class='feature bottom-left'> + <span class=graphic></span> + <h2>PECL + PEAR</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='feature bottom-right'> + <span class=graphic></span> + <h2>Website Tips/Tricks</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <br style='clear: both;' /> +</div> +"; + +// Wrap announcements and features in a content element +$content = " +<div class='home-content'> + $announcements + $features +</div> +"; // Write out common header site_header("Hypertext Preprocessor", @@ -201,16 +193,15 @@ site_header("Hypertext Preprocessor", ), ), + 'elephpants' => true ) ); +// Print body of home page. +print $sidebar; +print $content; - -?> - - -<?php +// Print the common footer. site_footer( array("atom" => "/feed.atom") // Add a link to the feed at the bottom ); - diff --git a/styles/home.css b/styles/home.css index e7880ce..4b89c3d 100644 --- a/styles/home.css +++ b/styles/home.css @@ -162,21 +162,113 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 -webkit-border-radius: 5px; } -#confTeaser { - margin-right: 340px; - border: 1px solid #c3add9; - padding: 12px; +/* Main content area */ + +div.home-content { + width: 650px; + padding-top: 5px; } -#confTeaser td { - display: block; +/* Announcement Area */ + +.home .announcements { + width: 600px; + border: 1px solid #aaa; + background-color: #dfd; + border-radius: 5px; + padding: 15px; + text-align: center; + font-family: arial; + margin: 0 auto; } -#confTeaser td:first-child { - font-weight: bold; +/* 2x2 Featured Content Grid */ + +div.featured-content { + margin: 30px 0 30px 0; +} + +div.featured-content div.feature { + float: left; + width: 270px; + text-align: center; + padding: 10px 20px 20px 20px; +} + +div.featured-content div.top-left, +div.featured-content div.top-right { + padding-top: 0; +} + +div.featured-content div.top-left { + border-right: 1px solid #c3add9; +} + +div.featured-content div.bottom-left { + border-right: 1px solid #c3add9; +} + +div.featured-content div.separator { + float: left; + width: 630px; + margin-left: 10px; + border-top: 1px solid #c3add9; +} + +div.featured-content span.graphic { + display: inline-block; + width: 128px; + height: 128px; + background-image: url('../images/home-sprites.png'); } -.fat-border { - border-top: 10px solid #C3ADD9; - margin-top: 30px; +div.featured-content div.top-left span.graphic { + background-position: 0 0; } + +div.featured-content div.top-right span.graphic { + background-position: 0px -129px; +} + +div.featured-content div.bottom-left span.graphic { + background-position: 0px -258px; +} + +div.featured-content div.bottom-right span.graphic { + background-position: 0px -399px; +} + +div.featured-content div.feature h2 { + line-height: 1; + padding-bottom: .5em; +} + +div.featured-content p { + font-size: 1.1em; +} + +/* Right-hand sidebar */ + +div.home-sidebar { + float: right; + width: 250px; + padding: 5px 30px 20px 30px; + margin: 0 0 20px 20px; +} + +div.home-sidebar h2 { + border-top: 6px solid #c3add9; + font-size: 1.5em; + line-height: 100%; + padding: 5px 0 10px 0; + font-weight: normal; +} + +div.home-sidebar h2:first-child { + margin-top: 0; +} + +div.home-sidebar ul { + margin: 0 0 30px 0; + padding: 0; +} \ No newline at end of file diff --git a/styles/theme.css b/styles/theme.css index 323c82f..c46fc9c 100644 --- a/styles/theme.css +++ b/styles/theme.css @@ -472,6 +472,23 @@ aside.tips { display: block; } +/* Footer styling */ + +footer { + clear: both; + overflow: auto; + background-color: #333; + border-top: 12px solid #c3add9; + border-bottom: 12px solid #c3add9; + padding: 1.5em 0; + margin-bottom: 2em; +} + +footer .footer-content { + width: 960px; + margin: 0 auto; +} + footer .footmenu { float: right; } @@ -482,19 +499,34 @@ footer .footmenu li { display: inline; } -footer { - clear: both; - border-top: 3px solid #c3add9; - padding-top: 5px; -} - footer a { - color: #444; - border-color: #987db3; - font-weight: bold; + color: #ccc; margin: 0 8px; } -footer a:hover { - color: #000; +footer a:hover, +footer a:link, +footer a:visited { + color: #ccc; +} + + +/* Elephpant photo stream */ + +div.elephpants { + margin: auto; + overflow: hidden; + border-bottom: 12px solid #c3add9; } + +div.elephpants div.images { + height: 75px; + width: 3000px; + position: relative; + left: -1%; +} + +div.elephpants img { + width: 75px; + height: 75px; +} \ No newline at end of file
diff --git a/images/home-sprites.png b/images/home-sprites.png new file mode 100644 index 0000000..0eb1edb Binary files /dev/null and b/images/home-sprites.png differ diff --git a/include/footer.inc b/include/footer.inc index 3c33111..faf45ce 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -1,18 +1,20 @@ </section><!-- layout-content --> </div><!-- layout --> - <footer> - <ul class="footmenu copyright"> - <li><a href="/copyright.php">Copyright © 2001-2011 The PHP Group</a></li> - </ul> - <ul class="footmenu"> - <li><a href="/my.php">My PHP.net</a></li> - <li><a href="/contact.php">Contact</a></li> - <li><a href="/sites.php">Other PHP.net sites</a></li> - <li><a href="/mirrors.php">Mirror sites</a></li> - <li><a href="/privacy.php">Privacy policy</a></li> - </ul> - </footer> + <footer> + <div class="footer-content"> + <ul class="footmenu copyright"> + <li><a href="/copyright.php">Copyright © 2001-2011 The PHP Group</a></li> + </ul> + <ul class="footmenu"> + <li><a href="/my.php">My PHP.net</a></li> + <li><a href="/contact.php">Contact</a></li> + <li><a href="/sites.php">Other PHP.net sites</a></li> + <li><a href="/mirrors.php">Mirror sites</a></li> + <li><a href="/privacy.php">Privacy policy</a></li> + </ul> + </div> + </footer> </body> </html> diff --git a/include/header.inc b/include/header.inc index bf18fdd..e200c49 100644 --- a/include/header.inc +++ b/include/header.inc @@ -214,6 +214,16 @@ if (isset($shortname) && $shortname) { </div> </div> +<?php +if ($config['elephpants']) { + print "<div class='elephpants'><div class=images>"; + foreach ($elephpants as $image) { + print "<img src='$image'>"; + } + print "</div></div>"; +} +?> + <div id="layout"> <?php if (!empty($SIDEBAR_DATA)) { diff --git a/include/layout.inc b/include/layout.inc index b16e21e..3fe0069 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -821,6 +821,24 @@ function site_header_beta($title = '', $config = array()) $STATIC_ROOT = "/"; } + // Prepare elephpant photo-stream. + // FIXME: This needs to be dynamically generated (randomized?) + // and delivered in a single http request (e.g. using data:// + // uri scheme). + if ($config['elephpants']) { + $elephpants = array( + 'http://farm5.static.flickr.com/4111/5037379813_c727c94d83_s.jpg', + 'http://farm6.static.flickr.com/5046/5246051917_77bd222e31_s.jpg', + 'http://farm5.static.flickr.com/4116/4856848556_b8f64c1699_s.jpg', + 'http://farm5.static.flickr.com/4114/4934705762_e67cc7a5a3_s.jpg', + 'http://farm5.static.flickr.com/4081/4934704224_8f6d16ef1c_s.jpg', + 'http://farm5.static.flickr.com/4097/4795284575_16f7692c31_s.jpg', + 'http://farm5.static.flickr.com/4139/4795926308_4fa1038908_s.jpg', + 'http://farm5.static.flickr.com/4135/4795285595_ec6c565c10_s.jpg' + ); + $elephpants = array_merge($elephpants, $elephpants, $elephpants, $elephpants, $elephpants, $elephpants); + } + require dirname(__FILE__) ."/header.inc"; } function site_footer_beta($config = array()) diff --git a/index-beta.php b/index-beta.php index 6bc4205..752defe 100644 --- a/index-beta.php +++ b/index-beta.php @@ -49,6 +49,7 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-confs.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/pregen-news.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc'; +// Prepare news headings. $news = "<ul>"; foreach (print_news($NEWS_ENTRIES, "frontpage", 5, null, true) as $entry) { $news .= <<< EOT @@ -58,121 +59,112 @@ EOT; $news .= "</ul>"; $news .= '<p class="center"><a href="/archive/index.php">News Archive</a></p>'; -$MIRROR_IMAGE = ''; -// Try to find a sponsor image in case this is an official mirror -if (is_official_mirror()) { - - // Iterate through possible mirror provider logo types in priority order - $types = array("gif", "jpg", "png"); - while (list(,$ext) = each($types)) { - - // Check if file exists for this type - if (file_exists("backend/mirror." . $ext)) { - - // Add text to rigth sidebar - $MIRROR_IMAGE = "<h3 class=\"fat-border\">This mirror sponsored by:</h3>\n"; - - // Create image HTML code - $img = make_image( - 'mirror.' . $ext, - htmlspecialchars(mirror_provider()), - FALSE, - FALSE, - 'backend', - 0 - ); - - // Add size information depending on mirror type - if (is_primary_site() || is_backup_primary()) { - $img = resize_image($img, 125, 125); - } else { - $img = resize_image($img, 120, 60); - } - - // End mirror specific part - $MIRROR_IMAGE .= '<a href="' . mirror_provider_url() . '">' . - $img . "</a><br />\n"; - - // We have found an image - break; - } - } -} - -$confs = ""; -if (is_array($CONF_TEASER) && count($CONF_TEASER)) { - $categories = array("conference" => "Upcoming conferences", "cfp" => "Calling for papers"); - foreach($CONF_TEASER as $k => $a) { - if (is_array($a) && count($a)) { - $confs .= "<h4 class=\"fat-border\">" .$categories[$k]."</h4><ul>\n"; - $count = 0; - $a = preg_replace("'([A-Za-z0-9])([\s\:\-\,]*?)call for(.*?)$'i", "$1", $a); - foreach($a as $url => $title) { - if ($count++ >= 4) { - break; - } - $confs .= ' <li><a href="' . $url. '">' . $title. '</a></li>' . "\n"; - } - $confs .= "</ul>"; - } // if set - } -} - -/* {{{ Generate latest release info */ -/* Do we have any release candidates to brag about? */ -$RCS = array( - $PHP_5_4_RC => $PHP_5_4_RC_DATE, - $PHP_5_3_RC => $PHP_5_3_RC_DATE, -); -$rel = $rc = ""; -if (isset($RCS)) { - foreach ((array)$RCS as $r => $d) { - if ($r) { - $rc .= ' <li class="php5"><a href="http://qa.php.net/"><span class="release">' . "$r ($d)</span></a></li>\n"; - } - } -} - -if (!empty($rc)) { - $rel .= <<< EOT - <h3 class="fat-border"><a href="http://qa.php.net/rc.php">Release Candidates</a></h3> - <ol id="candidates"> -$rc - </ol> +// Prepare sidebar. +$sidebar = <<< EOT +<div class=home-sidebar> + <h2>Recent News</h2> + <ul> + <li>PHP 5.3.5 and 5.2.17 Released!</li> + <li>PHP 5.2.16 Released!</li> + <li>PHP 5.3.4 Released!</li> + </ul> + + <h2>Conferences</h2> + <ul> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + </ul> + + <h2>User Group Events</h2> + <ul> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + <li>Lorem ipsum dolor sit amet</li> + </ul> + + <h2>Thanks To</h2> + <ul> + <li><a href="http://www.easydns.com/?V=698570efeb62a6e2" title="DNS Hosting provided by easyDNS">easyDNS</a></li> + <li><a href="http://www.directi.com/">Directi</a></li> + <li><a href="http://promote.pair.com/direct.pl?php.net">pair Networks</a></li> + <li><a href="http://www.servercentral.net/">Server Central</a></li> + <li><a href="http://www.hostedsolutions.com/">Hosted Solutions</a></li> + <li><a href="http://www.spry.com/">Spry VPS Hosting</a></li> + <li><a href="http://ez.no/">eZ Systems</a> / <a href="http://www.hit.no/">HiT</a></li> + <li><a href="http://www.osuosl.org">OSU Open Source Lab</a></li> + <li><a href="http://www.yahoo.com/">Yahoo! Inc.</a></li> + <li><a href="http://www.binarysec.com/">BinarySEC</a></li> + <li><a href="http://www.nexcess.net/">NEXCESS.NET</a></li> + <li><a href="http://www.rackspace.com/">Rackspace</a></li> + <li><a href="http://www.eukhost.com/">EUKhost</a></li> + <li><a href="http://www.micfo.com/">micfo</a></li> + </ul> +</div> EOT; -} -$thanks = <<< EOT -<h3 class="fat-border"><a href="/thanks.php">Thanks To</a></h3> -<ul class="simple"> - <li><a href="http://www.easydns.com/?V=698570efeb62a6e2" title="DNS Hosting provided by easyDNS">easyDNS</a></li> - <li><a href="http://www.directi.com/">Directi</a></li> - <li><a href="http://promote.pair.com/direct.pl?php.net">pair Networks</a></li> - <li><a href="http://www.servercentral.net/">Server Central</a></li> - <li><a href="http://www.hostedsolutions.com/">Hosted Solutions</a></li> - <li><a href="http://www.spry.com/">Spry VPS Hosting</a></li> - <li><a href="http://ez.no/">eZ Systems</a> / <a href="http://www.hit.no/">HiT</a></li> - <li><a href="http://www.osuosl.org">OSU Open Source Lab</a></li> - <li><a href="http://www.yahoo.com/">Yahoo! Inc.</a></li> - <li><a href="http://www.binarysec.com/">BinarySEC</a></li> - <li><a href="http://www.nexcess.net/">NEXCESS.NET</a></li> - <li><a href="http://www.rackspace.com/">Rackspace</a></li> - <li><a href="http://www.eukhost.com/">EUKhost</a></li> - <li><a href="http://www.micfo.com/">micfo</a></li> -</ul> -EOT; - -/* }}} */ -// This goes to the left sidebar of the front page -$SIDEBAR_DATA = ' -<h3>Recent news</h3> -' . $news . ' -' . $MIRROR_IMAGE . ' -' . $rel . ' -' . $confs . ' -' . $thanks . ' -'; - +// Prepare announcements. +$announcements = " +<div class='announcements'> +Upcoming conferences: PHP North West, 2011 +</div> +"; + +// Prepare featured content. +$features = " +<div class=featured-content> + <div class='feature top-left'> + <span class=graphic></span> + <h2>Get Involved!</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='feature top-right'> + <span class=graphic></span> + <h2>Need Help?</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='separator'></div> + <div class='feature bottom-left'> + <span class=graphic></span> + <h2>PECL + PEAR</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <div class='feature bottom-right'> + <span class=graphic></span> + <h2>Website Tips/Tricks</h2> + <p> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + </p> + </div> + <br style='clear: both;' /> +</div> +"; + +// Wrap announcements and features in a content element +$content = " +<div class='home-content'> + $announcements + $features +</div> +"; // Write out common header site_header("Hypertext Preprocessor", @@ -201,16 +193,15 @@ site_header("Hypertext Preprocessor", ), ), + 'elephpants' => true ) ); +// Print body of home page. +print $sidebar; +print $content; - -?> - - -<?php +// Print the common footer. site_footer( array("atom" => "/feed.atom") // Add a link to the feed at the bottom ); - diff --git a/styles/home.css b/styles/home.css index e7880ce..4b89c3d 100644 --- a/styles/home.css +++ b/styles/home.css @@ -162,21 +162,113 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 -webkit-border-radius: 5px; } -#confTeaser { - margin-right: 340px; - border: 1px solid #c3add9; - padding: 12px; +/* Main content area */ + +div.home-content { + width: 650px; + padding-top: 5px; } -#confTeaser td { - display: block; +/* Announcement Area */ + +.home .announcements { + width: 600px; + border: 1px solid #aaa; + background-color: #dfd; + border-radius: 5px; + padding: 15px; + text-align: center; + font-family: arial; + margin: 0 auto; } -#confTeaser td:first-child { - font-weight: bold; +/* 2x2 Featured Content Grid */ + +div.featured-content { + margin: 30px 0 30px 0; +} + +div.featured-content div.feature { + float: left; + width: 270px; + text-align: center; + padding: 10px 20px 20px 20px; +} + +div.featured-content div.top-left, +div.featured-content div.top-right { + padding-top: 0; +} + +div.featured-content div.top-left { + border-right: 1px solid #c3add9; +} + +div.featured-content div.bottom-left { + border-right: 1px solid #c3add9; +} + +div.featured-content div.separator { + float: left; + width: 630px; + margin-left: 10px; + border-top: 1px solid #c3add9; +} + +div.featured-content span.graphic { + display: inline-block; + width: 128px; + height: 128px; + background-image: url('../images/home-sprites.png'); } -.fat-border { - border-top: 10px solid #C3ADD9; - margin-top: 30px; +div.featured-content div.top-left span.graphic { + background-position: 0 0; } + +div.featured-content div.top-right span.graphic { + background-position: 0px -129px; +} + +div.featured-content div.bottom-left span.graphic { + background-position: 0px -258px; +} + +div.featured-content div.bottom-right span.graphic { + background-position: 0px -399px; +} + +div.featured-content div.feature h2 { + line-height: 1; + padding-bottom: .5em; +} + +div.featured-content p { + font-size: 1.1em; +} + +/* Right-hand sidebar */ + +div.home-sidebar { + float: right; + width: 250px; + padding: 5px 30px 20px 30px; + margin: 0 0 20px 20px; +} + +div.home-sidebar h2 { + border-top: 6px solid #c3add9; + font-size: 1.5em; + line-height: 100%; + padding: 5px 0 10px 0; + font-weight: normal; +} + +div.home-sidebar h2:first-child { + margin-top: 0; +} + +div.home-sidebar ul { + margin: 0 0 30px 0; + padding: 0; +} \ No newline at end of file diff --git a/styles/theme.css b/styles/theme.css index 323c82f..c46fc9c 100644 --- a/styles/theme.css +++ b/styles/theme.css @@ -472,6 +472,23 @@ aside.tips { display: block; } +/* Footer styling */ + +footer { + clear: both; + overflow: auto; + background-color: #333; + border-top: 12px solid #c3add9; + border-bottom: 12px solid #c3add9; + padding: 1.5em 0; + margin-bottom: 2em; +} + +footer .footer-content { + width: 960px; + margin: 0 auto; +} + footer .footmenu { float: right; } @@ -482,19 +499,34 @@ footer .footmenu li { display: inline; } -footer { - clear: both; - border-top: 3px solid #c3add9; - padding-top: 5px; -} - footer a { - color: #444; - border-color: #987db3; - font-weight: bold; + color: #ccc; margin: 0 8px; } -footer a:hover { - color: #000; +footer a:hover, +footer a:link, +footer a:visited { + color: #ccc; +} + + +/* Elephpant photo stream */ + +div.elephpants { + margin: auto; + overflow: hidden; + border-bottom: 12px solid #c3add9; } + +div.elephpants div.images { + height: 75px; + width: 3000px; + position: relative; + left: -1%; +} + +div.elephpants img { + width: 75px; + height: 75px; +} \ No newline at end of file