Start a theme from scratch

Start a theme from scratch

by Jorge G. C. -
Number of replies: 6

I need to know if start a theme from scratch is possible. 

Until know I have found a lot of ways to make themes from boost or another, but I did not find the way to make a theme created and totally customized by me to my taste.

I want to customize the header, remove the nav, move the nav items to the header, etc...

Is all of this possible?

Thans a lot!!

Average of ratings: -
In reply to Jorge G. C.

Re: Start a theme from scratch

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
It is but not easy. Take what you've learnt from modifying other themes and understanding of theme structure from the Moodle documents and apply that knowledge to create a new theme.

But pragmatically its easier to clone a simple theme and start from there.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Start a theme from scratch

by Jorge G. C. -
I am working in a software developer company. Our costumers use Moodle and they want a customized design. So, I need to move the nav items to the header, remove the nav, insert icons in the header, change the position of the blocks, etc...
Can I do all of this cloning a simple theme or is it just possible starting from scratch?
In case of I just do it starting from scratch... How can I get the courses to learn?
Thank you very much!!!
In reply to Jorge G. C.

Re: Start a theme from scratch

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi,
This all depends on the version of Moodle you are using.

Years ago it was much easier to build a theme based on the ideas given in a project by a client. I made many themes for a company in Switzerland some years ago and it was just a matter of Trial and Error getting the look right for the client. Once you have a predesigned look to a website putting it all together is relatively simple if you understand how Moodle works, and that you are familiar with the different languages used in the process such as PHP, mustache, SCSS, etc., to name a few, then it becomes easy over time as you learn new tricks.

Having said all this you do need to use the outline of the Parent theme in this case Boost or Classic depending on your design for the layout you are after.

You must remember too that lots of the layout can be done using the various options in the TEXT EDITORS within Moodle itself. Thus allowing you to create some nice looking pages without needing to write lines of code in the background of the theme for these pages as the layout would be basic HTML.
There is a link to the Bootstrap 4 at the top pf this Forum page that I added some time ago, which hopefully will give you a few ideas.
Hope this helps<
Cheers
Mary
Average of ratings: Useful (2)
In reply to Mary Evans

Re: Start a theme from scratch

by Jorge G. C. -
Thanks a lot Mary!!!

I know that I can edit themes using the Moodle editors. But I have tried to make any changes and there are some restrictions which prevent doing what I want (e.g. remove some blocks and move their elements to another block).

I am using Moodle 3.3. Now you know the version... Are you still suggesting me to use Boost as a parent theme? If I do this... Will I be able to customize it totally?

Thank you very much!!
Cheers
Jorge
In reply to Mary Evans

Re: Start a theme from scratch

by Jorge G. C. -
In the end, I created a son theme from boost. How can I start to modify HTML code to remove some blocks and customized them?
Another problem is I have been trying to create a few variables in the preset file of my new theme like background color a font size (the new variables are supposed to overwrite those of the parent theme), but it does not change anything...
In reply to Gareth J Barnard

Re: Start a theme from scratch

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
You may want to look at the excellent courses HRNDZ -Moodle partner- run (Gareth leads them)
https://www.moodlebites.com/mod/page/view.php?id=3208
https://www.moodlebites.com/mod/page/view.php?id=3210

Or you could take an existing fairly simple child theme of Boost (I use my own Waxed/Handlebar themes as starting points to build others, though there are other simple themes you could clone as a starting point) and then change them to meet your own needs.
Average of ratings: Useful (3)