From d56aae891373dd9d8b02966bd5181b786933d15a Mon Sep 17 00:00:00 2001
From: z3d <z3d@mail.i2p>
Date: Wed, 19 Aug 2009 18:28:44 +0000
Subject: [PATCH] Minor changes to the I2PSnark UI.

---
 .../org/klomp/snark/web/I2PSnarkServlet.java  | 26 ++++++++---------
 installer/resources/themes/console/snark.css  | 28 +++++++++++--------
 2 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index 5121a921fd..0606635b40 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -84,8 +84,8 @@ public class I2PSnarkServlet extends HttpServlet {
         out.write("<meta http-equiv=\"refresh\" content=\"60;" + req.getRequestURI() + peerString + "\">\n");
         out.write(HEADER);
         out.write("</head><body>");
-        out.write("<center><div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=\"center\" class=\"snarkTitle\"><a href=\"" + req.getRequestURI() + peerString + "\" title=\"I2PSnark (Manual Page Refresh)\"><img src=\"/themes/console/images/i2psnark.png\" alt=\"I2PSnark Anonymous BitTorrent Client\" border=\"0\" class=\"snarklogo\"></a></table>");
-        out.write("<div class=\"snarknavbar\"><a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">Forum</a>\n");
+        out.write("<center><div class=\"page\">");
+        out.write("<div class=\"snarknavbar\"><a href=\"" + req.getRequestURI() + peerString + "\" title=\"Refresh page\" class=\"snarkRefresh\">I2PSnark</a> <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\" target=\"_blank\">Forum</a>\n");
         Map trackers = _manager.getTrackers();
         for (Iterator iter = trackers.entrySet().iterator(); iter.hasNext(); ) {
             Map.Entry entry = (Map.Entry)iter.next();
@@ -116,13 +116,13 @@ public class I2PSnarkServlet extends HttpServlet {
                 out.write("(<a href=\"" + req.getRequestURI() + "?p=1" + "\">Show Peers</a>)<br>\n");
         }
         out.write(TABLE_HEADER2);
-        out.write("<th align=\"left\">");
+        out.write("<th align=\"center\">");
         if (_manager.util().connected())
             out.write("<a href=\"" + uri + "?action=StopAll&nonce=" + _nonce +
-                      "\" title=\"Stop all torrents and the i2p tunnel\">Stop All</a>");
+                      "\" title=\"Stop all torrents and the I2P tunnel\">Stop All</a>");
         else if (snarks.size() > 0)
             out.write("<a href=\"" + uri + "?action=StartAll&nonce=" + _nonce +
-                      "\" title=\"Start all torrents and the i2p tunnel\">Start All</a>");
+                      "\" title=\"Start all torrents and the I2P tunnel\">Start All</a>");
         else
             out.write("&nbsp;");
         out.write("</th></tr></thead>\n");
@@ -487,7 +487,7 @@ public class I2PSnarkServlet extends HttpServlet {
         
         String rowClass = (row % 2 == 0 ? "snarkTorrentEven" : "snarkTorrentOdd");
         out.write("<tr class=\"" + rowClass + "\">");
-        out.write("<td align=\"left\" class=\"snarkTorrentStatus " + rowClass + "\">");
+        out.write("<td align=\"center\" class=\"snarkTorrentStatus " + rowClass + "\">");
         out.write(statusString + "</td>\n\t");
         out.write("<td align=\"left\" class=\"snarkTorrentName " + rowClass + "\">");
         
@@ -521,7 +521,7 @@ public class I2PSnarkServlet extends HttpServlet {
         }
         out.write("</td>\n\t");
         
-        out.write("<td align=\"right\" class=\"snarkTorrentETA " + rowClass + "\">");
+        out.write("<td align=\"center\" class=\"snarkTorrentETA " + rowClass + "\">");
         if(isRunning && remainingSeconds > 0)
             out.write(DataHelper.formatDuration(remainingSeconds*1000)); // (eta 6h)
         out.write("</td>\n\t");
@@ -541,7 +541,7 @@ public class I2PSnarkServlet extends HttpServlet {
         if(isRunning)
             out.write(formatSize(upBps) + "ps");
         out.write("</td>\n\t");
-        out.write("<td align=\"left\" class=\"snarkTorrentAction " + rowClass + "\">");
+        out.write("<td align=\"center\" class=\"snarkTorrentAction " + rowClass + "\">");
         String parameters = "&nonce=" + _nonce + "&torrent=" + Base64.encode(snark.meta.getInfoHash());
         if (showPeers)
             parameters = parameters + "&p=1";
@@ -566,9 +566,9 @@ public class I2PSnarkServlet extends HttpServlet {
                 if (!peer.isConnected())
                     continue;
                 out.write("<tr class=\"" + rowClass + "\">");
-                out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">");
+                out.write("<td align=\"center\" class=\"snarkTorrentStatus " + rowClass + "\">");
                 out.write("</td>\n\t");
-                out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">");
+                out.write("<td align=\"center\" class=\"snarkTorrentStatus " + rowClass + "\">");
                 String ch = peer.toString().substring(0, 4);
                 String client;
                 if ("AwMD".equals(ch))
@@ -587,7 +587,7 @@ public class I2PSnarkServlet extends HttpServlet {
                     client = "Robert";
                 else
                     client = "Unknown (" + ch + ')';
-                out.write("<font size=-1>" + client + "</font>&nbsp;&nbsp;<tt>" + peer.toString().substring(5, 9) + "</tt>");
+                out.write("<font size=-1>" + client + "</font>&nbsp;&nbsp;" + peer.toString().substring(5, 9) + "");
                 if (showDebug)
                     out.write(" inactive " + (peer.getInactiveTime() / 1000) + "s");
                 out.write("</td>\n\t");
@@ -790,11 +790,11 @@ public class I2PSnarkServlet extends HttpServlet {
 
     private static final String TABLE_HEADER = "<table border=\"0\" class=\"snarkTorrents\" width=\"100%\" cellpadding=\"0 10px\">\n" +
                                                "<thead>\n" +
-                                               "<tr><th align=\"left\">Status \n";
+                                               "<tr><th align=\"center\">Status \n";
 
     private static final String TABLE_HEADER2 = "</th>\n" +
                                                "    <th align=\"left\">Torrent</th>\n" +
-                                               "    <th align=\"right\">ETA</th>\n" +
+                                               "    <th align=\"center\">ETA</th>\n" +
                                                "    <th align=\"right\">Downloaded</th>\n" +
                                                "    <th align=\"right\">Uploaded</th>\n" +
                                                "    <th align=\"right\">Down Rate</th>\n" +
diff --git a/installer/resources/themes/console/snark.css b/installer/resources/themes/console/snark.css
index a5551156fc..31bbeea403 100644
--- a/installer/resources/themes/console/snark.css
+++ b/installer/resources/themes/console/snark.css
@@ -47,7 +47,7 @@ body {
   color: #f30;
   border-bottom: 3px solid #f30;
   border-top: 3px solid #f30;
-  text-shadow: 0px 0px 1px rgba(255, 163, 0, 0.9);
+  text-shadow: 0px 0px 1px rgba(255, 32, 0, 0.5);
   }
 
 .snarkMessages {
@@ -95,7 +95,7 @@ th {
   border-top: 1px outset #001;
   border-bottom: 1px inset #001;  
   background: #f60 url('/themes/console/images/tabletitleorange.png') repeat-x;
-  text-align: right;
+/*  text-align: right; */
   whitespace: nowrap;
 }
 
@@ -107,7 +107,7 @@ th {
 
 td {
 	padding: 5px;
-  text-align: right;
+/*  text-align: right;*/
 }
 .snarkTorrentEven {
 	background-color: #fb1;
@@ -139,8 +139,8 @@ td {
 	color:#310;
   min-width: 800px !important;
 /*  max-width: 800px !important; */
-  margin: 20px;
-  padding: 10px 20px 5px 20px;
+  margin: 10px;
+  padding: 10px 10px 5px 10px;
   -moz-border-radius: 4px;
   -khtml-border-radius: 4px;
   border-radius: 4px;
@@ -224,7 +224,7 @@ img:hover{
 
 
 div.section {
-  margin: 0 0 20px 0;
+  margin: 0 0 10px 0;
   padding: 10px;
   background: #ffe;
   border: 1px solid #001;
@@ -241,7 +241,7 @@ div.section {
 }
 
 div.mainsection {
-  margin: 0 0 20px 0;
+  margin: 0 0 10px 0;
   padding: 10px;
   background: #ffe;
   border: 1px solid #001;
@@ -258,7 +258,7 @@ div.mainsection {
 }
 
 div.newtorrentsection {
-  margin: 0 0 20px 0;
+  margin: 0 0 10px 0;
   padding: 10px;
   background: #ffe;
   border: 1px solid #001;
@@ -275,7 +275,7 @@ div.newtorrentsection {
 }
 
 div.addtorrentsection {
-  margin: 0 0 20px 0;
+  margin: 0 0 10px 0;
   padding: 10px;
   background: #ffe;
   border: 1px solid #001;
@@ -292,7 +292,7 @@ div.addtorrentsection {
 }
 
 div.configsection {
-  margin: 0 0 20px 0;
+  margin: 0 0 10px 0;
   padding: 10px;
   background: #ffe;
   border: 1px solid #001;
@@ -317,7 +317,7 @@ div.configsection a:hover{
 }
 
 .snarknavbar {
-  margin: 5px 0 20px 0 !important;
+  margin: 0 0 10px 0 !important;
   padding: 10px;
   border: 1px solid #001;
   -moz-border-radius: 4px;
@@ -326,4 +326,10 @@ div.configsection a:hover{
   background: #eef;
   -moz-box-shadow: inset 0px 0px 1px 0px #002;
   background: #ddf url('../console/light/images/tabletile.png');
+  text-transform: uppercase !important;
+  letter-spacing: 0.05em;
+  font-weight: bold;
+  font-size: 11pt;
+  color: #001;
+  text-shadow: 0px 0px 1px rgba(0, 0, 148, 0.9);
 }
-- 
GitLab