Version matrix

Signed-off-by: Eike Stepper <stepper@esc-net.de>
diff --git a/downloads/versions.css b/downloads/versions.css
index 1f74856..9a87ca6 100644
--- a/downloads/versions.css
+++ b/downloads/versions.css
@@ -1,13 +1,46 @@
-* {
- font-size: 100%;
- font-family: Arial, Helvetica, sans-serif;
-}
-
-table {
-	border: 1px #808080;
+body {
+  font-size: 100%;
+  font-family: Arial, Helvetica, sans-serif;
 }
 
 a {
-    color: #FFFFFF;
-    text-decoration: none;
+  color: #000000;
+  text-decoration: none;
 }
+
+a:hover {
+  color: #0000FF;
+  text-decoration: underline;
+}
+
+table, th, td {
+  border-collapse: collapse;
+	border: 1px solid #C0C0C0;
+  background-color: #FFFFFF;
+}
+
+thead th {
+  background-color: #F0F0FF;
+}
+
+th {
+  vertical-align: top;
+  position: -webkit-sticky;
+  position: sticky;
+  top: 0;
+  z-index: 2;
+}
+
+th[scope=row] {
+  position: -webkit-sticky;
+  position: sticky;
+  left: 0;
+  z-index: 1;
+  text-align: left;
+  font-weight: normal;
+}
+
+td {
+  text-align: center;
+}
+
diff --git a/downloads/versions.php b/downloads/versions.php
index 8db4d3f..ab056ff 100644
--- a/downloads/versions.php
+++ b/downloads/versions.php
@@ -19,11 +19,16 @@
 
 $lines = explode("\n", file_get_contents("$drops/drops.txt"));
 sort($lines);
+$lines = array_reverse($lines);
 
+
+$max = 4;
 foreach ($lines as $drop)
 {
   if (startsWith($drop, "R") && !contains($oldDrops, $drop))
   {
+    //if (--$max == 0) break;
+    
     $indexString = file_get_contents("$drops/$drop/index.xml");
     if ($indexString === false)
     {
@@ -74,14 +79,12 @@
   }
 }
 
-$releases = array_reverse($releases);
-
 $bundles = array_keys($bundles);
 natsort($bundles);
 $bundles = array_values($bundles);
 
 
-print "<table border='1'>\n";
+print "<table>\n";
 print "  <thead>\n";
 print "    <tr>\n";
 print "      <th>&nbsp;</th>\n";
@@ -95,7 +98,7 @@
 
 print "    </tr>\n";
 
-headLine($releases, "Build", "drop", function($v) { $l = simpleDate($v); return "<a href=\"https://download.eclipse.org/modeling/emf/cdo/drops/$v\">$l</a>"; });
+headLine($releases, "Build", "drop", function($v) { $l = simpleDate($v); return "<a href=\"https://download.eclipse.org/modeling/emf/cdo/drops/$v\" title=\"CDO $v Downloads\">$l</a>"; });
 headLine($releases, "Commit", "commit", function($v) { $l = substr($v, 0, 7); return "<a href=\"https://git.eclipse.org/c/cdo/cdo.git/commit/?id=$v\">$l</a>"; });
 headLine($releases, "Simrel", "train", function($v) { return "<a href=\"https://www.eclipse.org/downloads/packages/release/$v\">$v</a>"; });
 headLine($releases, "Eclipse", "eclipse");
@@ -116,7 +119,7 @@
     {
       $version = $versions[$bundle];
       $file = $bundle . "_" . $version . ".jar";
-      print "      <td align='center'><a href=\"http://download.eclipse.org/modeling/emf/cdo/drops/$drop/plugins/$file\" title=\"CDO $release &rarr; $file\">" . simpleVersion($version) . "</a></td>\n";
+      print "      <td><a href=\"https://download.eclipse.org/modeling/emf/cdo/drops/$drop/plugins/$file\" title=\"CDO $release &rarr; $file\">" . simpleVersion($version) . "</a></td>\n";
     }
     else
     {
@@ -135,7 +138,7 @@
 function headLine($releases, $label, $field, callable $formatter = null)
 {
   print "    <tr>\n";
-  print "      <th>$label</th>\n";
+  print "      <th scope=\"row\">$label</th>\n";
   
   foreach ($releases as $release => $info)
   {
@@ -146,7 +149,7 @@
       $value = $formatter($value);
     }
     
-    print "      <th>$value</th>\n";
+    print "      <td>$value</td>\n";
   }
   
   print "    </tr>\n";
@@ -165,9 +168,9 @@
 
 function simpleDate($drop)
 {
-  $y = substr($v, 1, 4);
-  $m = substr($v, 5, 2);
-  $d = substr($v, 7, 2);
+  $y = substr($drop, 1, 4);
+  $m = substr($drop, 5, 2);
+  $d = substr($drop, 7, 2);
   return "$y&#8209;$m&#8209;$d";
 }