-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unwanted gaps between hero and footer when using dark sections (…
…#11862) * Remove banner margin introduced in #11756 * Remove container margin to address white gap when page ends with a dark block * Create new template to extend streamfield for landing page & home page types * Render the spacer block only if paragraph follows dark hero (homepage / landing page type) * Add comment for logic context * Create streamfield block on templates to conditionally include the new partial w/ spacer * Rename block and file for better description * Adding double quotes to attributes * Linting * Remove first block check & rename body_spacer * Adding a post paragraph spacer as well
- Loading branch information
1 parent
5499d43
commit d7ab180
Showing
6 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
network-api/networkapi/mozfest/templates/partials/primary_hero.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
network-api/networkapi/mozfest/templates/partials/streamfield.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
{% load wagtailcore_tags %} | ||
|
||
{% for block in page.body %} | ||
{# optionally render a pre and post paragraph spacer for landing_page / homepage page types with dark sections #} | ||
{% if block.block_type == 'paragraph' %} | ||
{% block pre_paragraph_spacer %}{% endblock pre_paragraph_spacer %} | ||
{% endif %} | ||
{% include_block block with parent_page=page %} | ||
{% endfor %} | ||
{% if block.block_type == 'paragraph' %} | ||
{% block post_paragraph_spacer %}{% endblock post_paragraph_spacer %} | ||
{% endif %} | ||
{% endfor %} |
9 changes: 9 additions & 0 deletions
9
network-api/networkapi/mozfest/templates/partials/streamfield_spacer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% extends "./streamfield.html" %} | ||
|
||
{% block pre_paragraph_spacer %} | ||
<div class="tw-mt-16 large:tw-mt-18"></div> | ||
{% endblock pre_paragraph_spacer %} | ||
|
||
{% block post_paragraph_spacer %} | ||
<div class="tw-mt-8 large:tw-mt-10"></div> | ||
{% endblock post_paragraph_spacer %} |