<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Themes in Allura</title><link>https://forge-allura.apache.org/p/allura/wiki/Themes%2520in%2520Allura/</link><description>Recent changes to Themes in Allura</description><atom:link href="http://forge-allura.apache.org/p/allura/wiki/Themes%20in%20Allura/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 11 Dec 2014 20:35:40 -0000</lastBuildDate><atom:link href="http://forge-allura.apache.org/p/allura/wiki/Themes%20in%20Allura/feed" rel="self" type="application/rss+xml"/><item><title>Themes in Allura modified by Dave Brondsema</title><link>https://forge-allura.apache.org/p/allura/wiki/Themes%2520in%2520Allura/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -54,12 +54,22 @@
 ~~~~

 ## CSS
-Any custom CSS should be created in the registered resources path for the theme. In the mytheme example we've been working with, that would be mytheme/nf/mytheme/css/ Once you've created your custom css files, you can include them by registering them in the ThemeProvider's "require" method.
+
+Custom CSS should be created in the registered resources path for the theme. In the mytheme example we've been working with, that would be mytheme/nf/mytheme/css/ Once you've created your custom css files, you can include them by registering them in the ThemeProvider's "require" method.

 ~~~~
 ::python
     def require(self):
         g.register_theme_css('css/mycustom.css', compress=False)
+~~~~
+
+Alternatively, your theme can re-use all the CSS from a "parent" theme (e.g. if you are using the default allura theme, but overriding the header macro HTML only).  To do that, you don't need any `require` method.  Instead define an `href` method in your `ThemeProvider` like this:
+
+~~~~
+::python
+    def href(self, href):
+        # use URL paths to the 'allura' theme
+        return super(AlluraSiteTheme, self).href(href, theme_name='allura') 
 ~~~~

 ## Icons
@@ -95,11 +105,10 @@

 Your theme's `macros.html` should have a line `{% extends 'allura:templates/jinja_master/theme_macros.html' %}` and then define the macros that you want to override.

+Overriding arbitrary template files is possible with an [\[allura.theme.override\]](https://forge-allura.apache.org/docs/api/lib/package_path_loader.html) configuration.

 ## JavaScript, images, and other file includes
 Files in the registered resource directory may be used in your HTML macros like `&amp;lt;script src="{{path_to_static}}js/mytheme/myscript.js"&amp;gt;&amp;lt;/script&amp;gt;` or elsewhere like `&amp;lt;script src="{{g.theme_href('js/mytheme/myscript.js')}}"&amp;gt;&amp;lt;/script&amp;gt;`.

-Overriding arbitrary template files is possible with an [\[allura.theme.override\]](https://forge-allura.apache.org/docs/api/lib/package_path_loader.html) configuration.
-
 ## Ideas for future improvement
 At SourceForge, we have a custom Allura theme that uses SASS to manage the css. It would be great to start using SASS in Allura to make it easier for others to retheme.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 11 Dec 2014 20:35:40 -0000</pubDate><guid>https://forge-allura.apache.org10263779654c92488fb2d3a89491e4d63eee4bee</guid></item><item><title>Themes in Allura modified by Dave Brondsema</title><link>https://forge-allura.apache.org/p/allura/wiki/Themes%2520in%2520Allura/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -4,6 +4,8 @@

 ## Overview
 Allura instances may be have a custom theme applied by including replacement css, html, icons, and other resources as needed. To manage themes, Allura has a [ThemeProvider](https://forge-allura.apache.org/docs/api/lib/plugin.html#allura.lib.plugin.ThemeProvider) class that can be extended. This document explains what functionality can be extended through the ThemeProvider as well as some usage examples.
+
+An example may be seen in the "[AlluraSite](https://forge-allura.apache.org/p/allura/AlluraSite/)" repo which has a custom theme to add a copyright line to the footer of Allura's own website.

 ## Creating and using a new theme
 To set up a new theme, create a package for the theme with an entry point that goes to the [ThemeProvider](https://forge-allura.apache.org/docs/api/lib/plugin.html#allura.lib.plugin.ThemeProvider) defined for your custom theme. For instance, if you have a new theme called "mytheme", you would create an entry point like this in the `setup.py` for that package:
@@ -89,18 +91,15 @@
         jinja_macros = 'mytheme:templates/mytheme/macro.html'
 ~~~~

-The following macros are available:
+A number of macros are available.  You should look at Allura's [theme_macros.html](https://forge-allura.apache.org/p/allura/git/ci/master/tree/Allura/allura/templates/jinja_master/theme_macros.html) to see a full list of what they are, and what the default HTML content for each is.  Common macros to override are `header` and `footer`.

-### Header
+Your theme's `macros.html` should have a line `{% extends 'allura:templates/jinja_master/theme_macros.html' %}` and then define the macros that you want to override.

-This HTML appears immediately after the body tag. You will probably want to put a header here. The parameters should look like `{%- macro header(login_url, logout_url, show_search_box=True, extra_html='') %}`.
-
-### Footer
-
-This HTML appears immediately before the close body tag. The parameters should look like `{%- macro footer(year, path_to_static='') %}`.

 ## JavaScript, images, and other file includes
 Files in the registered resource directory may be used in your HTML macros like `&amp;lt;script src="{{path_to_static}}js/mytheme/myscript.js"&amp;gt;&amp;lt;/script&amp;gt;` or elsewhere like `&amp;lt;script src="{{g.theme_href('js/mytheme/myscript.js')}}"&amp;gt;&amp;lt;/script&amp;gt;`.

+Overriding arbitrary template files is possible with an [\[allura.theme.override\]](https://forge-allura.apache.org/docs/api/lib/package_path_loader.html) configuration.
+
 ## Ideas for future improvement
 At SourceForge, we have a custom Allura theme that uses SASS to manage the css. It would be great to start using SASS in Allura to make it easier for others to retheme.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Thu, 11 Dec 2014 20:32:03 -0000</pubDate><guid>https://forge-allura.apache.orgdba3f6ab18898a833b20cc61736f82139e09431a</guid></item><item><title>Themes in Allura modified by Dave Brondsema</title><link>https://forge-allura.apache.org/p/allura/wiki/Themes%2520in%2520Allura/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -3,12 +3,13 @@
 # Themes in Allura

 ## Overview
-Allura instances may be have a custom theme applied by including replacement css, html, icons, and other resources as needed. To manage themes, Allura has a ThemeProvider class that can be extended. This document explains what functionality can be extended through the ThemeProvider as well as some usage examples.
+Allura instances may be have a custom theme applied by including replacement css, html, icons, and other resources as needed. To manage themes, Allura has a [ThemeProvider](https://forge-allura.apache.org/docs/api/lib/plugin.html#allura.lib.plugin.ThemeProvider) class that can be extended. This document explains what functionality can be extended through the ThemeProvider as well as some usage examples.

 ## Creating and using a new theme
-To set up a new theme, create a package for the theme with an entry point that goes to the ThemeProvider defined for your custom theme. For instance, if you have a new theme called "mytheme", you would create an entry point like this in the setup.py for that package:
+To set up a new theme, create a package for the theme with an entry point that goes to the [ThemeProvider](https://forge-allura.apache.org/docs/api/lib/plugin.html#allura.lib.plugin.ThemeProvider) defined for your custom theme. For instance, if you have a new theme called "mytheme", you would create an entry point like this in the `setup.py` for that package:

 ~~~~
+::ini
     [allura.theme]
     mytheme = mytheme:ThemeProvider
 ~~~~
@@ -33,6 +34,7 @@
 Based on that layout, your register_ew_resources would look like:

 ~~~~
+::python
     @classmethod
     def register_ew_resources(cls, manager, name):
         manager.register_directory(
@@ -45,6 +47,7 @@
 Once you have customized your new ThemeProvider, tell your Allura instance to use the new theme by modifying your .ini file:

 ~~~~
+::ini
     theme = mytheme
 ~~~~

@@ -52,6 +55,7 @@
 Any custom CSS should be created in the registered resources path for the theme. In the mytheme example we've been working with, that would be mytheme/nf/mytheme/css/ Once you've created your custom css files, you can include them by registering them in the ThemeProvider's "require" method.

 ~~~~
+::python
     def require(self):
         g.register_theme_css('css/mycustom.css', compress=False)
 ~~~~
@@ -60,6 +64,7 @@
 The icons used by Allura to represent each tool may be customized. To do so, modify the icons dict in your ThemeProvider. Be sure to provide an option for each size as they are all used through the application.

 ~~~~
+::python
 icons = {
     'admin': {
         24:'images/mytheme/24x24/admin_24.png',
@@ -79,6 +84,7 @@
 You can customize selected parts of the template HTML through jinja macros. To set this up, tell your ThemeProvider where the macros are located:

 ~~~~
+::python
     class ThemeProvider(plugin.ThemeProvider):
         jinja_macros = 'mytheme:templates/mytheme/macro.html'
 ~~~~
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Mon, 08 Dec 2014 23:06:23 -0000</pubDate><guid>https://forge-allura.apache.orge39b38d672cfeb548bbbf5df80f245e791ec51e2</guid></item><item><title>Themes in Allura modified by Dave Brondsema</title><link>https://forge-allura.apache.org/p/allura/wiki/Themes%2520in%2520Allura/</link><description>&lt;div class="markdown_content"&gt;&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#themes-in-allura"&gt;Themes in Allura&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#overview"&gt;Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#creating-and-using-a-new-theme"&gt;Creating and using a new theme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#css"&gt;CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#icons"&gt;Icons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#html"&gt;HTML&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="#header"&gt;Header&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#footer"&gt;Footer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#javascript-images-and-other-file-includes"&gt;JavaScript, images, and other file includes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#ideas-for-future-improvement"&gt;Ideas for future improvement&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h1 id="themes-in-allura"&gt;Themes in Allura&lt;/h1&gt;
&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Allura instances may be have a custom theme applied by including replacement css, html, icons, and other resources as needed. To manage themes, Allura has a ThemeProvider class that can be extended. This document explains what functionality can be extended through the ThemeProvider as well as some usage examples.&lt;/p&gt;
&lt;h2 id="creating-and-using-a-new-theme"&gt;Creating and using a new theme&lt;/h2&gt;
&lt;p&gt;To set up a new theme, create a package for the theme with an entry point that goes to the ThemeProvider defined for your custom theme. For instance, if you have a new theme called "mytheme", you would create an entry point like this in the setup.py for that package:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;allura&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;mytheme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;ThemeProvider&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Before you can follow any of the steps below to customize the theme, you need to specify the directory where your custom files are stored. Do this by creating a "register_ew_resources" method in your ThemeProvider. This is an example directory layout for mytheme:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;module_root&lt;/span&gt;
    &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;
    &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;mytheme&lt;/span&gt;
    &lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="n"&gt;mytheme_main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ThemeProvider&lt;/span&gt; &lt;span class="n"&gt;goes&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;here&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="n"&gt;nf&lt;/span&gt;
    &lt;span class="o"&gt;---&lt;/span&gt; &lt;span class="n"&gt;mytheme&lt;/span&gt;
    &lt;span class="o"&gt;----&lt;/span&gt; &lt;span class="n"&gt;css&lt;/span&gt;
    &lt;span class="o"&gt;----&lt;/span&gt; &lt;span class="n"&gt;images&lt;/span&gt;
    &lt;span class="o"&gt;----&lt;/span&gt; &lt;span class="n"&gt;js&lt;/span&gt;
    &lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="n"&gt;templates&lt;/span&gt;
    &lt;span class="o"&gt;---&lt;/span&gt; &lt;span class="n"&gt;mytheme&lt;/span&gt;
    &lt;span class="o"&gt;----&lt;/span&gt; &lt;span class="n"&gt;macro&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Based on that layout, your register_ew_resources would look like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="n"&gt;classmethod&lt;/span&gt;
    &lt;span class="n"&gt;def&lt;/span&gt; &lt;span class="n"&gt;register_ew_resources&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;manager&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;manager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_directory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;/%&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;pkg_resources&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resource_filename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;nf&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once you have customized your new ThemeProvider, tell your Allura instance to use the new theme by modifying your .ini file:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mytheme&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="css"&gt;CSS&lt;/h2&gt;
&lt;p&gt;Any custom CSS should be created in the registered resources path for the theme. In the mytheme example we've been working with, that would be mytheme/nf/mytheme/css/ Once you've created your custom css files, you can include them by registering them in the ThemeProvider's "require" method.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;def&lt;/span&gt; &lt;span class="n"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_theme_css&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;css&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mycustom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;css&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;compress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="icons"&gt;Icons&lt;/h2&gt;
&lt;p&gt;The icons used by Allura to represent each tool may be customized. To do so, modify the icons dict in your ThemeProvider. Be sure to provide an option for each size as they are all used through the application.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;icons&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="n"&gt;x24&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;admin_24&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="n"&gt;x32&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;admin_32&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="n"&gt;x48&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;admin_48&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="n"&gt;x24&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;blog_24&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="n"&gt;x32&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;blog_32&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;images&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="n"&gt;x48&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;blog_48&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="html"&gt;HTML&lt;/h2&gt;
&lt;p&gt;You can customize selected parts of the template HTML through jinja macros. To set this up, tell your ThemeProvider where the macros are located:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;    &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;ThemeProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;plugin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ThemeProvider&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;jinja_macros&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;templates&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mytheme&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;macro&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The following macros are available:&lt;/p&gt;
&lt;h3 id="header"&gt;Header&lt;/h3&gt;
&lt;p&gt;This HTML appears immediately after the body tag. You will probably want to put a header here. The parameters should look like &lt;code&gt;{%- macro header(login_url, logout_url, show_search_box=True, extra_html='') %}&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="footer"&gt;Footer&lt;/h3&gt;
&lt;p&gt;This HTML appears immediately before the close body tag. The parameters should look like &lt;code&gt;{%- macro footer(year, path_to_static='') %}&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="javascript-images-and-other-file-includes"&gt;JavaScript, images, and other file includes&lt;/h2&gt;
&lt;p&gt;Files in the registered resource directory may be used in your HTML macros like &lt;code&gt;&amp;lt;script src="{{path_to_static}}js/mytheme/myscript.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt; or elsewhere like &lt;code&gt;&amp;lt;script src="{{g.theme_href('js/mytheme/myscript.js')}}"&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="ideas-for-future-improvement"&gt;Ideas for future improvement&lt;/h2&gt;
&lt;p&gt;At SourceForge, we have a custom Allura theme that uses SASS to manage the css. It would be great to start using SASS in Allura to make it easier for others to retheme.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 13 Sep 2013 15:45:27 -0000</pubDate><guid>https://forge-allura.apache.org7ae603ea9e981c230cc2566dcf589c227c364888</guid></item></channel></rss>