[vassalengine-svn] SF.net SVN: vassalengine:[5197] site-src/trunk/site
Brought to you by:
rodneykinney,
uckelman
|
From: <uck...@us...> - 2009-03-02 16:27:06
|
Revision: 5197
http://vassalengine.svn.sourceforge.net/vassalengine/?rev=5197&view=rev
Author: uckelman
Date: 2009-03-02 16:26:54 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
Download quick link now auto-detects user's operating system.
Modified Paths:
--------------
site-src/trunk/site/index.php
site-src/trunk/site/style.css
Added Paths:
-----------
site-src/trunk/site/images/button.download.png
site-src/trunk/site/inc/
site-src/trunk/site/inc/download-detect.php
Added: site-src/trunk/site/images/button.download.png
===================================================================
(Binary files differ)
Property changes on: site-src/trunk/site/images/button.download.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: site-src/trunk/site/inc/download-detect.php
===================================================================
--- site-src/trunk/site/inc/download-detect.php (rev 0)
+++ site-src/trunk/site/inc/download-detect.php 2009-03-02 16:26:54 UTC (rev 5197)
@@ -0,0 +1,26 @@
+<?php
+
+$version = '3.1.0';
+$base_url = 'http://downloads.sourceforge.net/vassalengine';
+
+// Get the user's browser
+$useragent = $_SERVER['HTTP_USER_AGENT'];
+
+if (strstr($useragent, 'Win')) {
+ $download_os = ' for Windows';
+ $download_url = "$base_url/VASSAL-$version-windows.exe";
+}
+else if (strstr($useragent, 'Linux')) {
+ $download_os = ' for Linux';
+ $download_url = "$base_url/VASSAL-$version-linux.zip";
+}
+else if (strstr($useragent, 'Mac')) {
+ $download_os = ' for Mac OS X';
+ $download_url = "$base_url/VASSAL-$version-macosx.dmg";
+}
+else {
+ $download_os = '';
+ $download_url = "$base_url/VASSAL-$version-other.zip";
+}
+
+?>
Modified: site-src/trunk/site/index.php
===================================================================
--- site-src/trunk/site/index.php 2009-03-02 11:44:52 UTC (rev 5196)
+++ site-src/trunk/site/index.php 2009-03-02 16:26:54 UTC (rev 5197)
@@ -68,17 +68,13 @@
<h1>Get <acronym>Vassal</acronym></h1>
<p><acronym>Vassal</acronym> is free, open-source software, created by volunteers. Our current release is 3.1.0.</p>
<div class="dlbutton">
- <div>Download 3.1.0</div>
- <ul class="dllist">
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.1.0-beta8-generic.zip">Linux</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.1.0-beta8-windows.exe">Mac OS</a></li>
- <li><a href="http://downloads.sourceforge.net/vassalengine/VASSAL-3.1.0-beta8-macosx.dmg">Windows</a></li>
- </ul>
+ <?php
+ include 'inc/download-detect.php';
+ echo "<a href=\"$download_url\"><span>Download <acronym>Vassal</acronym><br/>$version$download_os</span><img src=\"/images/button.download.png\"/></a>";
+ ?>
</div>
-
<div class="dlbutton">
- <div>Support <acronym>Vassal</acronym></div>
- <a href=""><img src="/images/paypal_donate.png"/></a>
+ <a href=""><span>Support <acronym>Vassal</acronym></span><img src="/images/paypal_donate.png"/></a>
</div>
<p><acronym>Vassal</acronym> is free, but development and hosting are not. If you enjoy using <acronym>Vassal</acronym>, please consider helping us with these costs.</p>
</div>
Modified: site-src/trunk/site/style.css
===================================================================
--- site-src/trunk/site/style.css 2009-03-02 11:44:52 UTC (rev 5196)
+++ site-src/trunk/site/style.css 2009-03-02 16:26:54 UTC (rev 5197)
@@ -100,14 +100,13 @@
clear: both;
font-size: 1.2em;
- line-height: 1.25em;
+/* line-height: 1.25em; */
}
#content h1 {
- display: block;
/* margin: 0.67em, 0, 0.67em, 0; */
/* line-height: 0.3; */ /* why? */
- color: #384024;
+ color: #384024;
}
.content_box_left {
@@ -126,21 +125,11 @@
clear: both;
}
-ul.dllist {
- display: block;
- margin: 0;
- padding: 0.5em;
-}
-ul.dllist li {
- margin: 0 5px;
- padding: 0;
- list-style: none;
- display: inline;
-}
+
div.dlbutton {
- padding: 0.5em;
+ padding: 1em;
margin: 1em auto;
border: 1px solid #8dea34;
border-radius: 5px;
@@ -154,19 +143,36 @@
text-align: center;
}
-div.dlbutton a, div.dlbutton a:hover, div.dlbutton a:visited {
+div.dlbutton a {
+ display: block;
+ overflow: auto;
color: white;
text-decoration: none;
}
-div.dlbutton a:hover {
+div.dlbutton a:hover, div.dlbutton a:visited {
+ color: white;
+ text-decoration: none;
+}
+
+div.dlbutton a:hover span {
text-decoration: underline;
}
-div.dlbutton div {
- margin: 0.5em;
+div.dlbutton a span {
+ display: inline-block;
+ vertical-align: middle;
+ text-align: center;
+ padding: 12px;
}
+div.dlbutton a img {
+ vertical-align: middle;
+}
+
+
+
+
table.screenshot {
margin: 0 auto;
}
@@ -224,3 +230,59 @@
div.date:first-line {
font-size: 70%;
}
+
+
+
+
+
+
+
+#download {
+ margin-left: auto;
+ margin-right: auto;
+ border-collapse: collapse;
+}
+
+#download th {
+ font-weight: bold;
+ font-size: 0.85em;
+}
+
+#download tr.release {
+ background: #eeeeee;
+ border: 1px solid #cccccc;
+ font-weight: bold;
+}
+
+#download tr {
+ border: 1px solid #cccccc;
+}
+
+#download td.date {
+ text-align: right;
+}
+
+#download tbody.formatgroup {
+ border: 1px solid #cccccc;
+}
+
+#download td.format {
+ padding: 0 0.5em 0 0.5em;
+}
+
+#download td.name, #download td.note {
+ font-size: 0.85em;
+ padding: 2px 0.5em 2px 0.5em;
+}
+
+#download td.size {
+ font-family: monospace;
+ text-align: right;
+ padding: 0 0.5em 0 0.5em;
+}
+
+#download td.md5sum {
+ font-family: monospace;
+ padding: 0 0.5em 0 0.5em;
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|