Picture of Nils Sanderson
Re: Custom theme creation
by Nils Sanderson - Monday, 9 March 2015, 11:13 AM
 

Hi Lukasz,

Not really a guide for creating from scratch here as I think the process is easier to copy the adapt-contrib-vanilla theme and then modify details and files, however my workflow when building themes has been to create a few folders which makes switching extensions much easier:

  • mkdir ~/Adapt
  • mkdir ~/Adapt/Courses (courses in here)
  • mkdir ~/Adapt/Plugins (all custom extensions in here - except themes)
  • mkdir ~/Adapt/Themes (all themes in here)

I then just use symlinks for the extensions which is much easier to manage and you can quickly change these if you have multiple courses all using the same theme, it is also better if you are making improvements to one theme in that all your courses will be updated, instead of copying and pasting where things quickly get out of sync between projects.

So, I delete the adapt-contrib-vanilla and then symlink a theme from the theme folder into my course e.g.

  • First navigate to ~/Adapt/Course/course-you-are-working-on,
  • ln -s ~/Adapt/Themes/adapt-contrib-custom-theme adapt-contrib-custom-theme

Where you replace custom-theme in both instances with the name of your theme, or you can keep it as vanilla as you should have removed it from the folder.

I also keep a zipped up version of the theme in the course/src/theme directory at stages of the build, just incase.

Thanks,

Nils