diff options
| author | 2021-02-06 10:46:03 -0500 | |
|---|---|---|
| committer | 2021-02-06 16:46:03 +0100 | |
| commit | a3f07d7d5eb711d047d7f59628eb72aea7743379 (patch) | |
| tree | 050ba99064d664a10b68904e2b734534be6159dc /docs/en/developers/04_Frontend/02_Design.md | |
| parent | 4a87f34bcff6afe28e33692e40dcbfb1f663f75a (diff) | |
Theme Documentation (#3415)
* adding self CREDITS.md
* add "theme" to link for easier navigation
* add documentation about themes and the files that go in them
* add admin documentation for themes
* fix markdown styling
* fix CSSJanus usage
Diffstat (limited to 'docs/en/developers/04_Frontend/02_Design.md')
| -rw-r--r-- | docs/en/developers/04_Frontend/02_Design.md | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/docs/en/developers/04_Frontend/02_Design.md b/docs/en/developers/04_Frontend/02_Design.md index c2e622a08..625fede28 100644 --- a/docs/en/developers/04_Frontend/02_Design.md +++ b/docs/en/developers/04_Frontend/02_Design.md @@ -1,11 +1,36 @@ -# Template file +# Writing a new theme -**TODO** +**Note: Currently personal themes are not officially supported and may be overwritten when updating. Be sure to keep backups!** -# Writing a new theme +**As of writing (02-02-2021), support for themes as extensions is under development.** + +The easiest way to create a theme is by copying and modifying the base theme (or another of the pre-installed themes). The base theme can be found in [/p/themes/base-theme](https://github.com/FreshRSS/FreshRSS/tree/master/p/themes/base-theme). Themes require: +- a **metadata.json** file to describe the theme. +- a **loader.gif** file to use as a loading icon (assuming .loading's background has not been overridden) +- an **icons** folder containing .svg, .ico, and .png files to override existing icons +- a **thumbs** folder containing a file, **original.png** that will be used as the preview for the theme + +"_template.css" is normally added to the metadata file as a fallback for missing aspects. The file is taken from the base theme. If submitting a pull request for a theme, please know that [pull request themes must include this file.](https://github.com/FreshRSS/FreshRSS/pull/2938#issuecomment-624085450) -**TODO** +## RTL Support + +RTL (right-to-left) support for languages such as Hebrew and Arabic is handled through CSSJanus. To generate an RTL CSS file from your standard file, use `make rtl`. Be sure to commit the resulting file (filename.rtl.css). # Overriding icons -**TODO** +To replace the default icons, add an "icons" folder to your theme's folder. Use files with the same name as the default icon to override them. + +# Template file + +metadata.json +``` +{ + "name": "Theme name", + "author": "Theme author", + "description": "Theme description", + "version": 0.1, + "files": ["_template.css", "file1.css", "file2.css"] +} +``` + +An example of a css theme file can be found at [/p/themes/base-theme/base.css](https://github.com/FreshRSS/FreshRSS/blob/master/p/themes/base-theme/base.css) |
