I forgot to mention that the biggest problem I had working with Moodle forms from a Theme point of view, was that there were something like 6 different approaches to form layout being taken across Moodle e.g. admin setting forms are different from module edit screens, which are different from backup and restore etc. So a primary goal should be consolidation.
David Scotson
Mensagens colocadas por David Scotson
Hi Bas,
I've also been having a digital spring clean and decomposed my work into some separate github repositories. This is basically how I would have started the first time, if I knew then what I know now. The first of them is:
https://github.com/ds125v/bootstrap
This is a clone of Twitter's Bootstrap project, with some very minor changes (i.e. image links changed to [[pix:theme]]). It's mostly separate to make it easier to keep up to date with changes to Twitter's Bootstrap. The main output is the Bootstrap.css file which I then copy over to:
https://github.com/ds125v/moodle-theme_bootstrap_renderers
This is a theme for developers working on bootstrap renderers. It removes various things, like all the Moodle base CSS and the various CSS hacks I've used to finish the theme off, and lets you focus on changes to renderers.php and layout. I found that I spent half my time fighting with old Moodle CSS or hacky workarounds that I'd only put in place the day before, so I went back to basics with the intent to do all the renderers stuff first as a foundation.
I've started rewritting my renderers and I've done a first pass at most of lib/outputrenderers and am about to start on the various other renderer.php files throughout Moodle. If anyone wants to help please do, this is a fairly well constrained bit of work. You find a function in a renderer.php file, copy it, find the bit of Bootstrap that does the same thing and tweak it till the output HTML matches. Mostly quite straightforward.
I think almost everything else can wait till I see how far the renderers can take me. The only other thing that I'm working on is the layout php files. If you could offer any help with the layout it would be welcome. I trashed mine and started again with Stuart's but it was too fancy for my needs. I basically want the absolute closest you can get to a standard Moodle install, but with Bootstrap classes holding it together. I've been trying to strip back his stuff but this is a combination of two weak points for me, as I don't know much about the structural parts of Bootstrap or of Moodle's pages and themeing system. As I said, any help here would be appreciated,
I'll probably create another repository, called moodle-theme_bootstrap_renderers_plus which will use every dirty trick in the book to fill in the gaps left after I've made full use of Moodle's renderers system. But I'll leave that for later as otherwise I'll need to spend time backing out hacks that I don't need anymore due to fixing the problem at source in the renderers.
I've also been having a digital spring clean and decomposed my work into some separate github repositories. This is basically how I would have started the first time, if I knew then what I know now. The first of them is:
https://github.com/ds125v/bootstrap
This is a clone of Twitter's Bootstrap project, with some very minor changes (i.e. image links changed to [[pix:theme]]). It's mostly separate to make it easier to keep up to date with changes to Twitter's Bootstrap. The main output is the Bootstrap.css file which I then copy over to:
https://github.com/ds125v/moodle-theme_bootstrap_renderers
This is a theme for developers working on bootstrap renderers. It removes various things, like all the Moodle base CSS and the various CSS hacks I've used to finish the theme off, and lets you focus on changes to renderers.php and layout. I found that I spent half my time fighting with old Moodle CSS or hacky workarounds that I'd only put in place the day before, so I went back to basics with the intent to do all the renderers stuff first as a foundation.
I've started rewritting my renderers and I've done a first pass at most of lib/outputrenderers and am about to start on the various other renderer.php files throughout Moodle. If anyone wants to help please do, this is a fairly well constrained bit of work. You find a function in a renderer.php file, copy it, find the bit of Bootstrap that does the same thing and tweak it till the output HTML matches. Mostly quite straightforward.
I think almost everything else can wait till I see how far the renderers can take me. The only other thing that I'm working on is the layout php files. If you could offer any help with the layout it would be welcome. I trashed mine and started again with Stuart's but it was too fancy for my needs. I basically want the absolute closest you can get to a standard Moodle install, but with Bootstrap classes holding it together. I've been trying to strip back his stuff but this is a combination of two weak points for me, as I don't know much about the structural parts of Bootstrap or of Moodle's pages and themeing system. As I said, any help here would be appreciated,
I'll probably create another repository, called moodle-theme_bootstrap_renderers_plus which will use every dirty trick in the book to fill in the gaps left after I've made full use of Moodle's renderers system. But I'll leave that for later as otherwise I'll need to spend time backing out hacks that I don't need anymore due to fixing the problem at source in the renderers.
Yep, looks like https://github.com/stuartlamour/moodle_bootstrap/tree/master/bootstrap might be the main source for future collaboration.
So I mentioned before that I'd rejigged my Bootstrap project to use LESS source files directly rather than just re-use the CSS they provide. One of the things this lets me do is re-use some of the things that people have built on top of Bootstrap like, for example, the "Font Awesome" icon font or the Bootswatch themes.
I just tried out a couple of these to see if it it would even work and am so pleased with the results of literally less than 60 seconds work that I thought I'd share some screencaptures of two of the themes, called Amelia and Cyborg on a Moodle:
http://imgur.com/a/dFAuK
http://bootswatch.com/cyborg/
http://bootswatch.com/amelia/
It's not perfect, but it's a lot better than I thought it would be to start with.
I just tried out a couple of these to see if it it would even work and am so pleased with the results of literally less than 60 seconds work that I thought I'd share some screencaptures of two of the themes, called Amelia and Cyborg on a Moodle:
http://imgur.com/a/dFAuK
http://bootswatch.com/cyborg/
http://bootswatch.com/amelia/
It's not perfect, but it's a lot better than I thought it would be to start with.
I'm happy to work from Stuart's github as a base (I think me having the whole Moodle codebase in mine is confusing people)