Skip to content

Commit

Permalink
TDP: hardcode TdpSearchHeroImage
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Mar 29, 2024
1 parent 23d91ef commit 0e4d8d8
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="https://files.consumerfinance.gov/f/images/SmallSearchInterfaceImage.original.jpg,
https://files.consumerfinance.gov/f/images/LargeSearchInterfaceImage.original.jpg 2x"
src="https://files.consumerfinance.gov/f/images/LargeSearchInterfaceImage.original.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 0e4d8d8

Please sign in to comment.