-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6650 - MozFest Dark Quote #11539
Merged
chris-lawton
merged 2 commits into
integration/mozfest-2024
from
feature/6650-dark-quote
Dec 15, 2023
Merged
6650 - MozFest Dark Quote #11539
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
network-api/networkapi/mozfest/templates/fragments/blocks/mozfest_dark_quote.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,16 @@ | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
|
||
{% block block_content %} | ||
<div class="tw-py-16 tw-bg-black tw-dark"> | ||
<div class="tw-container"> | ||
<div class="tw-row tw-justify-center"> | ||
<div class="feature-quote"> | ||
<div class="quote-content [&_p]:tw-text-white"> | ||
{{ self.quote|richtext }} | ||
</div> | ||
<p class="tw-text-gray-40 tw-h6-heading tw-text-lg tw-max-w-4xl">{{ self.cite }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock block_content %} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some context why this is building a totally new block template over reusing the existing quote block that is mentioned on the ticket? It looks like we are reusing the CSS but not the HTML. Could this be handled as a variant in mostly CSS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've held some conversations since the ticket was created and it was decided that the dark background was enough to warrant it being a new block - i'll update the ticket to make this clearer.
The dark quote block is heavily based of the existing
single_quote_block.html
template (https://github.com/MozillaFoundation/foundation.mozilla.org/blob/main/network-api/networkapi/wagtailpages/templates/wagtailpages/blocks/single_quote_block.html) which also contains a mix of tailwind and css classes. Unfortunately we can't use this template directly as it extends"./base_streamfield_block.html"
which wraps everything in a container (https://github.com/MozillaFoundation/foundation.mozilla.org/blob/main/network-api/networkapi/wagtailpages/templates/wagtailpages/blocks/base_streamfield_block.html#L5) meaning we couldn't achieve the full width black background seen in the design.The main difference between the dark quote block in the design and the existing one is the font size of the quote so i'll check in standup which one we should be following.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in standup and we're going to follow the styles of the current quote block. Updated here: ad110bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I feel like I talked you into less semantic HTML 😭