Skip to content
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
19 changes: 19 additions & 0 deletions home/migrations/0042_homepage_fonts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 5.0.9 on 2024-09-08 22:45

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('home', '0041_homepage_externalraws'),
]

operations = [
migrations.AddField(
model_name='homepage',
name='fonts',
field=wagtail.fields.StreamField([('fonts', 3)], blank=True, block_lookup={0: ('wagtail.blocks.CharBlock', (), {'max_length': 250, 'required': True}), 1: ('wagtail.blocks.URLBlock', (), {'required': True}), 2: ('wagtail.blocks.CharBlock', (), {'default': '#000000', 'max_length': 250, 'required': True}), 3: ('wagtail.blocks.StructBlock', [[('name', 0), ('section', 0), ('url', 1), ('font_size', 0), ('font_wight', 0), ('font_family', 0), ('font_color', 2)]], {})}),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Generated by Django 5.0.9 on 2024-09-11 02:04

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('home', '0042_homepage_fonts'),
]

operations = [
migrations.RemoveField(
model_name='homepage',
name='fonts',
),
migrations.AddField(
model_name='homepage',
name='primaryFontFamily',
field=models.CharField(default='sans-serif', max_length=250),
),
migrations.AddField(
model_name='homepage',
name='primaryFontURL',
field=models.URLField(blank=True, max_length=250),
),
migrations.AddField(
model_name='homepage',
name='secondaryFontFamily',
field=models.CharField(default='sans-serif', max_length=250),
),
migrations.AddField(
model_name='homepage',
name='secondaryFontURL',
field=models.URLField(blank=True, max_length=250),
),
]
13 changes: 13 additions & 0 deletions home/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ class HomePage(Page):
blank=True,
use_json_field=True,
)

primaryFontURL = models.URLField(max_length=250, blank=True)
primaryFontFamily= models.CharField(max_length=250, default="sans-serif")
secondaryFontURL = models.URLField(max_length=250, blank=True)
secondaryFontFamily = models.CharField(max_length=250, default="sans-serif")
color_gradient_1 = ColorField(max_length=250, blank=True, default="#FF4D79")
color_gradient_2 = ColorField(max_length=250, blank=True, default="#FF809F")
color_primary = ColorField(max_length=250, blank=True, default="#ff4a67")
color_text_hero = ColorField(max_length=250, blank=True, default="#FFFFFF")

show_time = models.BooleanField(default=True)
background_section = ColorField(max_length=250, blank=True, default="#FFFFFF")
color_text_section = ColorField(max_length=250, blank=True, default="#FFFFFF")
Expand Down Expand Up @@ -146,9 +152,16 @@ class HomePage(Page):
NativeColorPanel("color_text_hero"),
FieldPanel("hero_padding_left"),
FieldPanel("hero_padding_right"),

FieldPanel("primaryFontURL"),
FieldPanel("primaryFontFamily"),
FieldPanel("secondaryFontURL"),
FieldPanel("secondaryFontFamily"),

NativeColorPanel("color_gradient_1"),
NativeColorPanel("color_gradient_2"),
NativeColorPanel("color_primary"),

FieldPanel("show_time"),
NativeColorPanel("background_section"),
NativeColorPanel("color_text_section"),
Expand Down
12 changes: 11 additions & 1 deletion home/templates/home/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
--hero-padding-right: {{page.hero_padding_right}};
--footer-bg: {{page.footer_background}};
--footer-text: {{page.footer_color_text}};
--primary-font: '{{page.primaryFontFamily}}';
--secondary-font: {{page.secondaryFontFamily}};
}
</style>
<!-- Bootstrap CSS -->
Expand All @@ -57,6 +59,15 @@
<link rel="stylesheet" type="text/css" href="{% static '2023/css/main.css' %}">
<!-- Responsive Style -->
<link rel="stylesheet" type="text/css" href="{% static '2023/css/responsive.css' %}">

{%if page.value.primaryFontURL != "" %}
<link href="{{page.primaryFontURL}}" rel="stylesheet">
{%endif%}

{%if page.value.secondaryFontURL != "" %}
<link href="{{page.secondaryFontURL}}" rel="stylesheet">
{%endif%}

<style>
.hero-area-bg-image {
background: url("{{ tmp_hero.url }}") no-repeat;
Expand Down Expand Up @@ -154,7 +165,6 @@
</div>
<!-- Hero Area End -->
</header>

<!-- Count Bar Start -->
<section id="count" style="background: {{page.background_section}}; color: {{page.color_text_section}}">
<div class="container">
Expand Down
16 changes: 8 additions & 8 deletions website/static/2023/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ html {
body {
font-size: 15px;
font-weight: 400;
font-family: 'Open Sans', sans-serif;
font-family: var(--secondary-font), sans-serif;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
Expand All @@ -26,7 +26,7 @@ h4,
h5 {
font-size: 36px;
font-weight: 700;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
}

a {
Expand All @@ -46,7 +46,7 @@ a a:focus {

p {
font-weight: 400;
font-family: 'Open Sans', sans-serif;
font-family: var(--secondary-font), sans-serif;
margin: 0px;
font-size: 14px;
}
Expand Down Expand Up @@ -198,7 +198,7 @@ ol li {
padding: 10px 30px;
line-height: 22px;
border-radius: 0px;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
cursor: pointer;
font-weight: 500;
color: #fff;
Expand Down Expand Up @@ -621,7 +621,7 @@ a.back-to-top:focus {
padding: 0 15px;
margin-top: 10px;
margin-bottom: 10px;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
font-weight: 500;
line-height: 40px;
text-transform: uppercase;
Expand Down Expand Up @@ -2195,7 +2195,7 @@ footer {
line-height: 45px;
font-weight: 700;
letter-spacing: 0.3;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
display: block;
margin-bottom: 10px;
padding: 1px;
Expand All @@ -2211,7 +2211,7 @@ footer {
border: none;
position: relative;
height: auto;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
border-radius: 4px;
text-align: center;
font-weight: 400;
Expand All @@ -2225,7 +2225,7 @@ footer {
line-height: 45px;
font-weight: 700;
letter-spacing: 0.3;
font-family: 'Roboto', sans-serif;
font-family: var(--primary-font), sans-serif;
display: block;
margin-bottom: 10px;
}
Expand Down