Skip to content

Commit

Permalink
Merge pull request #8277 from cfpb/ans_hardcode_tdp_hero
Browse files Browse the repository at this point in the history
TDP: hardcode `TdpSearchHeroImage`
  • Loading branch information
anselmbradford authored Mar 29, 2024
2 parents 23d91ef + 660432f commit aac379c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
<section class="m-search-hero">
<div class="m-search-hero_text">
{% for block in page.header -%}
{% if block.block_type != 'hero' %}
{{ render_block.render(block, loop.index) }}
{% endif %}
{{ render_block.render(block, loop.index) }}
{%- endfor %}
</div>
<div class="m-search-hero_image-wrapper">
{% for block in page.header_sidebar -%}
{% include_block block %}
{%- endfor %}
<img class="m-search-hero_image"
srcset="{{ static('apps/teachers-digital-platform/img/search-landing-hero.jpg') }},
{{ static('apps/teachers-digital-platform/img/search-landing-hero-2x.jpg') }} 2x"
src="{{ static('apps/teachers-digital-platform/img/search-landing-hero-2x.jpg') }}"
width="498"
alt="Illustration of teacher and student activity books">
</div>
</section>
<div class="block block__padded-top block__flush-top u-mb30">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.24 on 2024-03-29 18:13

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('teachers_digital_platform', '0003_rtf_to_urtf'),
]

operations = [
migrations.RemoveField(
model_name='activityindexpage',
name='header_sidebar',
),
]
10 changes: 0 additions & 10 deletions cfgov/teachers_digital_platform/models/activity_index_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
ActivityType,
)
from teachers_digital_platform.models.pages import ActivityPage
from teachers_digital_platform.molecules import TdpSearchHeroImage
from v1.atomic_elements import molecules
from v1.models import CFGOVPage

Expand Down Expand Up @@ -79,19 +78,10 @@ class ActivityIndexPage(CFGOVPage):
use_json_field=True,
)

header_sidebar = StreamField(
[
("image", TdpSearchHeroImage()),
],
blank=True,
use_json_field=True,
)

results = {}
activity_setups = None
content_panels = CFGOVPage.content_panels + [
FieldPanel("header"),
FieldPanel("header_sidebar"),
]

edit_handler = TabbedInterface(
Expand Down
19 changes: 0 additions & 19 deletions cfgov/teachers_digital_platform/molecules.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def test_can_create_activity_index_page(self):
{
"title": "Search for activities",
"header-count": "0",
"header_sidebar-count": "0",
"sidefoot-count": "0",
"categories-TOTAL_FORMS": "0",
"categories-INITIAL_FORMS": "0",
Expand Down

0 comments on commit aac379c

Please sign in to comment.