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 696cdbe4488f395fc30540dc48f48e15a4dba553..aa042ade328deaa48558375f7dd1559cb17837e6 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -85,7 +85,7 @@ 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\">"); + out.write("<center>"); 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(); ) { @@ -96,10 +96,10 @@ public class I2PSnarkServlet extends HttpServlet { if (e < 0) continue; baseURL = baseURL.substring(e + 1); - out.write("<a href=\"" + baseURL + "\" class=\"snarkRefresh\" target=\"_blank\">" + name + "</a>"); + out.write(" <a href=\"" + baseURL + "\" class=\"snarkRefresh\" target=\"_blank\">" + name + "</a>"); } out.write("</div>\n"); - out.write("<div class=\"mainsection\"><div class=\"snarkMessages\"><table><tr><td align=\"left\"><pre>"); + out.write("<div class=\"page\"><div class=\"mainsection\"><div class=\"snarkMessages\"><table><tr><td align=\"left\"><pre>"); List msgs = _manager.getMessages(); for (int i = msgs.size()-1; i >= 0; i--) { String msg = (String)msgs.get(i); @@ -498,7 +498,7 @@ public class I2PSnarkServlet extends HttpServlet { if (remaining == 0) out.write("<a href=\"" + _manager.linkPrefix() + snark.meta.getName() - + "\" title=\"Click to access completed downloaded..\">"); + + "\" title=\"View file\">"); out.write(filename); if (remaining == 0) out.write("</a>"); @@ -573,7 +573,7 @@ public class I2PSnarkServlet extends HttpServlet { out.write("<tr class=\"" + rowClass + "\">"); out.write("<td align=\"center\" class=\"snarkTorrentStatus " + rowClass + "\">"); out.write("</td>\n\t"); - out.write("<td align=\"center\" class=\"snarkTorrentStatus " + rowClass + "\">"); + out.write("<td align=\"left\" class=\"snarkTorrentStatus " + rowClass + "\">"); String ch = peer.toString().substring(0, 4); String client; if ("AwMD".equals(ch)) @@ -592,7 +592,7 @@ public class I2PSnarkServlet extends HttpServlet { client = "Robert"; else client = "Unknown (" + ch + ')'; - out.write("<font size=-1>" + client + "</font> " + peer.toString().substring(5, 9) + ""); + out.write("" + client + " " + peer.toString().substring(5, 9) + ""); if (showDebug) out.write(" inactive " + (peer.getInactiveTime() / 1000) + "s"); out.write("</td>\n\t"); @@ -601,12 +601,12 @@ public class I2PSnarkServlet extends HttpServlet { out.write("<td align=\"right\" class=\"snarkTorrentStatus " + rowClass + "\">"); float pct = (float) (100.0 * (float) peer.completed() / snark.meta.getPieces()); if (pct == 100.0) - out.write("<font size=-1>Seed</font>"); + out.write("Seed"); else { String ps = String.valueOf(pct); if (ps.length() > 5) ps = ps.substring(0, 5); - out.write("<font size=-1>" + ps + "%</font>"); + out.write("" + ps + "%"); } out.write("</td>\n\t"); out.write("<td class=\"snarkTorrentStatus " + rowClass + "\">"); @@ -615,14 +615,14 @@ public class I2PSnarkServlet extends HttpServlet { if (remaining > 0) { if (peer.isInteresting() && !peer.isChoked()) { out.write("<font color=#008000>"); - out.write("<font size=-1>" + formatSize(peer.getDownloadRate()) + "ps</font></font>"); + out.write("" + formatSize(peer.getDownloadRate()) + "ps</font>"); } else { - out.write("<font color=#a00000><font size=-1><a title=\""); + out.write("<font color=#a00000><a title=\""); if (!peer.isInteresting()) out.write("Uninteresting\">"); else out.write("Choked\">"); - out.write(formatSize(peer.getDownloadRate()) + "ps</a></font></font>"); + out.write(formatSize(peer.getDownloadRate()) + "ps</a></font>"); } } out.write("</td>\n\t"); @@ -630,14 +630,14 @@ public class I2PSnarkServlet extends HttpServlet { if (pct != 100.0) { if (peer.isInterested() && !peer.isChoking()) { out.write("<font color=#008000>"); - out.write("<font size=-1>" + formatSize(peer.getUploadRate()) + "ps</font></font>"); + out.write("" + formatSize(peer.getUploadRate()) + "ps</font>"); } else { - out.write("<font color=#a00000><font size=-1><a title=\""); + out.write("<font color=#a00000><a title=\""); if (!peer.isInterested()) out.write("Uninterested\">"); else out.write("Choking\">"); - out.write(formatSize(peer.getUploadRate()) + "ps</a></font></font>"); + out.write(formatSize(peer.getUploadRate()) + "ps</a></font>"); } } out.write("</td>\n\t"); diff --git a/installer/resources/themes/console/snark.css b/installer/resources/themes/console/snark.css index 13c233add72e0daeba1508dda90f2b9b3d8885cb..8b2a82673e6bfacd29cdc8711c06e8da92db3c21 100644 --- a/installer/resources/themes/console/snark.css +++ b/installer/resources/themes/console/snark.css @@ -1,335 +1,300 @@ /* Not yet complete. Subject to flux and change. dr|z3d - 07.25.09 */ body { - background-color: #eef; - color:#001; - font-family:"Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; - font-size: 8pt; + background: #eef; + color: #001; + font: 8pt "Lucida Sans Unicode","Bitstream Vera Sans",Verdana,Tahoma,Helvetica,sans-serif; } .snarkTitle { - font-size: 12pt; - font-weight: bold; - text-align: center; -} - -.snarkRefresh:link, .snarkRefresh:visited { - text-decoration: none !important; - text-transform: uppercase !important; - padding: 0 16px; - letter-spacing: 0.05em; - font-weight: bold; - font-size: 11pt; - color: #005; - text-shadow: 0px 0px 1px rgba(0, 0, 148, 0.9); - } - - .snarkRefresh:hover{ - text-decoration: none !important; - text-transform: uppercase !important; - padding: 0 16px; - letter-spacing: 0.05em; - font-weight: bold; - font-size: 11pt; - color: #f60; - border-bottom: 3px solid #f60; - border-top: 3px solid #f60; - text-shadow: 0px 0px 1px rgba(255, 128, 0, 0.9); - } - -.snarkRefresh:active{ - text-decoration: none !important; - text-transform: uppercase !important; - padding: 0 16px; - letter-spacing: 0.05em; - font-weight: bold; - font-size: 11pt; - color: #f30; - border-bottom: 3px solid #f30; - border-top: 3px solid #f30; - text-shadow: 0px 0px 1px rgba(255, 32, 0, 0.5); - } + font-size: 12pt; + font-weight: bold; + text-align: center; +} + +.snarkRefresh:link,.snarkRefresh:visited { + text-decoration: none !important; + text-transform: uppercase !important; + padding: 0 16px; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 11pt; + color: #005; + text-shadow: 0px 0px 1px rgba(0,0,148,0.9); +} + +.snarkRefresh:hover { + text-decoration: none !important; + text-transform: uppercase !important; + padding: 0 16px; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 11pt; + color: #f60; + border-bottom: 3px solid #f60; + border-top: 3px solid #f60; + text-shadow: 0px 0px 1px rgba(255,128,0,0.9); +} + +.snarkRefresh:active { + text-decoration: none !important; + text-transform: uppercase !important; + padding: 0 16px; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 11pt; + color: #f30; + border-bottom: 3px solid #f30; + border-top: 3px solid #f30; + text-shadow: 0px 0px 1px rgba(255,32,0,0.5); +} .snarkMessages { - background-color: #f83; - font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono !important; - font-size: 9pt; - font-weight: bold; - text-align: left; - margin: 0 0px 10px 0px; - padding: 0; - border-spacing: 0px; - -moz-border-radius: 4px 0 0 0; - -khtml-border-radius: 4px; - border-radius: 4px; - border: 2px solid #930; - text-align: left; - overflow: auto; - background: #f40 url('../console/images/orangetile.png'); - color: #531; - height: 64px; - width: auto; + font: bold 9pt "Lucida Console","DejaVu Sans Mono",Courier,mono !important; + text-align: left; + margin: 0 0px 10px 0px; + padding: 0; + border-spacing: 0px; + -moz-border-radius: 4px 0 0 0; + -khtml-border-radius: 4px; + border-radius: 4px; + border: 2px solid #930; + overflow: auto; + color: #531; + height: 64px; + width: auto; + background: #f83 url('../console/images/orangetile.png'); } pre { - font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono !important; - width: 100%; - font-size: 8pt; - padding: 0; - text-align: left !important; - height: 8px; + width: 100%; + font: 8pt "Lucida Console","DejaVu Sans Mono",Courier,mono !important; + padding: 0; + text-align: left !important; + height: 8px; } table { - margin: 0px 0px 10px 0px; - border: 0px; - padding: 0px; - border-width: 0px; - border-spacing: 0px; - border-collapse: collapse; + margin: 0px 0px 10px 0px; + border: 0px; + padding: 0px; + border-spacing: 0px; + border-collapse: collapse; } th { - padding: 5px; - font-size: 8pt; - border-top: 1px outset #001; - border-bottom: 1px inset #001; - background: #f60 url('/themes/console/images/tabletitleorange.png') repeat-x; -/* text-align: right; */ - whitespace: nowrap; + padding: 4px; + font-size: 8pt; + border-top: 1px outset #001; + border-bottom: 1px inset #001; + background: #f60 url('/themes/console/images/tabletitleorange.png') repeat-x; + whitespace: nowrap; } .SnarkTorrents { - margin: 0; - border: 1px solid #001; - background-color: #f9f; + margin: 0; + border: 1px solid #001; + background: #f9f; } td { - padding: 5px; -/* text-align: right;*/ + padding: 4px; } + .snarkTorrentEven { - background-color: #fb1; - font-size: 7pt; + background: #fb1; + font-size: 7pt; } + .snarkTorrentOdd { - background-color: #fa1; - font-size: 7pt; + background: #fa1; + font-size: 7pt; } + .snarkNewTorrent { - font-size: 9pt; + font-size: 9pt; } + .snarkAddInfo { - font-size: 9pt; - line-height: 130% !important; + font-size: 9pt; + line-height: 130% !important; } + .snarkConfigTitle { - font-size: 11pt; - font-weight: bold; - text-decoration: underline; + font-size: 11pt; + font-weight: bold; + text-decoration: underline; + text-transform: uppercase; + text-shadow: 0px 0px 2px rgba(172,172,192,0.9); } .snarkConfig { - font-size: 10pt; + font-size: 10pt; + width: 100%; } .page { - background-color: #fff; - color:#310; - min-width: 800px !important; -/* max-width: 800px !important; */ - margin: 5px 0px; - padding: 10px 10px 0px 10px; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - border: 1px solid #001; - font-size: 9pt !important; - line-height: 160% !important; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - text-align: center; - background: #ddf url('../console/light/images/lightbluetile.png'); - opacity: 1.0; + background: #fff; + color: #310; + min-width: 800px !important; + margin: 5px 0 0 0; + padding: 10px 10px 0px 10px; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + border: 1px solid #001; + font-size: 9pt !important; + line-height: 160% !important; + -moz-box-shadow: inset 0px 0px 1px 0px #002; + text-align: center; + opacity: 1.0; } form { - line-height: 250% -} - -p { - line-height: 150% + line-height: 250%; } -a:link { - padding 5px; +p { + line-height: 150%; } hr { - color: #003; - background: #003; - height: 1px; - border: 0px solid #003; - width: 100%; - margin: 10px 0 7px 0; - text-align: center; + color: #003; + background: #003; + height: 1px; + border: 0px solid #003; + width: 100%; + margin: 10px 0 7px 0; + text-align: center; } -a:link{ - color: #930; - text-decoration: none; - font-weight: bold; - word-wrap: break-word; +a:link { + color: #930; + text-decoration: none; + font-weight: bold; + word-wrap: break-word; } -a:visited{ - color: #606; - text-decoration: none; - font-weight: bold; +a:visited { + color: #606; + text-decoration: none; + font-weight: bold; } -a:hover{ - color: #900; - font-weight: bold; +a:hover { + color: #900; + font-weight: bold; } input { -/* font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono !important;*/ - font-size: 9pt; - font-weight: bold; - text-align: left; - padding: 2px; -} + font-size: 9pt; + font-weight: bold; + text-align: left; + padding: 2px; +} select { - font-family:"Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; - background-color: #ffe; - color: #310; - font-size: 9pt; + background: #ffe; + color: #310; + font: 9pt "Lucida Sans Unicode","Bitstream Vera Sans",Verdana,Tahoma,Helvetica,sans-serif; } img { - border: none; - margin: 5px 5px 0px 5px; - opacity: 1.0; - line-height: 100% -} - -img:hover{ - border: none; - margin: 5px 5px 0px 5px; - opacity: 0.5; - line-height: 100% -} - - -div.section { - margin: 0 0 10px 0; - padding: 10px; - background: #ffe; - border: 1px solid #001; - text-align: center; - color: #001; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - word-wrap: break-word; - text-align: center; - background: #ffe url('../console/light/images/tabletile.png'); - opacity: 1.0; -} - -div.mainsection { - margin: 0 0 10px 0; - padding: 10px; - background: #ffe; - border: 1px solid #001; - text-align: center; - color: #001; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - word-wrap: break-word; - text-align: center; - background: #ffe url('../console/light/images/tabletile.png'); - opacity: 1.0; + border: none; + margin: 5px 5px 0px 5px; + opacity: 1.0; + line-height: 100%; +} + +img: hover { + border: none; + margin: 5px 5px 0px 5px; + opacity: 0.5; + line-height: 100%; +} + +div.section,div.mainsection { + margin: 0 0 10px 0; + padding: 10px; + border: 1px solid #001; + color: #001; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: inset 0px 0px 1px 0px #002; + word-wrap: break-word; + text-align: center; + background: #ffe url('../console/light/images/tabletile.png'); + opacity: 1.0; } div.newtorrentsection { - margin: 0 0 10px 0; - padding: 10px; - background: #ffe; - border: 1px solid #001; - text-align: center; - color: #001; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - word-wrap: break-word; - text-align: center; - background: #ffe url('../console/images/yellowtile.png'); - opacity: 1.0; + margin: 0 0 10px 0; + padding: 0 10px 10px 10px; + border: 1px solid #001; + text-align: center; + color: #001; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: inset 0px 0px 1px 0px #002; + word-wrap: break-word; + background: #bb4 url('../console/images/yellowtile.png'); + opacity: 1.0; } div.addtorrentsection { - margin: 0 0 10px 0; - padding: 10px; - background: #ffe; - border: 1px solid #001; - text-align: center; - color: #001; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: inset 0px 0px 1px 0px #002; - word-wrap: break-word; - text-align: center; - background: #ffe url('../console/images/greentile.png'); - opacity: 1.0; + margin: 0 0 10px 0; + padding: 0 10px 10px 10px; + border: 1px solid #001; + text-align: center; + color: #001; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: inset 0px 0px 1px 0px #002; + word-wrap: break-word; + background: #7f7 url('../console/images/greentile.png'); + opacity: 1.0; } div.configsection { - margin: 0; - padding: 10px; - background: #ffe; - border: 1px solid #001; - color: #ffb; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: inset 0px 0px 0px 1px #900; - word-wrap: break-word; - text-align: center; - background: #ffe url('../console/light/images/darkbluetile.png'); - font-weight: bold; /* red tile needs bold text! */ + margin: 0; + padding: 0 10px 10px 10px; + border: 1px solid #001; + color: #ffb; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: inset 0px 0px 0px 1px #900; + word-wrap: break-word; + text-align: center; + background: #700 url('../console/light/images/darkbluetile.png'); + font-weight: bold;/* red tile needs bold text! */ } -div.configsection a{ - color: #f90; +div.configsection a { + color: #f90; } -div.configsection a:hover{ - color: #f60; - text-decoration: underline; +div.configsection a: hover { + color: #f60; + text-decoration: underline; } .snarknavbar { - margin: 0 0 10px 0 !important; - padding: 10px; - border: 1px solid #001; - -moz-border-radius: 4px; - -khtml-border-radius: 4px; - border-radius: 4px; - 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); -} + margin: 0 0 10px 0 !important; + padding: 10px; + border: 1px solid #001; + -moz-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; + -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); + }