Skip to content

Commit

Permalink
finished program page
Browse files Browse the repository at this point in the history
=> there's still a couple things i have questions about but those are mostly minor css-type things
  • Loading branch information
luminaryFlowers committed May 21, 2024
1 parent 5e8cec6 commit e46c57d
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.7 on 2024-05-21 16:33

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('programs', '0004_individualprogrampage_more_programs_and_more'),
]

operations = [
migrations.AddField(
model_name='individualprogrampage',
name='bottom_banner_text',
field=models.CharField(default='Check out the many opportunities to get involved with HOT!'),
),
migrations.AddField(
model_name='individualprogrampage',
name='bottom_banner_url',
field=models.URLField(blank=True),
),
migrations.AddField(
model_name='individualprogrampage',
name='bottom_banner_url_text',
field=models.CharField(default='Get Involved with HOT'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.7 on 2024-05-21 16:47

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('programs', '0005_individualprogrampage_bottom_banner_text_and_more'),
]

operations = [
migrations.AlterField(
model_name='individualprogrampage',
name='bottom_banner_text',
field=models.CharField(default='Check out many opportunities to get involved with HOT!'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.7 on 2024-05-21 17:04

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('programs', '0006_alter_individualprogrampage_bottom_banner_text'),
]

operations = [
migrations.AlterField(
model_name='individualprogrampage',
name='bottom_banner_text',
field=models.CharField(default='Check out the many opportunities to get involved with HOT!'),
),
]
14 changes: 13 additions & 1 deletion app/programs/models.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from django import forms
from django.db import models
from django.core.exceptions import ValidationError

from wagtail.models import Page
from wagtail.fields import RichTextField, StreamField
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
from wagtail.images.blocks import ImageChooserBlock
from wagtail.blocks import CharBlock, StreamBlock, StructBlock, URLBlock, RichTextBlock, PageChooserBlock
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register

from app.projects.models import IndividualProjectPage

from modelcluster.fields import ParentalKey, ParentalManyToManyField
Expand Down Expand Up @@ -78,6 +81,10 @@ def get_context(self, request):
('program_page', PageChooserBlock(page_type="programs.IndividualProgramPage"))
], use_json_field=True, null=True, blank=True)

bottom_banner_text = models.CharField(default="Check out the many opportunities to get involved with HOT!")
bottom_banner_url = models.URLField(blank=True)
bottom_banner_url_text = models.CharField(default="Get Involved with HOT")

content_panels = Page.content_panels + [
MultiFieldPanel([
FieldPanel("subtitle"),
Expand Down Expand Up @@ -110,5 +117,10 @@ def get_context(self, request):
FieldPanel("view_all_programs_title"),
FieldPanel("view_all_programs_link"),
FieldPanel("more_programs"),
], heading="Programs")
], heading="Programs"),
MultiFieldPanel([
FieldPanel('bottom_banner_text'),
FieldPanel('bottom_banner_url'),
FieldPanel('bottom_banner_url_text'),
])
]
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,5 @@ <h1 class="text-h2 font-bold">
</div>
</div>
</div>
{% include "ui/components/FooterBannerWithTextAndLink.html" with text=page.bottom_banner_text buttontext=page.bottom_banner_url_text url=page.bottom_banner_url %}
{% endblock %}
12 changes: 8 additions & 4 deletions app/ui/templates/ui/components/FooterBannerWithTextAndLink.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class="bg-hot-off-white">
<h1>
{{ text }}
</h1>

<div class="max-w-7xl p-12 text-center">
<h1 class="text-h2 font-bold mb-8">
{{ text }}
</h1>
<a href="{{ url }}">
{% include "components/branded_elements/button.html" with text=buttontext %}
</a>
</div>
</div>
2 changes: 1 addition & 1 deletion hot_osm/templates/components/branded_elements/button.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Resolution: Added 'tabindex=0' to the element to fix an issue where the focus ring was not appearing in Safari. This makes the element focusable and ensures the focus ring is displayed. -->
<button tabindex="0"
class="font-regular font-archivo h-hot-4 text-base-18 bg-hot-red text-hot-white px-hot-3 hover:bg-hot-off-white hover:text-hot-red focus:bg-transparent focus:text-hot-red focus:ring-2 focus:ring-hot-red focus:ring-inset {{ classes }}">
class="font-medium font-archivo h-hot-4 text-intro bg-hot-red text-hot-white px-hot-3 hover:bg-hot-off-white hover:text-hot-red focus:bg-transparent focus:text-hot-red focus:ring-2 focus:ring-hot-red focus:ring-inset {{ classes }}">
{{ text }}
</button>

0 comments on commit e46c57d

Please sign in to comment.