index.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link rel="shortcut icon" href="../img/favicon.ico">
  9. <title>Theming - Shaarli Documentation</title>
  10. <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
  11. <link rel="stylesheet" href="../css/theme.css" type="text/css" />
  12. <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
  13. <link rel="stylesheet" href="../css/highlight.css">
  14. <link href="../github-markdown.css" rel="stylesheet">
  15. <script>
  16. // Current page data
  17. var mkdocs_page_name = "Theming";
  18. var mkdocs_page_input_path = "Theming.md";
  19. var mkdocs_page_url = "/Theming/";
  20. </script>
  21. <script src="../js/jquery-2.1.1.min.js"></script>
  22. <script src="../js/modernizr-2.8.3.min.js"></script>
  23. <script type="text/javascript" src="../js/highlight.pack.js"></script>
  24. </head>
  25. <body class="wy-body-for-nav" role="document">
  26. <div class="wy-grid-for-nav">
  27. <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
  28. <div class="wy-side-nav-search">
  29. <a href=".." class="icon icon-home"> Shaarli Documentation</a>
  30. <div role="search">
  31. <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
  32. <input type="text" name="q" placeholder="Search docs" />
  33. </form>
  34. </div>
  35. </div>
  36. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  37. <ul class="current">
  38. <li class="toctree-l1">
  39. <a class="" href="..">Home</a>
  40. </li>
  41. <li class="toctree-l1">
  42. <span class="caption-text">Setup</span>
  43. <ul class="subnav">
  44. <li class="">
  45. <a class="" href="../Download-and-Installation/">Download and Installation</a>
  46. </li>
  47. <li class="">
  48. <a class="" href="../Upgrade-and-migration/">Upgrade and migration</a>
  49. </li>
  50. <li class="">
  51. <a class="" href="../Server-requirements/">Server requirements</a>
  52. </li>
  53. <li class="">
  54. <a class="" href="../Server-configuration/">Server configuration</a>
  55. </li>
  56. <li class="">
  57. <a class="" href="../Server-security/">Server security</a>
  58. </li>
  59. <li class="">
  60. <a class="" href="../Shaarli-configuration/">Shaarli configuration</a>
  61. </li>
  62. <li class="">
  63. <a class="" href="../Plugins/">Plugins</a>
  64. </li>
  65. </ul>
  66. </li>
  67. <li class="toctree-l1">
  68. <span class="caption-text">Docker</span>
  69. <ul class="subnav">
  70. <li class="">
  71. <a class="" href="../docker/docker-101/">Docker 101</a>
  72. </li>
  73. <li class="">
  74. <a class="" href="../docker/shaarli-images/">Shaarli images</a>
  75. </li>
  76. <li class="">
  77. <a class="" href="../docker/reverse-proxy-configuration/">Reverse proxy configuration</a>
  78. </li>
  79. <li class="">
  80. <a class="" href="../docker/resources/">Docker resources</a>
  81. </li>
  82. </ul>
  83. </li>
  84. <li class="toctree-l1">
  85. <span class="caption-text">Usage</span>
  86. <ul class="subnav">
  87. <li class="">
  88. <a class="" href="../Features/">Features</a>
  89. </li>
  90. <li class="">
  91. <a class="" href="../Bookmarklet/">Bookmarklet</a>
  92. </li>
  93. <li class="">
  94. <a class="" href="../Browsing-and-searching/">Browsing and searching</a>
  95. </li>
  96. <li class="">
  97. <a class="" href="../Firefox-share/">Firefox share</a>
  98. </li>
  99. <li class="">
  100. <a class="" href="../RSS-feeds/">RSS feeds</a>
  101. </li>
  102. <li class="">
  103. <a class="" href="../REST-API/">REST API</a>
  104. </li>
  105. </ul>
  106. </li>
  107. <li class="toctree-l1">
  108. <span class="caption-text">How To</span>
  109. <ul class="subnav">
  110. <li class="">
  111. <a class="" href="../Backup,-restore,-import-and-export/">Backup, restore, import and export</a>
  112. </li>
  113. <li class="">
  114. <a class="" href="../Various-hacks/">Various hacks</a>
  115. </li>
  116. </ul>
  117. </li>
  118. <li class="toctree-l1">
  119. <a class="" href="../Troubleshooting/">Troubleshooting</a>
  120. </li>
  121. <li class="toctree-l1">
  122. <span class="caption-text">Development</span>
  123. <ul class="subnav">
  124. <li class="">
  125. <a class="" href="../Development-guidelines/">Development guidelines</a>
  126. </li>
  127. <li class="">
  128. <a class="" href="../Continuous-integration-tools/">Continuous integration tools</a>
  129. </li>
  130. <li class="">
  131. <a class="" href="../GnuPG-signature/">GnuPG signature</a>
  132. </li>
  133. <li class="">
  134. <a class="" href="../Coding-guidelines/">Coding guidelines</a>
  135. </li>
  136. <li class="">
  137. <a class="" href="../Directory-structure/">Directory structure</a>
  138. </li>
  139. <li class="">
  140. <a class="" href="../3rd-party-libraries/">3rd party libraries</a>
  141. </li>
  142. <li class="">
  143. <a class="" href="../Plugin-System/">Plugin System</a>
  144. </li>
  145. <li class="">
  146. <a class="" href="../Release-Shaarli/">Release Shaarli</a>
  147. </li>
  148. <li class="">
  149. <a class="" href="../Versioning-and-Branches/">Versioning and Branches</a>
  150. </li>
  151. <li class="">
  152. <a class="" href="../Security/">Security</a>
  153. </li>
  154. <li class="">
  155. <a class="" href="../Static-analysis/">Static analysis</a>
  156. </li>
  157. <li class=" current">
  158. <a class="current" href="./">Theming</a>
  159. <ul class="subnav">
  160. <li class="toctree-l3"><a href="#foreword">Foreword</a></li>
  161. <li class="toctree-l3"><a href="#custom-css">Custom CSS</a></li>
  162. <li class="toctree-l3"><a href="#themes">Themes</a></li>
  163. <li class="toctree-l3"><a href="#community-css-themes">Community CSS &amp; themes</a></li>
  164. <ul>
  165. <li><a class="toctree-l4" href="#custom-css_1">Custom CSS</a></li>
  166. <li><a class="toctree-l4" href="#themes_1">Themes</a></li>
  167. <li><a class="toctree-l4" href="#shaarli-forks">Shaarli forks</a></li>
  168. </ul>
  169. <li class="toctree-l3"><a href="#example-installation-albinomouse-theme">Example installation: AlbinoMouse theme</a></li>
  170. </ul>
  171. </li>
  172. <li class="">
  173. <a class="" href="../Unit-tests/">Unit tests</a>
  174. </li>
  175. </ul>
  176. </li>
  177. <li class="toctree-l1">
  178. <span class="caption-text">About</span>
  179. <ul class="subnav">
  180. <li class="">
  181. <a class="" href="../FAQ/">FAQ</a>
  182. </li>
  183. <li class="">
  184. <a class="" href="../Community-&-Related-software/">Community & Related software</a>
  185. </li>
  186. </ul>
  187. </li>
  188. </ul>
  189. </div>
  190. &nbsp;
  191. </nav>
  192. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  193. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  194. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  195. <a href="..">Shaarli Documentation</a>
  196. </nav>
  197. <div class="wy-nav-content">
  198. <div class="rst-content">
  199. <div role="navigation" aria-label="breadcrumbs navigation">
  200. <ul class="wy-breadcrumbs">
  201. <li><a href="..">Docs</a> &raquo;</li>
  202. <li>Development &raquo;</li>
  203. <li>Theming</li>
  204. <li class="wy-breadcrumbs-aside">
  205. <a href="https://github.com/shaarli/Shaarli/edit/master/docs/Theming.md"
  206. class="icon icon-github"> Edit on GitHub</a>
  207. </li>
  208. </ul>
  209. <hr/>
  210. </div>
  211. <div role="main">
  212. <div class="section">
  213. <h2 id="foreword">Foreword</h2>
  214. <p>There are two ways of customizing how Shaarli looks:</p>
  215. <ol>
  216. <li>by using a custom CSS to override Shaarli's CSS</li>
  217. <li>by using a full theme that provides its own RainTPL templates, CSS and Javascript resources</li>
  218. </ol>
  219. <h2 id="custom-css">Custom CSS</h2>
  220. <p>Shaarli's appearance can be modified by adding CSS rules to:
  221. - Shaarli &lt; <code>v0.9.0</code>: <code>inc/user.css</code>
  222. - Shaarli &gt;= <code>v0.9.0</code>: <code>data/user.css</code></p>
  223. <p>This file allows overriding rules defined in the template CSS files (only add changed rules), or define a whole new theme.</p>
  224. <p><strong>Note</strong>: Do not edit <code>tpl/default/css/shaarli.css</code>! Your changes would be overridden when updating Shaarli.</p>
  225. <p>See also <a href="../Download CSS styles from an OPML list">Download CSS styles from an OPML list</a></p>
  226. <h2 id="themes">Themes</h2>
  227. <p><em>WARNING - This feature is currently being worked on and will be improved in the next releases. Experimental.</em></p>
  228. <p>Installation:
  229. - find a theme you'd like to install
  230. - copy or clone the theme folder under <code>tpl/&lt;a_sweet_theme&gt;</code>
  231. - enable the theme:
  232. - Shaarli &lt; <code>v0.9.0</code>: edit <code>data/config.json.php</code> and set the value of <code>raintpl_tpl</code> to the new theme name:
  233. <code>"raintpl_tpl": "tpl\/my-template\/"</code>
  234. - Shaarli &gt;= <code>v0.9.0</code>: select the theme through the <em>Tools</em> page</p>
  235. <h2 id="community-css-themes">Community CSS &amp; themes</h2>
  236. <h3 id="custom-css_1">Custom CSS</h3>
  237. <ul>
  238. <li><a href="https://github.com/mrjovanovic/serious-theme-shaarli">mrjovanovic/serious-theme-shaarli</a> - A serious theme for Shaarli</li>
  239. <li><a href="https://github.com/shaarli/shaarli-themes">shaarli/shaarli-themes</a></li>
  240. </ul>
  241. <h3 id="themes_1">Themes</h3>
  242. <ul>
  243. <li><a href="https://github.com/AkibaTech/Shaarli---SuperHero-Theme">AkibaTech/Shaarli Superhero Theme</a> - A template/theme for Shaarli</li>
  244. <li><a href="https://github.com/alexisju/albinomouse-template">alexisju/albinomouse-template</a> - A full template for Shaarli</li>
  245. <li><a href="https://github.com/ArthurHoaro/shaarli-launch">ArthurHoaro/shaarli-launch</a> - Customizable Shaarli theme</li>
  246. <li><a href="https://github.com/dhoko/ShaarliTemplate">dhoko/ShaarliTemplate</a> - A template/theme for Shaarli</li>
  247. <li><a href="https://github.com/kalvn/shaarli-blocks">kalvn/shaarli-blocks</a> - A template/theme for Shaarli</li>
  248. <li><a href="https://github.com/kalvn/Shaarli-Material">kalvn/Shaarli-Material</a> - A theme (template) based on Google's Material Design for Shaarli, the superfast delicious clone</li>
  249. <li><a href="https://github.com/ManufacturaInd/shaarli-2004licious-theme">ManufacturaInd/shaarli-2004licious-theme</a> - A template/theme as a humble homage to the early looks of the del.icio.us site</li>
  250. </ul>
  251. <h3 id="shaarli-forks">Shaarli forks</h3>
  252. <ul>
  253. <li><a href="https://github.com/misterair/limonade">misterair/Limonade</a> - A fork of (legacy) Shaarli with a new template</li>
  254. <li><a href="https://github.com/vivienhaese/shaarlitheme">vivienhaese/shaarlitheme</a> - A Shaarli fork meant to be run in an openshift instance</li>
  255. </ul>
  256. <h2 id="example-installation-albinomouse-theme">Example installation: AlbinoMouse theme</h2>
  257. <p>With the following configuration:
  258. - Apache 2 / PHP 5.6
  259. - user sites are enabled, e.g. <code>/home/user/public_html/somedir</code> is served as <code>http://localhost/~user/somedir</code>
  260. - <code>http</code> is the name of the Apache user</p>
  261. <pre><code class="bash">$ cd ~/public_html
  262. # clone repositories
  263. $ git clone https://github.com/shaarli/Shaarli.git shaarli
  264. $ pushd shaarli/tpl
  265. $ git clone https://github.com/alexisju/albinomouse-template.git
  266. $ popd
  267. # set access rights for Apache
  268. $ chgrp -R http shaarli
  269. $ chmod g+rwx shaarli shaarli/cache shaarli/data shaarli/pagecache shaarli/tmp
  270. </code></pre>
  271. <p>Get config written:
  272. - go to the freshly installed site
  273. - fill the install form
  274. - log in to Shaarli</p>
  275. <p>Edit Shaarli's <a href="../configuration|Shaarli configuration">configuration|Shaarli configuration</a>:</p>
  276. <pre><code class="bash"># the file should be owned by Apache, thus not writeable =&gt; sudo
  277. $ sudo sed -i s=tpl=tpl/albinomouse-template=g shaarli/data/config.php
  278. </code></pre>
  279. </div>
  280. </div>
  281. <footer>
  282. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  283. <a href="../Unit-tests/" class="btn btn-neutral float-right" title="Unit tests">Next <span class="icon icon-circle-arrow-right"></span></a>
  284. <a href="../Static-analysis/" class="btn btn-neutral" title="Static analysis"><span class="icon icon-circle-arrow-left"></span> Previous</a>
  285. </div>
  286. <hr/>
  287. <div role="contentinfo">
  288. <!-- Copyright etc -->
  289. </div>
  290. Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  291. </footer>
  292. </div>
  293. </div>
  294. </section>
  295. </div>
  296. <div class="rst-versions" role="note" style="cursor: pointer">
  297. <span class="rst-current-version" data-toggle="rst-current-version">
  298. <a href="https://github.com/shaarli/Shaarli" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
  299. <span><a href="../Static-analysis/" style="color: #fcfcfc;">&laquo; Previous</a></span>
  300. <span style="margin-left: 15px"><a href="../Unit-tests/" style="color: #fcfcfc">Next &raquo;</a></span>
  301. </span>
  302. </div>
  303. <script src="../js/theme.js"></script>
  304. </body>
  305. </html>