forked from I2P_Developers/i2p.i2p
* Console:
- Move the console css from default.css in the .war to docs/themes/console/console.css, and support console themes in the main console with routerconsole.theme=foo
This commit is contained in:
@ -75,8 +75,9 @@
|
||||
<ant target="war" />
|
||||
</target>
|
||||
<target name="war" depends="precompilejsp">
|
||||
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
|
||||
<war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
|
||||
basedir="../jsp/" excludes="web.xml, *.java, *.jsp, web-fragment.xml">
|
||||
basedir="../jsp/" excludes="web.xml, *.css, *.java, *.jsp, web-fragment.xml">
|
||||
</war>
|
||||
</target>
|
||||
<target name="precompilejsp" unless="precompilejsp.uptodate">
|
||||
|
@ -0,0 +1,20 @@
|
||||
package net.i2p.router.web;
|
||||
|
||||
/**
|
||||
* Copied and modded from I2PTunnel IndexBean (GPL)
|
||||
* @author zzz
|
||||
*/
|
||||
public class CSSHelper extends HelperBase {
|
||||
public CSSHelper() {}
|
||||
|
||||
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
||||
private static final String BASE = "/themes/console/";
|
||||
|
||||
public String getTheme() {
|
||||
String url = BASE;
|
||||
String theme = _context.getProperty(PROP_THEME_NAME);
|
||||
if (theme != null)
|
||||
url += theme + "/";
|
||||
return url;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user