]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/Theming.md
7fb8d927f7ba5a56193b5497cf6010ca2957dd3c
[github/shaarli/Shaarli.git] / doc / Theming.md
1 #Theming
2 ## User CSS
3
4 - Shaarli's apparence can be modified by editing CSS rules in `inc/user.css`. This file allows to override rules defined in the main `inc/shaarli.css` (only add changed rules), or define a whole new theme.
5 - Do not edit `inc/shaarli.css`! Your changes would be overriden when updating Shaarli.
6 - Some themes are available at https://github.com/shaarli/shaarli-themes.
7
8 See also:
9 - [Download CSS styles from an OPML list](Download-CSS-styles-from-an-OPML-list.html)
10
11 ## RainTPL template
12
13 _WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental._
14
15 - Find the template you'd like to install (see the list of [available templates|Theming#community-themes--templates](available-templates|Theming#community-themes--templates.html))
16 - Find it's git clone URL or download the zip archive for the template.
17 - In your Shaarli `tpl/` directory, run `git clone https://url/of/my-template/` or unpack the zip archive.
18 - There should now be a `my-template/` directory under the `tpl/` dir, containing directly all the template files.
19 - Edit `data/config.php` to have Shaarli use this template, e.g.
20 ```php
21 $GLOBALS['config'['RAINTPL_TPL'] = 'tpl/my-template/';]('RAINTPL_TPL']-=-'tpl/my-template/';.html)
22 ```
23
24 ## Community themes & templates
25 - [AkibaTech/Shaarli Superhero Theme](https://github.com/AkibaTech/Shaarli---SuperHero-Theme) - A template/theme for Shaarli[](.html)
26 - [alexisju/albinomouse-template](https://github.com/alexisju/albinomouse-template) - A full template for Shaarli[](.html)
27 - [dhoko/ShaarliTemplate](https://github.com/dhoko/ShaarliTemplate) - A template/theme for Shaarli[](.html)
28 - [kalvn/shaarli-blocks](https://github.com/kalvn/shaarli-blocks) - A template/theme for Shaarli[](.html)
29 - [kalvn/Shaarli-Material](https://github.com/kalvn/Shaarli-Material) - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone.[](.html)
30 - [misterair/Limonade](https://github.com/misterair/limonade) - A fork of (legacy) Shaarli with a new template[](.html)
31 - [mrjovanovic/serious-theme-shaarli](https://github.com/mrjovanovic/serious-theme-shaarli) - A serious theme for SHaarli.[](.html)
32 - [Vinm/Blue-theme-for Shaarli](https://github.com/Vinm/Blue-theme-for-Shaarli) - A template/theme for Shaarli ([unmaintained](https://github.com/Vinm/Blue-theme-for-Shaarli/issues/2), compatibility unknown)[](.html)
33 - [vivienhaese/shaarlitheme](https://github.com/vivienhaese/shaarlitheme) - A Shaarli fork meant to be run in an openshift instance[](.html)
34
35 ### Example installation: AlbinoMouse template
36 With the following configuration:
37 - Apache 2 / PHP 5.6
38 - user sites are enabled, e.g. `/home/user/public_html/somedir` is served as `http://localhost/~user/somedir`
39 - `http` is the name of the Apache user
40
41 ```bash
42 $ cd ~/public_html
43
44 # clone repositories
45 $ git clone https://github.com/shaarli/Shaarli.git shaarli
46 $ pushd shaarli/tpl
47 $ git clone https://github.com/alexisju/albinomouse-template.git
48 $ popd
49
50 # set access rights for Apache
51 $ chgrp -R http shaarli
52 $ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
53 ```
54
55 Get config written:
56 - go to the freshly installed site
57 - fill the install form
58 - log in to Shaarli
59
60 Edit Shaarli's [configuration|Shaarli configuration](configuration|Shaarli-configuration.html):
61 ```bash
62 # the file should be owned by Apache, thus not writeable => sudo
63 $ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
64 ```