Difference between revisions of "Themes"
m |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | |||
{{for|information about a theme archive|Theme Package Structure}} | {{for|information about a theme archive|Theme Package Structure}} | ||
− | {{for|commonly used classes and | + | {{for|commonly used classes and ids used in themes|Layout Structure}} |
− | + | ||
− | + | ||
− | {{Css Image Crop | + | <br /> |
+ | |||
+ | {{TOC right}}</noinclude>{{Css Image Crop | ||
|Image = Unroole Admin Panel - Themes Channel.png | |Image = Unroole Admin Panel - Themes Channel.png | ||
|bSize = 300px | |bSize = 300px | ||
Line 15: | Line 14: | ||
}} | }} | ||
− | Typically most [[Channels]] only contain a small amount of default css and javascript that is provided by the layout and widgets used on a page. Themes are then used to provide the basic creative design of a channel. Each theme is composed of | + | Typically most [[Channels]] only contain a small amount of default css and javascript that is provided by the layout and widgets used on a page. Themes are then used to provide the basic creative design of a channel. Each theme is composed of four key components: |
* [[Themes#Frameworks|Frameworks]] | * [[Themes#Frameworks|Frameworks]] | ||
Line 22: | Line 21: | ||
* [[Themes#Media Assets|Media Assets]] | * [[Themes#Media Assets|Media Assets]] | ||
− | These components combine with the CSS/JS/HTML generated by a [[Layout]] and then augmented by [[Stylesheets]] and [[JavaScripts]] to provide the final design of channel. To use a theme on a particular channel see [[Theme Queue]]. | + | These components combine with the CSS/JS/HTML generated by a [[Layout]] and then augmented by [[Stylesheets]] and [[JavaScripts]] to provide the final design of a channel. To use a theme on a particular channel see [[Theme Queue]]. |
− | There are two types of | + | There are two types of themes in unroole, basic and public. Basic themes are the most common form of a theme and can be applied to a channel to change its overall style and appearance. Public themes are themes that are visible to all users. |
{{clear}} | {{clear}} | ||
Line 46: | Line 45: | ||
== Management == | == Management == | ||
− | Unlike other resources in the system themes | + | Unlike other resources in the system, themes cannot be updated. Instead themes provide a mechanism for sharing and exporting to overcome the inability to update. The different actions available for theme management are: |
* [[{{PAGENAME}}#Importing|Importing]] | * [[{{PAGENAME}}#Importing|Importing]] |
Latest revision as of 14:05, 21 September 2012
Typically most Channels only contain a small amount of default css and javascript that is provided by the layout and widgets used on a page. Themes are then used to provide the basic creative design of a channel. Each theme is composed of four key components:
These components combine with the CSS/JS/HTML generated by a Layout and then augmented by Stylesheets and JavaScripts to provide the final design of a channel. To use a theme on a particular channel see Theme Queue.
There are two types of themes in unroole, basic and public. Basic themes are the most common form of a theme and can be applied to a channel to change its overall style and appearance. Public themes are themes that are visible to all users.
Frameworks
The basis of most themes usually includes a framework or multiple frameworks from which a core amount of theme functionality is derived. These frameworks could be javascript or css template frameworks that provided a group of files to be included. The framework folder for each theme allows for a pre-existing framework to be dropped into a theme without the need to conform to a specific structure or separate the files.
In some cases, widgets may require specific frameworks to be present so that advanced functionality or features of the widget can be used. For example, the Gallery widget requires the jquery and the colorbox frameworks be part of a theme to be able to support light-box functionality.
In each theme package, frameworks can be found under the "frameworks" folder. See Theme Structure for more details.
Stylesheets
As a part of each theme package stylesheets can be added which allows a theme builder to included the css files that will be loaded up when this theme is active. Each stylesheet that is added to a theme can be added into the css load system along with the system css files and channel level Stylesheets. The properties.xml file allows theme designers to change the ordering of the css to ensure that files are loaded in the correct order. All stylesheet files add to this list will be added to the header of a page using that theme.
In each theme package stylesheet files can be found under the "stylesheets" folder. Some additional stylesheets may be found in frameworks. See Theme Structure for more details.
JavaScripts
Javascript files in themes function exactly the same way as Theme Stylesheets. The can be added in either the framework or "javascripts" folder and then referenced in the properties.xml file. Loading of javascript files also works the same way allowing a theme designer to change the ordering of the javascript files as they appear on the page. In each theme package javascript files can be found under the "javasciripts" folder as well as the "frameworks" folder. See Theme Stylesheets for more details.
Most themes will contain at least one or two framework javascript files such as jquery and then additional files to augment or change the way existing widget looks or act when the theme is used.
Media Assets
Media assets can be thought of as asset with which the theme would not look or function correctly and is used by the designer to include content that must be loaded up through a theme's javascript or stylesheet files. These assets do not have any relationship to Assets in the asset library and are handled outside of that process. Each media asset relies on the theme and browsers ability to interpret the file to be used. Additionally these media files could also include text documents or csv files used by a javascript library to display some meaningful static content. In the most extreme case the media assets could also store custom flash (swf), java applet (jar) or other web app formats that may not work on all browsers or rely on extended functionality.
The following examples display two ways of achieving the same default background design using normal stylesheets and themes.
Example 1: Background via Asset Library
- Upload background.jpg to the Asset library.
- Reference the background.jpg file in a custom unroole stylesheet
- Activate the stylesheet on the channel for the background to take effect.
Example 2: Background via Theme
- Include background.jpg in the media assets folder of a theme.
- Reference the background.jpg file in a css file as part of the theme ex: "body { background-image: url(../media_assets/background.jpg) }"
- Load the theme into the channel to set the default background.
The benefit of adding the media assets to themes over the asset library is that it makes the theme portable and does not rely on the specific assets available on an account or specific setup. Designers should take care to only include the media assets necessary to the theme and not those that are often to change or should be included to the asset library such as PDF's or documents.
Management
Unlike other resources in the system, themes cannot be updated. Instead themes provide a mechanism for sharing and exporting to overcome the inability to update. The different actions available for theme management are:
Importing
Importing theme archives is a critical part of the design process of unroole. To use a theme it must first be imported into the system via an archive upload or shared.
To upload an existing theme from an archive file follow the steps below.
- Navigate to the theme section.
- From the index panel click the "Upload" button.
- Enter a name for the theme
- (optional) Enter a description for the theme
- Select the theme archive file that will be uploaded.
- Click "Submit" to upload the archive.
The system always checks for consistency and format during an archive's import process. Any archives which are not of the correct format will fail to upload correctly. This ensures that only themes which are compatible with unroole will be available for use.
Sharing
Sharing themes is a good way of moving a theme to another account that the user has access to without needing to go through the theme export/import cycle. Sharing a theme between accounts creates a copy of that theme that can be managed independently from the original. To share a theme follow these steps:
- Navigate to the Theme section of an Account or Channel.
- Select and view the theme to be shared.
- Click the "Share" button from the action menu.
- Adjust the name/description of the theme after it is shared.
- Select the locations to share this theme.
- Publicly - Makes a copy of the theme for public use.
- Accounts - Makes a copy of this theme on either the current or another account the user has theme management access to.
- Click 'Submit" to share this theme.
Although a theme on an Account or Channel can be shared, only an Account can be used as a share destination. To share a theme specifically with another channel, an admin must export/import the theme to the destination channel. To share a theme with a channel follow these steps:
- Navigate to the Theme section of an Account or Channel.
- Select and view the theme to be shared.
- Click the "Export" button from the action menu.
- Click "Submit" to export the theme to an archive.
- Navigate to the Theme section of the Channel used as the destination.
- Click "Upload a Theme"
- Select the previously created theme archive to upload.
- Click 'Submit" to add this theme to the channel.
Queuing
The theme queue allows for themes on a channel to be scheduled similarly to Pages. This queue allows for amins to manage not only the current active theme but also the themes that will become active in the future. This feature should be used in tandem with both Page Scheduling and the Channel Layout Queue when managing the overall design of the website. The queue can be used to automate the process of changing a channel's design such as the following examples
- Holiday/Promotions - To modify the design of a channel during a holiday and set it back afterwards.
- Upgrades - To schedule the channel's default design to automatically change during off peak hours.
- Testing - To apply channel wide design changes on a staging channel when testing.
Any theme available on either a Channel or it's corresponding Account can be added as follows:
- Navigate to the "Theme Queue" section of a channel.
- Click the calendar icon beside a theme shown in the bottom panel of the "Theme Queue" section.
- Change the date/time
- Click the date field and use the quick change menu to schedule the date the theme will go live.
- Alternatively change date text to reflect the new date/time.
- Click "Schedule" to add the theme to the queue.
Theme entries can be removed by using the "x" item beside each theme in the queue. The theme queue allows for the same theme to be queued multiple times however once a theme has been queued it cannot be deleted until all of its queued entries have been removed.
Unlike a basic theme a public theme cannot be directly en-queued in a channel. This prevents any updates to that theme from breaking the visual style of a site. Instead public theme's can be copied into a user's account or channel where an exact copy is made as a basic theme.
Exporting
Any theme for which a user has edit access can be exported from the system. The export feature creates an archive file which contains all of the information about the theme. This includes:
- JavaScript files
- Stylesheet files
- Media Assets
- CSS/JS loading order
Each time a theme is downloaded, it creates a zip archive which contains all the information about that theme. More information on the contents and structure of the package can be found in Theme Package Structure.
An empty theme package can be downloaded using the following process:
- Navigate to the Theme Section of the CMS (On either an Account or Channel).
- Click the 'Export Theme' button on the Theme index page.
- Click 'Submit' to download a new empty theme package.
To make it easier for designers to make changes to a theme without constantly needing to upload new versions, the system supports the ability to export channel layout HTML code along with the theme. When the theme package is built, this html can be loaded into a browser or editor of choice and includes all theme links re-written to be used offline. This allows for designers to make changes outside of the CMS and then only uploading the theme when its ready for testing.
Existing theme packages can be exported using the following process:
- Navigate to the Theme Section of the CMS (On either an Account or Channel).
- Select and show the theme to be exported.
- Click the export button in the action area.
- Select the Channel Layouts (if any are available) to export along with the package.
- Click 'Submit' to download the package.
In addition to existing theme's a blank theme can be exported to aid in building a correctly formed theme package. To export a blank theme:
- Navigate to the Theme Section of the CMS (On either an Account or Channel).
- Click "Export"
- You should be prompted to export a new blank theme. From this point follow the steps outlined when exporting a normal theme.
Deleting
Deletion of a theme works similar to other resources in the system.