Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add theme variables documentation #823

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/customizations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The GeoNode MapStore Client application can be customized with the following app

- [Change variables in settings.py](settings-variables.md)
- [Edit localConfig.json via template override](override-local-config.md)
- [Custom theme colors](theme-variables.md)

Advanced customizations:
- [Install a custom branch of the geonode-mapstore-client in the geonode-project](custom-branch.md)
25 changes: 25 additions & 0 deletions docs/customizations/theme-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Custom theme colors

The GeoNode theme allows to override colors with [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) in this ways the layout CSS structure will be always aligned with the version in use but with a customized look.

Here the steps to overrides the variables:

- add a style tag in the template. it is possible to use the `geonode-mapstore-client/snippets/custom_theme.html` template included in all the pages.

```html
<style>
</style>
```

- add the `.gn-theme` class in the style tag with the css variable to override

```html
<style>
/* msgapi is the selector wrapper of the page */
.msgapi .gn-theme {
--gn-primary: #74cfe2;
}
</style>
```

It is possible to use this [page/tool](theme.html) to customize and get the style snippet to apply to the theme.
Loading