Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
{{NeedsUpdate}}
 
 
= Step by Step of Making a Theme =
Creating a theme is easy . It's mostly one css file a couple of background images. That will get you going quickly. You can later add a lot more refinements to it. The simplest way to start is by forking an existing "base" theme:
* Pick a base theme to start with, say, ''agedashi-1.2''
* Copy the theme directory (if you have an HDA - if not, get the source from git):
cd /var/hda/platform/html/public/themes cp -a agedashi-1.2 morning-sunshine-1.0
* To change the display name of your theme to match that of the directory, edit the settings in
morning-sunshine-1.0/init.rb
* At this point the theme should be visible and selectable in <nowiki>http://hda/setup?tab=themes</nowiki>
* 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
Optional:
* <code>ret[:headers] = ["foo.js", "bar.js"]</code> &mdash; : An array of strings,with names of javascript files to be included for this theme * <code>ret[:gruff_theme] = { ... }</code> &mdash; : Theme for the piecharts - see the examples in the other themes* <code>ret[:disable_inheritance] = true</code>: do not inherit from the 'main' theme
= Themes Sources in Git =
i.e
git clone <nowiki>git://git.amahi.org/amahi.git</nowiki> cd amahi/themes
you can add yours there, then contribute it via a git patch. See [[Contribute]] for sending patches via git.
In your git tree,
git clone <nowiki>git://git.amahi.org/amahi.git</nowiki> cd amahi/platform/platform/html ./script/server production
Then access your test environment as <nowiki>http://localhost:3000</nowiki>
Within the testing tree (in amahi/platform/platform/html), you can add new themes in
each in a directory of it's own. Then you should see the new theme next time you run ./script/server (if you know how to duplicate a database, it may be bestter to run in development mode, no server restarts - see your changes live!) in this location:
<nowiki>http://localhost:3000/setup?sub=themes&tab=setting</nowiki>
To run in development mode, you can duplicate hda_production db into hda_development and simply run:
./script/server 
= Theme "inheritance" from the Default =
This is to make it easier to make themes. One can start with a fairly "thin" theme and enhance it over time by adding new images and improvements.
 
To not use inheritance from the 'main' theme, you can set disable_inheritance in yout theme with
<code>ret[:disable_inheritance] = true</code>
= Making a Theme into an App =
* Customizable Amahi dashboard tab, in [http://git.amahi.org/?p=amahi.git;a=blob_plain;f=themes/assets/amahi-base-tab.xcf;hb=c4deb554ea9a67d1dcc5ca62f346a3f91a67aef6 gimp xcf] [http://git.amahi.org/?p=amahi.git;a=blob_plain;f=themes/assets/amahi-base-tab.psd;hb=c4deb554ea9a67d1dcc5ca62f346a3f91a67aef6 photoshop psd] [http://git.amahi.org/?p=amahi.git;a=blob_plain;f=themes/assets/amahi-base-tab.txt;hb=c4deb554ea9a67d1dcc5ca62f346a3f91a67aef6 description]
* [http://www.woothemes.com/2010/08/woocons1/ Awesome GPL Icons]
* [http://kuler.adobe.com/ Kuler], or [http://www.colourlovers.com/ Colourlovers], to select theme swatches
= Theme Ideas =
12,424

edits