Picture of Greg Pell
Adapt 2.x and menu CSS?
by Greg Pell - Wednesday, 2 September 2015, 1:24 AM
 

Hi All,

After persisting with the authoring tool for some time I have decided to switch across to the latest v2.0 of the framework and develop straight out of that. The authoring tool just had too many blockers for me and what we are trying to achieve at the moment. Anyway, so far so good with developing this way, however one thing I noticed and wasn't quite sure if it has been covered already?

I wanted to manipulate the CSS of the menu (adapt-contrib-boxMenu). So I went into /[project]/src/menu/adapt-contrib/boxMenu/less/boxmenu.less and modified that file and after doing a 'grunt build' I wasn't seeing any of my changes.

It wasn't until I found /[project]/src/theme/adapt-contrib-vanilla/less/src/boxmenu.less and made changes there that I was seeing the changes come through?

What is the reason for this? Why has the CSS for the menu been moved into the theme folder? Doesn't really make sense to me?

Thanks

Greg

Picture of Daryl Hedley
Re: Adapt 2.x and menu CSS?
by Daryl Hedley - Wednesday, 2 September 2015, 8:04 AM
 

Hi Greg,

Thanks for the feedback Greg and I have to agree with you on this. It doesn't seem to be that maintainable and pluggable like the rest of Adapt.

I've just written a post about how Appitierre had to move away from the current theme setup and produce a different theme engine based upon UI elements. We'd like to share this back once we've tried and tested it (and finished). 

Thanks,

Daryl

Picture of Matt Leathes
Re: Adapt 2.x and menu CSS?
by Matt Leathes - Wednesday, 2 September 2015, 9:01 AM
 

Hi Greg

The idea behind this is that you can then port the theme to another project by simply copying across the theme folder.

Same goes for the .less and .hbs files in any plugin; if you need to modify these you do so by copying the files you want to change into the theme folder prior to modifying them there.

Doesn't appear to be documented anywhere, which doesn't help. Definitely time for a push on documentation!

Picture of Greg Pell
Re: Adapt 2.x and menu CSS?
by Greg Pell - Wednesday, 2 September 2015, 1:37 PM
 

Right. However I did notice that changing the hbs file in the Menu folder did still have an effect in the course.  So it is still using some assists from the menu plugin?

Cheers

Greg

Picture of Matt Leathes
Re: Adapt 2.x and menu CSS?
by Matt Leathes - Wednesday, 2 September 2015, 2:23 PM
 

I think it still uses the .hbs from the original location, unless it finds one in the theme folder in which case it uses that instead...