Skip to content

Commit

Permalink
- More Theme options
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 10, 2019
1 parent 9a56c99 commit e41d5c4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions geonode/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@
}
{% endif %}

{% if custom_theme.jumbotron_title_color %}
.home .jumbotron h1,
.home .jumbotron h2,
.home .jumbotron h3 {
color: {{ custom_theme.jumbotron_title_color }}
}
{% endif %}

{% if custom_theme.jumbotron_text_color %}
.home .jumbotron p {
color: {{ custom_theme.jumbotron_text_color }}
}
{% endif %}

{% if custom_theme.jumbotron_welcome_hide %}
.home .jumbotron .container {
visibility: hidden;
Expand Down
2 changes: 2 additions & 0 deletions geonode/themes/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Meta:
'navbar_dropdown_menu_hover': forms.TextInput(attrs={'type': 'color'}),
'navbar_dropdown_menu_divider': forms.TextInput(attrs={'type': 'color'}),
'jumbotron_color': forms.TextInput(attrs={'type': 'color'}),
'jumbotron_title_color': forms.TextInput(attrs={'type': 'color'}),
'jumbotron_text_color': forms.TextInput(attrs={'type': 'color'}),
'copyright_color': forms.TextInput(attrs={'type': 'color'}),
'cookie_law_info_background': forms.TextInput(attrs={'type': 'color'}),
'cookie_law_info_border': forms.TextInput(attrs={'type': 'color'}),
Expand Down
25 changes: 25 additions & 0 deletions geonode/themes/migrations/0007_auto_20190510_1545.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-10 15:45
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('geonode_themes', '0006_geonodethemecustomization_body_text_color'),
]

operations = [
migrations.AddField(
model_name='geonodethemecustomization',
name='jumbotron_text_color',
field=models.CharField(default=b'#ffffff', max_length=10),
),
migrations.AddField(
model_name='geonodethemecustomization',
name='jumbotron_title_color',
field=models.CharField(default=b'#ffffff', max_length=10),
),
]
2 changes: 2 additions & 0 deletions geonode/themes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ class GeoNodeThemeCustomization(models.Model):
navbar_dropdown_menu_hover = models.CharField(max_length=10, default="#204d74")
navbar_dropdown_menu_divider = models.CharField(max_length=10, default="#204d74")
jumbotron_color = models.CharField(max_length=10, default="#2c689c")
jumbotron_title_color = models.CharField(max_length=10, default="#ffffff")
jumbotron_text_color = models.CharField(max_length=10, default="#ffffff")
contactus = models.BooleanField(default=False, verbose_name="Enable contact us box")
contact_name = models.CharField(max_length=255, null=True, blank=True)
contact_position = models.CharField(max_length=255, null=True, blank=True)
Expand Down

0 comments on commit e41d5c4

Please sign in to comment.