Last updated by Lynorics 3 years ago
grails install-plugin skinnable
Last updated by Lynorics 3 years ago
Skinnable Plugin
The
Skinnable Plugin brings support for user selectable skins. Per default, grails only supports »main.css«, but users often wish to change the skin.
For this purpose the
Skinnable Plugin has been developed. Now, users can switch between predefined skins of your site/application.
Actually, there is a very basic support only. The user is just able to change the css applied to your gsp files.
But in a future release it may be possible to let the user configure several aspects of a skin, like colors and so on. The selected values could be injected to the underlying css file, also.
Installation
grails install-plugin skinnable
Usage
After installation you will find a new directory
It contains the skin classes. You can create a new skin by calling
grails create-skin skin _name_
The generated skin class looks like this one:
class DefaultSkin
{
static String name = "default";
static String description = "The default skin";
static String css = "main.css";
}
name:
Just an identifier.
description:
A description of the skin.
css:
The css file used for the skin.
- Modify/rename/duplicate the class for your needs. Each skin has to be represented by its own class.
Default---if no skin is selected---is always »main.css«.
- After that, create the referred css files.
- Now, replace
<link rel="stylesheet" href="/dummy/css/main.css" />
by the new tag
in »main.gsp«---or wherever else needed.
- The controller »skin«, action »select«, is responsible for configuration of the skin by the user. (http://.../skin/)
So, set a link somewhere in your site/application to it.
The selected skin is stored in a cookie.

Scheduled for next release
Release 0.3Version history
v0.1-
March, 3rd 2008
v0.2-March, 6th 2008
Last updated by Lynorics 3 years ago
- Where can I find/file issues?
See
JIRA
Last updated by admin 3 years ago