Commit: 0da2dd3b77af6ea291aaa2e8a79ac4fca15e3ea7 Author: Adam Harvey <[email protected]> Fri, 7 Jan 2011 09:15:50 +0000 Parents: f33a494da0a0767087a28f9bed88805b1bc5cf08 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=0da2dd3b77af6ea291aaa2e8a79ac4fca15e3ea7 Log: Autogenerate the download links in the mega drop down based on version.inc. File sizes have been removed temporarily because they're not in version.inc at the moment; it would be simple enough to add them, but I need to follow up with our RMs to make sure I'm not making their lives harder by requiring it. Changed paths: M include/header.inc M styles/home.css Diff: diff --git a/include/header.inc b/include/header.inc index 15867ab..c601adc 100644 --- a/include/header.inc +++ b/include/header.inc @@ -5,6 +5,9 @@ header("Expires: Thu, 19 Nov 1981 08:52:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Pragma: no-cache"); +// Version information for the mega drop down. +include $_SERVER['DOCUMENT_ROOT'] . '/include/version.inc'; + if ($shortname) { header("Link: <$shorturl>; rel=shorturl"); } @@ -99,15 +102,16 @@ if ($shortname) { <p class="tutorial"><a href="/tut.php">Introductory Tutorial »</a></p> </div> <div class="download"> - <a href="/get/php-5.3.5.tar.gz/from/a/mirror" class="latest"> - <span class="version">PHP 5.3.5</span> +<?php foreach ($RELEASES[5] as $version => $release): ?> + <a href="/get/<?php echo $release['source'][0]['filename'] ?>/from/a/mirror"> + <span class="version">PHP <?php echo $version ?></span> <span class="package">Complete Source Code</span> - <span class="file">php.5.3.5.tar.gz (13,775 KB)</span> - </a> - <a href="/get/php-5.2.17.tar.gz/from/a/mirror" class="legacy"> - <span class="version">PHP 5.2.17</span> - <span class="date">php.5.2.17.tar.gz (11,525 KB)</span> + <span class="file"> + <?php echo $release['source'][0]['filename'] ?> + <!-- (size) should go here, but it's not in version.inc at present --> + </span> </a> +<?php endforeach; ?> <a href="http://windows.php.net" class="windows"> <span class="version">Windows Downloads</span> <span class="date">http://windows.php.net/</span> diff --git a/styles/home.css b/styles/home.css index 2acd04d..47aefd0 100644 --- a/styles/home.css +++ b/styles/home.css @@ -51,7 +51,7 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 border-top: 1px solid #555; } -#mega-drop-down div.download a.latest { +#mega-drop-down div.download a:first-child { padding: 20px 0 20px 100px; background-image: url('/images/sprites.png'); background-position: 10px -187px; @@ -69,12 +69,17 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 font-weight: bold; } -#mega-drop-down div.download a.latest span.version { +#mega-drop-down div.download a:first-child span.version { font-size: 2.5em; } #mega-drop-down div.download a span.package { font-size: 1.3em; + display: none; +} + +#mega-drop-down div.download a:first-child span.package { + display: block; } #head-beta-warning { -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
