1.5 Themes Question Collection

1.5 Themes Question Collection

by Urs Hunkler -
Number of replies: 10
Picture of Core developers

Hello,

the growing number of questions relating to the Moodle 1.5 themes made me think how I can give some overview. I will write here a serial of short sections over the next time. Each will cover one topic of the Moodle 1.5 themes.

Please propose topics, make general comments about the 1.5 themes, how they work etc. here.

Please use the parallel thread "1.5 Themes Basics" to ask and comment on each written topic.

Urs

Average of ratings: -
In reply to Urs Hunkler

Re: 1.5 Themes Question Collection

by N Hansen -
Urs-I installed 1.5 very briefly on my site and did a little experimenting with the 1.5 theme. I tried using the Firefox developer add-on to test some changes to the themes. I've gone back to 1.4 for the time being, but I think it might be possible to prepare an upgrade to one's theme prior to installing 1.5 on one's server by using this tool. What I am thinking of doing is choosing CSS from the developer toolbar from within test.moodle.com, selecting edit CSS, and then loading a copy of one of the 1.5 themes and modifying it until it matches my 1.4 theme. Does this seem like a good way of preparing for 1.5 without having it installed on one's own server?
In reply to N Hansen

Re: 1.5 Themes Question Collection

by Andrea Bicciolo -

Nicole, Urs will be certainly give you a far more complete answer, btw I'm now in the process of creating a couple of theme for 1.5dev, and the following is my two cents about.

After some tries, what I currently do is to load the styles_layout.css from the "standard" theme, thus omitting "standard" styles_color and styles_fonts, then I build from scratch the custom theme css for fonts and colors.

If some layout of "standard" theme is not good for you, you can always ovverride it on your custom style sheets.

Of course I'm using FireFox with the web developer extension, in any case be carefull since some class is omitted from display. If you find yourself creating not working classes for apparently no reason, switch to code view and check for classes that are not shown.

In reply to Andrea Bicciolo

Re: 1.5 Themes Question Collection

by Urs Hunkler -
Picture of Core developers
Hi Andrea,

I had looked at your work on the theme "formal_white" and saw that you kept "layout.css" and changed only "fonts.css" and "colors.css". I thought "Wow, very clever use of the 1.5 CSS handling". Great wink
In reply to Urs Hunkler

Re: 1.5 Themes Question Collection

by Andrea Bicciolo -

Thanks Urs, I choose this way since I found myself overriding lot of classes when keep loading all three standars styles: so after a brief discussion with Martin I selected this way to minimize the effort maximizing the font and colors consitency across site pages.

BTW, the formal_white theme still need work to be conisdered ready.

In reply to N Hansen

Re: 1.5 Themes Question Collection

by Urs Hunkler -
Picture of Core developers

Hi Nicole,

you could do that, but it means going the hard way. The CSS editor of the developer toolbar is very handy for some short tries but quite uncomfortable for the complex work on themes. It does not have any property support, help and search and replace functions.

I can think of two other ways:

  1. Install Moodle 1.5 via CVS as a second installation on your local machine or on your server and work with the themes directly in Moodle 1.5. Use a good CSS editor with property support. Via CVS you can update the Moodle installation easily with one command. Your running Moodle 1.4 system would not be affected.

  2. Save the Moodle pages you want to work on with Firefox as "Web Page, complete". Then use a good CSS editor to work on your local copy. If you open the downloaded page in your browser and the CSS file in your CSS editor you can view the changes simply by refreshing the page in the browser. You will probably start with the course page and download the other pages to go on, for example the forum page or an admin page or some else.

When you work with the three CSS files, it will be much easier to change colors or fonts. You can replace the one downloaded CSS file by the three CSS files from any existing Moodle 1.5 theme. Working with gradients and background images is also possible this way.

In reply to Urs Hunkler

CSS Editors

by Urs Hunkler -
Picture of Core developers

For windows:

I use TopStyle Pro, which is very comfortable with a CSS property popup and a Style Inspector and many more functions. It has build in Firefox and MSIE side by side preview.

The free TopStyle Lite focuses on the CSS property popup and the Style Inspector but lacks many other functions including the browser preview. Via the popup TopStyle proposes all parameters you can use with a selected CSS property.

In reply to Urs Hunkler

Re: 1.5 Themes Question Collection

by Gustav W Delius -
Hi Urs,
I would like to suggest a topic for another posts in you excellent "1.5 Themes basics" series. Could you give guidelines for the naming of classes and the general structure of divs one should have on a page?
In reply to Gustav W Delius

Re: 1.5 Themes Question Collection

by Urs Hunkler -
Picture of Core developers

Hi Gustav,

these are the next topics on my to do list for the Moodle CSS series. I will continue publishing them when I have the time to write and draw.

Urs

In reply to Urs Hunkler

How do teachers change their course theme?

by George Kao -
I've enabled the setting in admin > configuration > variables to allow courses to set their own themes.  Now where do teachers go to set the course theme?  I can't find it under the course's Administration menu.
Thanks for your help.
In reply to George Kao

Re: How do teachers change their course theme?

by Urs Hunkler -
Picture of Core developers

George, from the "Admin" block in your course you select "Settings" and change the theme with the theme list "Force theme:" towards the end of the configuration page under "Force language:". Just to be sure - you use Moodle 1.5.x?

Urs