2009
[booh] / THEMES
1                    [[ Themes in booh ]]
2
3 Each theme is made of:
4
5 - one index.html skeleton, used for the "index" page, the page
6   showing the available subalbums (no such page in the generated
7   album, if you don't have any subalbum)
8
9 - one thumbnails.html skeleton, used for the thumbnails page
10
11 - one image.html skeleton, used for fullscreen images
12
13 - any number of resource files these html pages depend on
14   (images, css..), normally they should all go in the 'root'
15   subdirectory, so that they are only copied in the root
16   directory of the final webalbum and avoid wasting too much
17   hosting space; they can be referred from the skeleton by
18   prepending ~~pathtobase~~, which will be the relative path
19   to the root directory of the final webalbum
20
21 - a metadata/parameters.rb file holding information about images
22   sizes that will fit the best the html pages layout
23
24 - three metadata/screenshot-?.png files used to select theme in
25   the GUI
26
27 If you want to create a new theme, or make local modifications to a
28 theme, just have them in your ~/.booh-themes directory. For example,
29 to hack off "dark":
30
31 # mkdir ~/.booh-themes
32 # cp -a /usr/share/booh/themes/dark ~/.booh-themes/mine
33
34 Use a different name than original theme names (here I picked the
35 dummy name "mine", choose a better one).
36
37
38                   [[ Skeleton files ]]
39
40 The skeleton files contain keywords used in the backend to fill
41 them up with images. There is no precise documentation about
42 them, the best is to look at the 'simple' theme and learn from it
43 directly. Most of them are just a simple replace, and there are
44 two special cases:
45
46 - conditionals:
47
48     ~~iffoo?~~bar~~fi~~
49
50   indicates that if foo is true, put bar at this position, else
51   put nothing; there are a few existing conditions tested, have a
52   look in skeletons of the 'simple' theme
53
54 - loops:
55
56    ~~iterate1_open~~
57      foo
58      ~~image_iteration~~
59      bar
60    ~~iterate1_close~~
61
62    is used to put "foo" before each image (index and thumbnails
63    pages only), and bar after each image
64
65    It can be nested:
66
67    ~~iterate1_open~~
68       foo
69        ~~iterate2_open_max4~~
70          bar
71          ~~image_iteration~~
72          baz
73        ~~iterate2_close~~
74       qux
75    ~~iterate1_close~~
76
77    The character after "max" can be hardcoded, or can be "N" to
78    represent the configurable number of images per rows in the
79    thumbnails page. It indicates the amount of times iterate2
80    will be performed before another iterate1 is needed.
81
82
83                      [[ Screenshots ]]
84
85 Each theme must export three screenshots, used to select theme in
86 the GUI. First screenshot demonstrates the "index" page, second
87 one the "thumbnails" page, and third one the "image" page.
88
89 To keep a correct ratio between themes, to do your screenshot, be
90 sure to use the correct images sizes for your resolution; then
91 take the screenshot, crop for 1.55 aspect ratio and resize to 192
92 of width (thus 124 of height).
93
94 It would be best if the screenshots would show the same contents,
95 so just send me your theme if you create a new one and I'll do
96 the screenshots.