Skip to content

Commit

Permalink
[Themes] Add more nav customization options
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 10, 2019
1 parent e26017e commit 9a56c99
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
{% if custom_theme.body_color %}
body {
background: {{ custom_theme.body_color }};
{% if custom_theme.body_text %}
color: {{ custom_theme.body_text }};
{% if custom_theme.body_text_color %}
color: {{ custom_theme.body_text_color }};
{% endif %}
}
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions geonode/themes/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Meta:
model = GeoNodeThemeCustomization
widgets = {
'body_color': forms.TextInput(attrs={'type': 'color'}),
'body_text_color': forms.TextInput(attrs={'type': 'color'}),
'navbar_color': forms.TextInput(attrs={'type': 'color'}),
'navbar_text_color': forms.TextInput(attrs={'type': 'color'}),
'navbar_text_hover': forms.TextInput(attrs={'type': 'color'}),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-10 14:06
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('geonode_themes', '0005_auto_20190510_1335'),
]

operations = [
migrations.AddField(
model_name='geonodethemecustomization',
name='body_text_color',
field=models.CharField(default=b'#3a3a3a', max_length=10),
),
]
1 change: 1 addition & 0 deletions geonode/themes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class GeoNodeThemeCustomization(models.Model):
jumbotron_cta_text = models.CharField(max_length=255, null=True, blank=True, verbose_name="Call to action text")
jumbotron_cta_link = models.CharField(max_length=255, null=True, blank=True, verbose_name="Call to action link")
body_color = models.CharField(max_length=10, default="#333333")
body_text_color = models.CharField(max_length=10, default="#3a3a3a")
navbar_color = models.CharField(max_length=10, default="#333333")
navbar_text_color = models.CharField(max_length=10, default="#ffffff")
navbar_text_hover = models.CharField(max_length=10, default="#2c689c")
Expand Down

0 comments on commit 9a56c99

Please sign in to comment.