From: David ‘Bombe’ Roden Date: Thu, 28 Oct 2010 04:13:59 +0000 (+0200) Subject: Add “help” page. X-Git-Tag: 0.2-RC1~102 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=9ad7670a3f8d82914939e89e5b3d429bb5fcbbb4;p=Sone.git Add “help” page. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index c27b530..fd4365e 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -222,6 +222,7 @@ public class WebInterface extends AbstractService { Template blacklistSoneTemplate = templateFactory.createTemplate(createReader("/templates/blacklistSone.html")); Template unblacklistSoneTemplate = templateFactory.createTemplate(createReader("/templates/unblacklistSone.html")); Template aboutTemplate = templateFactory.createTemplate(createReader("/templates/about.html")); + Template helpTemplate = templateFactory.createTemplate(createReader("/templates/help.html")); PageToadletFactory pageToadletFactory = new PageToadletFactory(sonePlugin.pluginRespirator().getHLSimpleClient(), "/Sone/"); pageToadlets.add(pageToadletFactory.createPageToadlet(new IndexPage(indexTemplate, this), "Index")); @@ -252,6 +253,7 @@ public class WebInterface extends AbstractService { pageToadlets.add(pageToadletFactory.createPageToadlet(new BlacklistSonePage(blacklistSoneTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new UnblacklistSonePage(unblacklistSoneTemplate, this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new AboutPage(aboutTemplate, this, SonePlugin.VERSION), "About")); + pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("help.html", helpTemplate, "Page.Help.Title", this), "Help")); pageToadlets.add(pageToadletFactory.createPageToadlet(new SoneTemplatePage("noPermission.html", noPermissionTemplate, "Page.NoPermission.Title", this))); pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("css/", "/static/css/", "text/css"))); pageToadlets.add(pageToadletFactory.createPageToadlet(new StaticPage("javascript/", "/static/javascript/", "text/javascript"))); diff --git a/src/main/resources/i18n/sone.en.properties b/src/main/resources/i18n/sone.en.properties index da7c8db..914d9a8 100644 --- a/src/main/resources/i18n/sone.en.properties +++ b/src/main/resources/i18n/sone.en.properties @@ -22,6 +22,16 @@ Navigation.Menu.Item.Blacklist.Name=Blacklist Navigation.Menu.Item.Blacklist.Tooltip=Manages the global blacklist Navigation.Menu.Item.About.Name=About Navigation.Menu.Item.About.Tooltip=Information about Sone +Navigation.Menu.Item.Help.Name=Help +Navigation.Menu.Item.Help.Tooltip=The Sone User Manual + +Page.Help.Title=Help - Sone +Page.Help.Page.Title=The Sone User Manual +Page.Help.Text.Introduction=Though Sone aims to be very easy to use there probably are a couple of functions that need to be explained. +Page.Help.Topic.Blocking.Title=What is “blocking?” +Page.Help.Topic.Blocking.Text=“Blocking a Sone” means to exclude it from the current Sone distribution method. Every time your Sone is updated, a list of all Sones you know is distributed as well—unless you block or blacklist a Sone. +Page.Help.Topic.Blacklisting.Title=What is the difference between “blocking” and “blacklisting?” +Page.Help.Topic.Blacklisting.Text=Blocking a Sone is only possible when you are logged in to a Sone so you can choose to not distribute somebody else’s Sone per Sone. Blacklisting works globally—a blacklisted Sone will not be distributed by any Sone on your node, starting with the next update of each Sone. Page.About.Title=About - Sone Page.About.Page.Title=About diff --git a/src/main/resources/static/css/sone.css b/src/main/resources/static/css/sone.css index 9b74217..0feb601 100644 --- a/src/main/resources/static/css/sone.css +++ b/src/main/resources/static/css/sone.css @@ -411,6 +411,13 @@ textarea { clear: both; } +#sone h2 { + font-family: inherit; + font-size: 150%; + font-weight: bold; + clear: both; +} + #sone .error label { color: red; font-weight: bold; diff --git a/src/main/resources/templates/help.html b/src/main/resources/templates/help.html new file mode 100644 index 0000000..f4a2f20 --- /dev/null +++ b/src/main/resources/templates/help.html @@ -0,0 +1,15 @@ +<%include include/head.html> + +

<%= Page.Help.Page.Title|l10n|html>

+ +

<%= Page.Help.Text.Introduction|l10n|html>

+ +

<%= Page.Help.Topic.Blocking.Title|l10n|html>

+ +

<%= Page.Help.Topic.Blocking.Text|l10n|html>

+ +

<%= Page.Help.Topic.Blacklisting.Title|l10n|html>

+ +

<%= Page.Help.Topic.Blacklisting.Text|l10n|html>

+ +<%include include/tail.html>