I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Adding CSS rules for you theme

The icon for the Classic theme

When a non-default Redmine theme is used, you can experience different kinds of issues with this plugin... Thus, till support for theming was added to it, the plugin had issues:

  • The plugin adds the Adevertisements menu item to the top menu. In the Classic theme all such menu items have an icon...
    The Advertisements menu item did not have it.
  • The list of advertisements includes previews. In the Red-Andy headings on the sidebar have a different background color...
    Therefore, “previews” looked different, not as on the sidebar.

So the support for theming was added to make fixing such issues easier.

Theme file

Redmine themes are pure CSS customisations, which should be specified in CSS files located under the public/themes directory. Theme files are required to be under a single directory here, the name of which is used as the name of the theme.

For example:

$ ls -l public/themes
-rw-r--r-- 1 root root   30 Jun 18  2012 README
drwxr-xr-x 3 root root 4096 Jun 24 14:13 alternate
drwxr-xr-x 4 root root 4096 Jun 24 14:13 classic
drwxr-xr-x 1 root root 4096 Aug  7 12:17 red-andy

Here you see themes: Alternate, Classic and Red-Andy...

The plugin can load additional CSS rules for a particular theme. Such CSS rules must be specified in a single file, named after the theme name (i.e., equal to the theme’s directory name) and with the extension .css. This file must be located under the plugin’s assets/stylesheets directory.

Thus, the plugin comes with:

$ ls -l assets/stylesheets
-rw-r--r-- 1 s-andy s-andy 852 Aug 18 15:11 advertisement.css
-rw-r--r-- 1 s-andy s-andy 256 Aug 18 15:11 classic.css
-rw-r--r-- 1 s-andy s-andy 464 Aug 18 16:26 red-andy.css

So here you see customizations for the Classic and Red-Andy themes.

Courtesy

I did shared this plugin with you and other users, so you please share your theme fixes with me and others too! You can use the Theme tracker for this...

advertisements-icon.png View - The icon for the Classic theme (3.19 KB) Andriy Lesyuk, 06 Sep 2013 00:05

Terms of use | Privacy policy