Author: danhaywood
Date: Fri Nov 14 17:11:43 2014
New Revision: 1639703
URL: http://svn.apache.org/r1639703
Log:
theme choosers
Added:
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-1.png
(with props)
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-2.png
(with props)
isis/site/trunk/content/components/viewers/wicket/writing-a-custom-theme.md
Modified:
isis/site/trunk/content/components/viewers/wicket/showing-a-theme-chooser.md
isis/site/trunk/content/documentation.md
Added:
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-1.png
URL:
http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-1.png?rev=1639703&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-1.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-2.png
URL:
http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-2.png?rev=1639703&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
isis/site/trunk/content/components/viewers/wicket/images/theme-chooser/example-2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
isis/site/trunk/content/components/viewers/wicket/showing-a-theme-chooser.md
URL:
http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/wicket/showing-a-theme-chooser.md?rev=1639703&r1=1639702&r2=1639703&view=diff
==============================================================================
---
isis/site/trunk/content/components/viewers/wicket/showing-a-theme-chooser.md
(original)
+++
isis/site/trunk/content/components/viewers/wicket/showing-a-theme-chooser.md
Fri Nov 14 17:11:43 2014
@@ -11,9 +11,23 @@ This is done using the following configu
isis.viewer.wicket.themes.showChooser=true
-It is also possible to limit the number themes, to some subset of those in
bootswatch. This is done using a further
+
+Example 1:
+
+<a href="images/theme-chooser/example-1.png"><img
src="images/theme-chooser/example-1.png"/></a>
+
+Example 2:
+
+<a href="images/theme-chooser/example-2.png"><img
src="images/theme-chooser/example-2.png"/></a>
+
+
+It is also possible to restrict the themes shown to some subset of those in
bootswatch. This is done using a further
property:
isis.viewer.wicket.themes.enabled=bootstrap-theme,Cosmo,Flatly,Darkly,Sandstone,United
where the value is the list of themes (from
[bootswatch.com](http://bootswatch.com)) to be made available.
+
+
+You can also write and install a custom themes (eg to fit your company's
look-n-feel/interface guidelines); see
+[here](writing-a-custom-theme.html) for further details.
\ No newline at end of file
Added:
isis/site/trunk/content/components/viewers/wicket/writing-a-custom-theme.md
URL:
http://svn.apache.org/viewvc/isis/site/trunk/content/components/viewers/wicket/writing-a-custom-theme.md?rev=1639703&view=auto
==============================================================================
--- isis/site/trunk/content/components/viewers/wicket/writing-a-custom-theme.md
(added)
+++ isis/site/trunk/content/components/viewers/wicket/writing-a-custom-theme.md
Fri Nov 14 17:11:43 2014
@@ -0,0 +1,32 @@
+Title: Writing a Custom Theme (1.8.0-SNAPSHOT)
+
+The Isis Wicket viewer uses [Bootstrap](http://getbootstrap.com/) styles and
components (courtesy of the
+[Wicket Bootstrap](https://github.com/l0rdn1kk0n/wicket-bootstrap)
integration).
+
+By default the viewer uses the default bootstrap theme. As described
[here](showing-a-theme-chooser.html), it is
+possible to allow the user to select other themes provided by
[bootswatch.com](http://bootswatch.com), and if required
+one of these can be [set as the default](specifying-a-default-theme.html).
+
+However, you may instead want to write your own custom theme, for example to
fit your company's look-n-feel/interface
+guidelines. This is done by implementing [Wicket
Bootstrap](https://github.com/l0rdn1kk0n/wicket-bootstrap)âs
+`de.agilecoders.wicket.core.settings.ITheme` class. This defines:
+
+* the name of the theme
+* the resources it needs (the CSS and optional JS and/or fonts), and
+* optional urls to load them from a Content Delivery Network (CDN).
+
+To make use of the custom `ITheme` the application should register it by
adding the following snippet in
+(your application's subclass of) `IsisWicketApplication`:
+
+ public void init() {
+
+ ...
+ IBootstrapSettings settings = new BootstrapSettings();
+ ThemeProvider themeProvider = new SingleThemeProvider(new MyTheme());
+ settings.setThemeProvider(themeProvider);
+
+ Bootstrap.install(getClass(), settings);
+ }
+
+
+
Modified: isis/site/trunk/content/documentation.md
URL:
http://svn.apache.org/viewvc/isis/site/trunk/content/documentation.md?rev=1639703&r1=1639702&r2=1639703&view=diff
==============================================================================
--- isis/site/trunk/content/documentation.md (original)
+++ isis/site/trunk/content/documentation.md Fri Nov 14 17:11:43 2014
@@ -447,7 +447,7 @@ Features, configuration and UI customisa
* [Number of bookmarked pages](components/viewers/wicket/bookmarks.html)
* [Stripped Wicket tags](components/viewers/wicket/stripped-wicket-tags.html)
* [Disabling modal
dialogs](components/viewers/wicket/disabling-modal-dialogs.html)
-* [Showing a Theme
Chooser](components/viewers/wicket/showing-a-theme-chooser.html)
(1.8.0-SNAPSHOT)
+* [Showing a theme
chooser](components/viewers/wicket/showing-a-theme-chooser.html)
(1.8.0-SNAPSHOT)
}
@@ -471,6 +471,7 @@ Features, configuration and UI customisa
#### <a name="wicket-viewer-extensions">Extending the viewer</a>
+* [Writing a custom
theme](components/viewers/wicket/writing-a-custom-theme.html) (1.8.0-SNAPSHOT)
* [Replacing page
elements](components/viewers/wicket/customizing-the-viewer.html)
* [Custom pages](components/viewers/wicket/custom-pages.html)