Skip to content

Commit

Permalink
add theme variables documentation (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap authored Feb 11, 2022
1 parent a84bf4f commit 13205e1
Show file tree
Hide file tree
Showing 3 changed files with 582 additions and 0 deletions.
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

0 comments on commit 13205e1

Please sign in to comment.