Posts made by David Scotson

This is very cool and inspiring.

I'm going to try to implement some of this, aiming for something between what you finally did with CSS and the top of part 3. I double checked and there's no easy way to do this with renderers as it's not implemented yet.

Stuart mentions he knows a hacky way to do it with renderers, but the only things I can think of are pretty hideous (i.e. watching out for a specific icon being requested and injecting a whole string of HTML into where that single icon should go), but maybe he's got something a bit more sophisticated in mind.

In the meantime I'll see how far I can get with CSS, one improvement to take it closer to your original design is to insert a inactive faded left arrow when the activity is as far left as it can go, with the following:


.editing_moveright:before {
    content: url("location of your left-pointing arrow");
    vertical-align: middle;
    opacity: 0.5;
    padding-right: 2px;
}
.editing_moveleft + .editing_moveright:before {
    content: none;
}

It's not the most elegant thing in the world but it works. Note that IE generally sucks at opacity, so a production implementation of this would probably create a second, faded version of the icon and point to that, but using opacity illustrates the idea, the other two style for padding and vertical align are just a repetition of what has been applied to the other icons so that it fits in visually. That might need to be customised for each theme.

Have you investigated using position: relative and left: -280px (or whatever is appropriate) to shift all the movement icons to the left of the activity name? I think it might be tricky, but could probably work.

Moodle in English -> Themes -> Access theme settings in renderers or scripts?

by David Scotson -
Can you access the current theme settings in renderers and/or command line scripts?

I'm trying to 'compile' a theme by calling a PHP script from the command line to generate the various CSS files. I'd like the output to depend on the current settings for a particular theme that have been set via the web UI.

Has anyone done anything like this before, I'm not really sure where to start?

Also, if you wanted to turn a renderer on/off (or vary it's output) based on theme settings, what would that look like?
Average of ratings: -

Moodle in English -> Themes -> 2.4 icons in 2.3? -> Re: 2.4 icons in 2.3?

by David Scotson -
I've uploaded it into my bootstrap_renderers github:

https://github.com/ds125v/moodle-theme_bootstrap_renderers/tree/master/pix_core

https://github.com/ds125v/moodle-theme_bootstrap_renderers/tree/master/pix_plugins

It's not a perfect drop-in, some of the icons will appear too big, or slightly too high unless you tweak your CSS, other's look a little bit fuzzy if they've been resized down, but generally it does the job.

I had to make a couple of tweaks e.g. 2.3 is looking for a f/html.png to show as the icon for resources, so put a copy of the mod/resources/pix/icon.png there so there may be other things not quite right.