Switch Snark dark and light themes to using images embedded in the .war, and remove the images substitutions from the filesystem and css
@ -882,6 +882,28 @@ public class SnarkManager implements CompleteListener, ClientApp {
|
|||||||
return theme;
|
return theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the path to the preferred embedded icons for toImg, "solid/" for
|
||||||
|
* dark and light, "" for everything else.
|
||||||
|
*
|
||||||
|
* If you add a theme with a new icon set, then you need to add a
|
||||||
|
* corresponding condition here.
|
||||||
|
*
|
||||||
|
* @return String "solid/" or ""
|
||||||
|
* @since 0.9.48
|
||||||
|
*/
|
||||||
|
public String getThemeIconSet() {
|
||||||
|
String iconset = "";
|
||||||
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
|
_log.debug("Theme was: " + this.getTheme());
|
||||||
|
if (this.getTheme().equals("dark") || this.getTheme().equals("light")) {
|
||||||
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
|
_log.debug("Using solid iconset.");
|
||||||
|
iconset = "solid/";
|
||||||
|
}
|
||||||
|
return iconset;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all themes
|
* Get all themes
|
||||||
* @return String[] -- Array of all the themes found, non-null, unsorted
|
* @return String[] -- Array of all the themes found, non-null, unsorted
|
||||||
|
@ -4206,7 +4206,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
|||||||
* @since 0.8.2
|
* @since 0.8.2
|
||||||
*/
|
*/
|
||||||
private String toImg(String icon, String altText) {
|
private String toImg(String icon, String altText) {
|
||||||
return "<img alt=\"" + altText + "\" height=\"16\" width=\"16\" src=\"" + _contextPath + WARBASE + "icons/" + icon + ".png\">";
|
return "<img alt=\"" + altText + "\" height=\"16\" width=\"16\" src=\"" + _contextPath + WARBASE + "icons/" + _manager.getThemeIconSet() + icon + ".png\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 514 B After Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 661 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
@ -3272,83 +3272,3 @@ th a img {
|
|||||||
background-size: 14px auto !important;
|
background-size: 14px auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.snarkTorrentDetails img {
|
|
||||||
height: 0px !important;
|
|
||||||
width: 0px !important;
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.snarkDirInfo img {
|
|
||||||
height: 0px !important;
|
|
||||||
width: 0px !important;
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
img[src*="i2psnark/.resources/icons/application.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/basket_put.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/basket_put.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/cancel.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/cancel.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/cd.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/cd.pmg") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/clock.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/clock.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/clock_red.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/clock_red.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/compress.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/compress.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/ebook.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/ebook.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/film.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/film.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/folder.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/folder.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/html.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/html.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/itoopie_xxsm.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/itoopie_xxsm.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/magnet.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/magnet.png") center no-repeat;
|
|
||||||
height: 0px;
|
|
||||||
width: 0px;
|
|
||||||
padding: 16px;
|
|
||||||
margin: -4px !important;
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/music.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/music.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/package.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/package.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/page.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page_white.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/page_white.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page_white_acrobat.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/page_white_acrobat.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/photo.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/photo.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/plugin.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/plugin.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/tick.png"]{
|
|
||||||
background: url("/themes/snark/dark/images/icons/tick.png") center no-repeat
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 385 B |
Before Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 525 B |
@ -2709,83 +2709,3 @@ a, a:link, th, td, button, input, select, textarea {
|
|||||||
background-size: 14px auto !important;
|
background-size: 14px auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.snarkTorrentDetails img {
|
|
||||||
height: 0px !important;
|
|
||||||
width: 0px !important;
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.snarkDirInfo img {
|
|
||||||
height: 0px !important;
|
|
||||||
width: 0px !important;
|
|
||||||
padding: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
img[src*="i2psnark/.resources/icons/application.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/application") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/basket_put.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/basket_put.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/cancel.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/cancel.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/cd.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/cd.pmg") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/clock.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/clock.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/clock_red.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/clock_red.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/compress.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/compress.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/ebook.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/ebook.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/film.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/film.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/folder.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/folder.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/html.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/html.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/itoopie_xxsm.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/itoopie_xxsm.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/magnet.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/magnet.png") center no-repeat;
|
|
||||||
height: 0px;
|
|
||||||
width: 0px;
|
|
||||||
padding: 16px;
|
|
||||||
margin: -4px !important;
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/music.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/music.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/package.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/package.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/page.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page_white.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/page_white.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/page_white_acrobat.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/page_white_acrobat.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/photo.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/photo.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/plugin.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/plugin.png") center no-repeat
|
|
||||||
}
|
|
||||||
img[src*="i2psnark/.resources/icons/tick.png"]{
|
|
||||||
background: url("/themes/snark/light/images/icons/tick.png") center no-repeat
|
|
||||||
}
|
|
||||||
|
|
||||||
|