How to Create a new Theme

From Amahi Wiki
Revision as of 23:11, 28 October 2009 by Cpg (talk | contribs)
Jump to: navigation, search

How to Create a Theme

Creating a theme is easy nowadays:

  • Pick a base theme to start with, say, BaseTheme
  • Pick a name for the new theme, let's say NameOfYourTheme
  • Copy the theme directory:
      cd /var/hda/platform/html/public/themes
      cp -a BaseTheme NameOfYourTheme
  • To change the display name of your theme to match that of the directory, edit
      NameOfYourTheme/init.rb
  • At this point the theme should be visible and selectable in http://hda/setup?tab=themes
  • The most important file in the theme is the CSS file, which contains the styling for the theme. The file is located in
     style.css
  • The rest of the theme look is determined by the images, which are referenced by the platform code
  • The theme screenshot file should be 640x480 and is located in
     theme-sshot.png
  • The theme thumbnail file should be 64x64 and is located in
     theme-thumb.png
  • You can change the name of the them, and the color scheme of the piecharts in
     init.rb

Themes in Git

The existing themes are available in the git tree at:

           amahi/themes

i.e

           git clone git://git.amahi.org/amahi.git
           cd amahi/themes

you can add yours there, then contribute it via a git patch. See Contribute for sending patches via git.