Hello,
Introduction:
In light of my post (and others) here: https://moodle.org/mod/forum/discuss.php?d=373899#p1511080, I have created a new theme called 'Foundation', but the theme is not abstract and works as a standalone theme. It is an almost pure Bootstrap V4 only theme that is not a child theme of Boost, but rather only 'pulls' what it needs from Boost as a means of avoiding duplication. There is no navigation drawer or docking:
Features:
- Bootstrap V4 CSS with minimal additions for Moodle.
- Child theme capable - in 'beta'.
- Custom SCSS.
- Custom Swatches from Bootswatch.com and licensed under the MIT License.
- Partial template support.
- Theme modules - in 'beta', see the swatch_modules.php file.
Where you can get it from:
I've just added it to the plugins DB, where it is awaiting approval and where I can work through some of the issues highlighted by the automated checks. But in the mean time, you can get a 'beta' test server only version for Moodle 3.5 from: https://github.com/gjb2048/moodle-theme_foundation. Note: $CFG->themedir is not currently supported.
Motivation:
I want a theme that forms the 'foundation' for my themes with the newer Bootstrap(BS) V4 framework but without the 'Boost' baggage. My other themes like Essential and Shoelace are based on BS 2.3.2 with LESS and V4 is SCSS. The 'Bootstrapbase' theme is likely to be depreciated in M3.6 and removed in M3.7 to become a contributed theme. Therefore I need a way forward with Essential and Shoelace with a parent theme that provides the same basic functionality as Bootstrapbase.
I also want to be progressive and provide features that core currently does not have but prove that they are worthwhile. Such as:
- Mustache template 'Partials' in a sub-folder. Currently you can only have a 'partial' in the theme's 'templates' folder which looks messy. Current drawback to this due to not being able to override certain core classes is that templates rendered at the server end can work this way, JS AJAX ones via a 'promise' with the AMD JS 'Templates' class.
- Theme modules. There has been talk in the past of being able to create 'modules' within a theme that add functionality to that theme and can then be transposed to other themes. And as 'add-ons' so you can pick and choose the amount of functionality in your specific installation of the theme. I've implemented something that works but may break the AMOS language mechanism - a fallback will work but will just mean more work installing the module. The modules themselves add their settings dynamically to the theme and will only appear as an option / sub-page if they are there. Currently one 'module' is provided in the theme called 'Swatch' where you can choose from a few of the 'MIT License'd Bootswatch.com themes.
Use and the future:
I must stress that the theme is 'beta' and in 'development', thus subject to change, such as possibly changing 'partial' to 'partials'. I want to progressively improve and validate the concepts based upon feedback (please do say what you think here). But I don't want to add functionality to the theme, I want to keep it simple so that it can be used both as a starting point and a maintainable parent theme for more complex child themes.
Cheers,
Gareth