svn: /web/php/trunk/ include/header.inc styles/home.css
[email protected] (Adam Harvey)
| Newsgroups | php.webmaster |
|---|---|
| Message-ID | <[email protected]> |
aharvey Fri, 07 Jan 2011 09:15:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307212
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:
U web/php/trunk/include/header.inc
U web/php/trunk/styles/home.css
Modified: web/php/trunk/include/header.inc
===================================================================
--- web/php/trunk/include/header.inc 2011-01-07 08:56:58 UTC (rev 307211)
+++ web/php/trunk/include/header.inc 2011-01-07 09:15:50 UTC (rev 307212)
@@ -5,6 +5,9 @@
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 @@
<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>
+ <span class="file">
+ <?php echo $release['source'][0]['filename'] ?>
+ <!-- (size) should go here, but it's not in version.inc at present -->
+ </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>
- </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>
Modified: web/php/trunk/styles/home.css
===================================================================
--- web/php/trunk/styles/home.css 2011-01-07 08:56:58 UTC (rev 307211)
+++ web/php/trunk/styles/home.css 2011-01-07 09:15:50 UTC (rev 307212)
@@ -51,7 +51,7 @@
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,14 +69,19 @@
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 {
background: #339900;
display: none;