]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/md/Theming.md
Merge pull request #1552 from ArthurHoaro/feature/better-initializer
[github/shaarli/Shaarli.git] / doc / md / Theming.md
1 ## Foreword
2
3 There are two ways of customizing how Shaarli looks:
4
5 1. by using a custom CSS to override Shaarli's CSS
6 2. by using a full theme that provides its own RainTPL templates, CSS and Javascript resources
7
8 ## Custom CSS
9
10 Shaarli's appearance can be modified by adding CSS rules to:
11
12 - Shaarli < `v0.9.0`: `inc/user.css`
13 - Shaarli >= `v0.9.0`: `data/user.css`
14
15 This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.
16
17 **Note**: Do not edit `tpl/default/css/shaarli.css`! Your changes would be overridden when updating Shaarli.
18
19 ## Themes
20
21 Installation:
22
23 - find a theme you'd like to install
24 - copy or clone the theme folder under `tpl/<a_sweet_theme>`
25 - enable the theme:
26 - Shaarli < `v0.9.0`: edit `data/config.json.php` and set the value of `raintpl_tpl` to the new theme name:
27 `"raintpl_tpl": "tpl\/my-template\/"`
28 - Shaarli >= `v0.9.0`: select the theme through the _Tools_ page
29
30 ## Community CSS & themes
31
32 ### Custom CSS
33
34 - [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for Shaarli
35 - [shaarli/shaarli-themes](https://github.com/shaarli/shaarli-themes)
36
37 ### Themes
38
39 - [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli
40 - [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli
41 - [ArthurHoaro/shaarli-launch](https://github.com/ArthurHoaro/shaarli-launch) - Customizable Shaarli theme
42 - [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli
43 - [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli
44 - [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone
45 - [ManufacturaInd/shaarli-2004licious-theme](https://github.com/ManufacturaInd/shaarli-2004licious-theme) - A template/theme as a humble homage to the early looks of the del.icio.us site
46
47 ### Shaarli forks
48
49 - [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template
50 - [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance
51
52 ## Example installation: AlbinoMouse theme
53
54 With the following configuration:
55
56 - Apache 2 / PHP 5.6
57 - user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
58 - `http` is the name of the Apache user
59
60 ```bash
61 $ cd ~/public_html
62
63 # clone repositories
64 $ git clone https://github.com/shaarli/Shaarli.git shaarli
65 $ pushd shaarli/tpl
66 $ git clone https://github.com/alexisju/albinomouse-template.git
67 $ popd
68
69 # set access rights for Apache
70 $ chgrp -R http shaarli
71 $ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
72 ```
73
74 Get config written:
75 - go to the freshly installed site
76 - fill the install form
77 - log in to Shaarli
78
79 Edit Shaarli's [configuration](Shaarli-configuration):
80 ```bash
81 # the file should be owned by Apache, thus not writeable => sudo
82 $ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
83 ```