Switch Snark dark and light themes to using images embedded in the .war, and remove the images substitutions from the filesystem and css
@ -881,6 +881,28 @@ public class SnarkManager implements CompleteListener, ClientApp {
|
||||
}
|
||||
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
|
||||
|
@ -4206,7 +4206,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
* @since 0.8.2
|
||||
*/
|
||||
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\">";
|
||||
}
|
||||
|
||||
/**
|
||||
|
BIN
apps/i2psnark/resources/icons/solid/application.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
apps/i2psnark/resources/icons/solid/basket_put.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
apps/i2psnark/resources/icons/solid/cancel.png
Normal file
After Width: | Height: | Size: 599 B |
BIN
apps/i2psnark/resources/icons/solid/cd.png
Normal file
After Width: | Height: | Size: 605 B |
BIN
apps/i2psnark/resources/icons/solid/clock.png
Normal file
After Width: | Height: | Size: 580 B |
BIN
apps/i2psnark/resources/icons/solid/clock_red.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
apps/i2psnark/resources/icons/solid/compress.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
apps/i2psnark/resources/icons/solid/ebook.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
apps/i2psnark/resources/icons/solid/film.png
Normal file
After Width: | Height: | Size: 249 B |
BIN
apps/i2psnark/resources/icons/solid/folder.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
apps/i2psnark/resources/icons/solid/html.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
apps/i2psnark/resources/icons/solid/itoopie_xxsm.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
apps/i2psnark/resources/icons/solid/magnet.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
apps/i2psnark/resources/icons/solid/music.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
apps/i2psnark/resources/icons/solid/package.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
apps/i2psnark/resources/icons/solid/page.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
apps/i2psnark/resources/icons/solid/page_white.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
apps/i2psnark/resources/icons/solid/page_white_acrobat.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
apps/i2psnark/resources/icons/solid/photo.png
Normal file
After Width: | Height: | Size: 158 B |
BIN
apps/i2psnark/resources/icons/solid/plugin.png
Normal file
After Width: | Height: | Size: 548 B |
BIN
apps/i2psnark/resources/icons/solid/tick.png
Normal file
After Width: | Height: | Size: 525 B |