Select Moodle version:

Themes: Decaf

theme_decaf
A clean, simple theme which adds an "Awesomebar" at the top of the page to provide quick, easy navigation.
Maintained by: Picture of Paul Nicholls Paul Nicholls

Decaf is a three-column, fluid-width theme for Moodle that was created by Lei Zhang and Paul Nicholls. It improves usability by fixing an "Awesomebar" at the top of the screen, which provides dropdown menus containing everything in the Navigation and Settings blocks.

For developers, it also transforms the performance info into a colorful bar which floats at the bottom of the screen, which increases awareness of the performance statistics.

Screenshots

screenshot

Contributors

Lei Zhang
Lei Zhang: Developer
Picture of Paul Nicholls
Paul Nicholls (Lead maintainer): Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Rebecca O'Connell
    Tue, Dec 31, 2013, 8:54 AM
    In other themes in 2.6 (Afterburner, for example), when I click the Site administration link, there is a pause, and then the admin menu loads dynamically. It would be nice if Decaf worked this way as well. Then you could keep the performance gain when you don't need the menu, but still be able to access the menu without going to another page (and possibly not understanding how or why you've arrived at this page).
  • Picture of Paul Nicholls
    Mon, Jan 6, 2014, 8:08 AM
    Steve, the menus open using CSS :hover rules (only using JS to support ancient browsers which don't do :hover on anything that's not an "a" tag). A delay before opening would require that the whole thing be done in JS, which I'd rather avoid. It might also be a usability issue, depending on how long the delay is - people might start trying to click on the Awesomebar menus to get them to open, in some cases taking them to other pages (which aren't where they want to go).

    Rebecca, I'll keep that in mind when I work on the new version - the current 1.9 release is really just the minimum I could do to make it work in 2.6, for the benefit of those who have already upgraded. I hope to be able to get stuck in to working on the new (responsive) Decaf soon, so keep an eye on the Themes forum for an announcement when it's ready for testing.
  • Iron Man
    Thu, Jan 9, 2014, 12:23 AM
    Have a similar problem to Kathryn Duncan
    mer, 11 déc 2013, 07:59 . I Installed version 2013112502 on Moodle 2.6 and Image upload is not working since the windows appears under another one . File chooser should be in front of insert an image window as you can see in this image : http://www.evernote.com/shard/s9/sh/c32bb3f2-509c-46fb-ad01-52d31bad296c/22f131cf8f707f3485e074210c54d02c
  • Just wondering . . .
    Tue, Jan 14, 2014, 5:56 AM
    Just out of interest.

    I have a 2.6+ test site set up with decaf.
    Regarding the question I raised earlier in the discussion about the need to click on the admin link (an unintended consequence of this https://tracker.moodle.org/browse/MDL-41811) is proving to be quite a problem for me in doing a lot of admin and and also going in and out of courses. The rollover stays there while you are working, but if you click to go to a course it then needs another click to reload it. More of a problem than I initially thought.

    Paul, I hope you are able to make a toggle for this behaviour (I'm prepared to take a loading time hit), or that some other option is possible.

    Be that as it may, we will probably still upgrade and use the latest decaf. But we will probably develop a daughter theme with a few features like logo, narrower header, some adjusted spacings, new H1-H4 styles, and different link colours.
    How easy is it to add in a few more settings to a theme for users to change? The Essential theme actually has several pages for the theme settings.

    -Derek
  • Picture of Alan Whittamore
    Tue, Jan 14, 2014, 7:51 PM
    Derek,

    I agree entirely with your comments, and Paul has already made the point that the performance hit with the 'System Administration' link only affects Admins and as you so rightly point out, you may prefer the old behaviour despite that. It should be an option in Moodle itself I believe.

    Anyway, you can try my workaround as follows:

    ***Always show full admin settings tree (optional - may hurt performance)
    ***lib/navigationlib.php (~line 3397) - change if ($isadminpage) { to if (true) {
    ***lib/navigationlib.php (~lines 3412-3422) - comment out (block after // Print empty navigation node)

    I don't know how to change this behaviour easily within decaf itself (maybe Paul will find a way).

    The great power of the awesome bar is that you can always get anywhere in your system with just one click - just what you need as and Admin!
  • Picture of Alan Whittamore
    Tue, Jan 14, 2014, 8:26 PM
    Update to my previous post - that was my first stab at the workaround. It's even easier! Just change one line:

    ***lib/navigationlib.php (~line 3391) - change $isadminpage = $this->is_admin_tree_needed(); to $isadminpage = true;
  • Picture of Martin Arman-Addey
    Tue, Jan 14, 2014, 9:58 PM
    Hello, I am testing the new Decaf version and am experiencing a problem with both 2.5 & 2.6, the side bar is invisible, if you send a block to this, you cant access it, the only way is to turn the sidebar off. Also on 2.6 the Activity Chooser is not appearing, it is on the old format of the the two selection boxes for activities or resources,I have checked the ajax and JS settings and these are set as expected. Any help would be much appreciated, Many thanks Martin
  • Just wondering . . .
    Thu, Jan 16, 2014, 6:10 AM
    @Alan, thanks. I presume this is a core hack.
    @Martin. The activity chooser is fine for me (new 2.6.1) and I am not sure what you mean by turn the sidebar off. (Are you sure you have not docked the menu?)

    I have posted here: https://moodle.org/mod/forum/discuss.php?d=252141 Minor problem with edit icons on home page wih an image.

    Otherwise, with a few clicks, in and out of courses etc, Decaf with 2.6.1 is fine. Now, if I can just get the editor to appear all will be well, but I know that is no a decaf problem.

    -Derek
  • Picture of Mohsen Farahi
    Wed, Jan 22, 2014, 9:30 AM
    @Alan, Thanks a lot for the filepicker issue. Cheers
  • Picture of Alan Whittamore
    Thu, Feb 13, 2014, 5:27 PM
    Minor change to **/decaf/renderers.php - function render_custom_menu

    What it does: show custom menu as an icon (in the awesomebar or below) which expands on mouse-over
    Benefits: saves space (esp. in the awesome bar)

    You'll see this references an icon image via pix_url which isn't supplied here. It expects to find **/decaf/pix/menu.png

    It works without an icon but there'll be no visual cue.

    I believe someone has already suggested this as an improvement for Paul's next release. It get's my vote!

    protected function render_custom_menu(custom_menu $menu) {
    // If the menu has no children return an empty string
    if (!$menu->has_children()) {
    return '';
    }
    // Initialise this custom menu
    $content = html_writer::start_tag('ul', array('class'=>'dropdown dropdown-horizontal decaf-custom-menu'));
    $content .= html_writer::start_tag('li');
    $content .= html_writer::start_tag('span', array('class'=>'customitem'));
    $content .= html_writer::empty_tag('img', array('alt' => '', 'src' =>$this->pix_url('menu', 'theme')));
    $content .= html_writer::end_tag('span');
    $content .= html_writer::start_tag('ul');
    // Render each child
    foreach ($menu->get_children() as $item) {
    $content .= $this->render_custom_menu_item($item);
    }
    // Close the open tags
    $content .= html_writer::end_tag('ul');
    $content .= html_writer::end_tag('ul');
    // Return the custom menu
    return $content;
    }
  • Picture of John Wilkes
    Mon, Feb 17, 2014, 8:39 PM
    When I click on edit on any activity (File or site) not all menu choices show, only allows you to edit the name of the activity. Have I done something wrong or is this a problem.
  • Picture of Mack Hucks
    Sat, Feb 22, 2014, 5:52 AM
    @Alan: thanks for the work. I have modified it for our environment for just a couple of users. I have 2 functional users that wanted it back so I used this:
    global $USER;
    if($USER->id == 1 or $USER->id == 2)
    {
    $isadminpage = TRUE;
    }
    Use the userid's of the desired user.
  • Picture of Alan Whittamore
    Tue, Mar 18, 2014, 7:35 PM
    @Mack: Glad you like it smile

    Here's another suggestion to ponder:

    I've moved the breadcrumb bar (when visible) so that it appears just under the awesome bar and its nailed-down too (won't scroll away). This way all the navigation features are on-screen - always!

    What do you think?

    Alan.
  • Picture of Paul Nicholls
    Wed, Mar 19, 2014, 4:33 AM
    Alan, thanks for the suggestions. The custom menu icon sounds like a great way to save space but still allow for a custom menu - I'll look at adding it as a new option. As for the fixed breadcrumb bar, that's coming in the 2.6+ Bootstrap-based version of Decaf that I'm working on at the moment; hopefully I'll have an initial test version available soon.
  • Picture of Alan Whittamore
    Wed, Mar 19, 2014, 5:58 PM
    Paul, it's us who should thank you for a truly great theme!
    I'm sure you've seen the 'cafe-con-leche' and one thing you could steal from that is a nice way to add a logo image! That's probably on your list anyway!
    I don't know how you chose the name 'decaf' but I imagined having re-faced moodle you've just taken 'faced' in a new direction (strrev('faced'))!
    I can hardly wait for your new version smile

    Alan.
1 2 3 4 5 6
Please login to post comments