mirror of
https://github.com/Coffeedon/Cofffee-Assets.git
synced 2024-11-25 07:30:59 +00:00
Update README.md
This commit is contained in:
parent
318a985c35
commit
9dec6e36e4
1 changed files with 10 additions and 10 deletions
20
README.md
20
README.md
|
@ -15,34 +15,34 @@ Let's use the Modern Dark theme as an example.
|
||||||
app/
|
app/
|
||||||
javascript/
|
javascript/
|
||||||
styles/
|
styles/
|
||||||
moder-dark.scss | **new**
|
moder-dark.scss | **new**
|
||||||
contrast/
|
contrast/
|
||||||
...
|
...
|
||||||
fonts/
|
fonts/
|
||||||
...
|
...
|
||||||
modern/ | **new**
|
modern/ | **new**
|
||||||
dark.scss | **new**
|
dark.scss | **new**
|
||||||
style.scss | **new**
|
style.scss | **new**
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
2. **Add your theme to the config.** This is what [the default themes.yml](https://github.com/tootsuite/mastodon/blob/master/config/themes.yml) looks like in Mastodon. To make your custom theme visible in settings, you need to add a new line in the form `themeName: path/to/theme.scss`. For example, the modern-dark theme would require adding `modern-dark: styles/modern-dark.scss` as a new line.
|
2. **Add your theme to the config.** This is what [the default themes.yml](https://github.com/tootsuite/mastodon/blob/master/config/themes.yml) looks like in Mastodon. To make your custom theme visible in settings, you need to add a new line in the form `themeName: path/to/theme.scss`. For example, the modern-dark theme would require adding `modern-dark: styles/modern-dark.scss` as a new line.
|
||||||
|
|
||||||
```
|
```
|
||||||
default: styles/application.scss
|
default: styles/application.scss
|
||||||
contrast: styles/contrast.scss
|
contrast: styles/contrast.scss
|
||||||
mastodon-light: styles/mastodon-light.scss
|
mastodon-light: styles/mastodon-light.scss
|
||||||
modern-dark: styles/modern-dark.scss | **new**
|
modern-dark: styles/modern-dark.scss | **new**
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Add a human-friendly name for the theme (optional).** You can edit each desired language's locale file in `config/locales/[lang].yml` to add a localized string name for your theme's `themeName` as added in the previous step. For example, [the default `config/locales/en.yml`](https://github.com/tootsuite/mastodon/blob/041ff5fa9a45f7b8d1048a05a35611622b6f5fdb/config/locales/en.yml#L942-L945) contains localizations for the three default themes that ship with Mastodon, into the `en`glish language. You need to do this for every language you expect your users to use, or else they will see the unlocalized `themeName` directly.
|
3. **Add a human-friendly name for the theme (optional).** You can edit each desired language's locale file in `config/locales/[lang].yml` to add a localized string name for your theme's `themeName` as added in the previous step. For example, [the default `config/locales/en.yml`](https://github.com/tootsuite/mastodon/blob/041ff5fa9a45f7b8d1048a05a35611622b6f5fdb/config/locales/en.yml#L942-L945) contains localizations for the three default themes that ship with Mastodon, into the `en`glish language. You need to do this for every language you expect your users to use, or else they will see the unlocalized `themeName` directly.
|
||||||
|
|
||||||
```
|
```
|
||||||
themes:
|
themes:
|
||||||
contrast: Mastodon (High contrast)
|
contrast: Mastodon (High contrast)
|
||||||
default: Mastodon (Dark)
|
default: Mastodon (Dark)
|
||||||
mastodon-light: Mastodon (Light)
|
mastodon-light: Mastodon (Light)
|
||||||
modern-dark: Modern Dark | **new**
|
modern-dark: Modern Dark | **new**
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Compile theme assets and restart.** Run `RAILS_ENV=production bundle exec rails assets:precompile` and restart your Mastodon instance for the changes to take effect.
|
4. **Compile theme assets and restart.** Run `RAILS_ENV=production bundle exec rails assets:precompile` and restart your Mastodon instance for the changes to take effect.
|
||||||
|
|
Loading…
Reference in a new issue