package net.pterodactylus.wotns.ui.web;
+import java.util.Arrays;
+import java.util.Collection;
+
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
import net.pterodactylus.util.web.Method;
* {@inheritDoc}
*/
@Override
+ protected Collection<String> getStyleSheets() {
+ return Arrays.asList("css/main.css");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
templateContext.set("ownIdentities", identityManager.getAllOwnIdentities());
templateContext.set("formPassword", webInterface.getWoTNSPlugin().getToadletContainer().getFormPassword());
}
+
}
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContextFactory;
import net.pterodactylus.util.template.TemplateParser;
+import net.pterodactylus.util.web.StaticPage;
import net.pterodactylus.wotns.freenet.wot.Identity;
import net.pterodactylus.wotns.main.IdentityComparator;
import net.pterodactylus.wotns.main.WoTNSPlugin;
import net.pterodactylus.wotns.template.IdentityAccessor;
+import net.pterodactylus.wotns.web.FreenetRequest;
import net.pterodactylus.wotns.web.PageToadlet;
import net.pterodactylus.wotns.web.PageToadletFactory;
import freenet.clients.http.ToadletContainer;
pageToadlets.add(pageToadletFactory.createPageToadlet(new EnableIdentityPage(new Template(), this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new AddTargetPage(addTargetTemplate, this)));
pageToadlets.add(pageToadletFactory.createPageToadlet(new EditTargetPage(new Template(), this)));
+ pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage<FreenetRequest>("css/", "/static/css/", "text/css")));
ToadletContainer toadletContainer = wotNSPlugin.getToadletContainer();
toadletContainer.getPageMaker().addNavigationCategory("/tns/index.html", "Navigation.Menu.Name", "Navigation.Menu.Tooltip", wotNSPlugin);