If I'm writing a new theme today....

If I'm writing a new theme today....

by Howard Miller -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

...what parent do I base it on?

To expand, I have been writing some reasonably simple themes based largely on Bas Brand's Bootstrap theme project (colours, headers and logos for corporate clients mostly - nothing exciting). However, I have been disturbed somewhat by the announcements concerning Bootstrap 4 and big changes in Moodle 3.2.

It's probably a bit of a silly question at the moment, but what's the least risky starting point for theme development if writing a theme for 3.1 right now? 

Average of ratings: -
In reply to Howard Miller

Re: If I'm writing a new theme today....

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Moodle 3.1 will be continued to be updated until 3.3 is released next year. So if you base your theme on bootstrapbase then you will be safe enough.if you prefer to base your themes on Bas Brand's Bootstrap 3. Then you will be pretty safe there too.

To base your custom theme on the new Boost theme, which uses Bootstrap 4, you will need to wait until Moodle 3.2 is released in late November.

Hope that helps?

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: If I'm writing a new theme today....

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Thanks.

Pretty much what I thought. But I thought I should check I wasn't missing a trick smile

In reply to Howard Miller

Re: If I'm writing a new theme today....

by Frédéric Massart ⭐ -
Picture of Core developers Picture of Plugin developers Picture of Testers

There aren't really any risk here.

You could use Boost as a base but as Mary said that will only be available from Moodle 3.2 so it does not work for you. You're left with a 3rd party theme as a base, or Clean. It really is your choice. If I were you I'd pick one that I feel confident with. If we were to remove Clean from core you could still require it as a dependency, only your users will have to re-install Clean, but that's not different from having to install the 3rd party theme you'd use as a base.

Now, considering we're shipping Boost with Moodle 3.2 and the older age of Bootstrap 2, I wouldn't guarantee that we will be maintaining Clean for a long time, which may be your biggest concern.

Alternatively, rather than depending on another theme you could clone it completely. You would lose the ability to upgrade your base and thus having to maintain everything yourself, but you would lose the dependency. I wouldn't recommend this approach though.

Average of ratings: Useful (1)