-
Notifications
You must be signed in to change notification settings - Fork 1
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
TWE-16 - BE - Optional intro & button fields for blog/work chooser blocks #339
base: integration/2024-evolution
Are you sure you want to change the base?
TWE-16 - BE - Optional intro & button fields for blog/work chooser blocks #339
Conversation
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.
Thanks @SharmaineLim LGTM
<ul class="grid__related-posts streamfield__related-posts mb-spacerMedium lg:mb-spacerLarge"> | ||
{% for blog_page in value.blog_pages %} | ||
{% pageurl blog_page.blog_index as blog_index_url %} | ||
{% pageurl blog_page as blog_post_url %} | ||
{% include "patterns/molecules/listing/listing--avatar.html" with title=blog_page.title name=blog_page.first_author.name job_title=blog_page.first_author.role link=blog_post_url date=blog_page.date reading_time=blog_page.read_time tags=blog_page.tags avatar=blog_page.first_author.image tag_link_base=blog_index_url %} | ||
{% endfor %} | ||
</ul> | ||
|
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.
Suggestion(non-blocking): What do you think about adding a small comment here, along the lines of
{# We expect only 1 button (`max_num=1` in block definition) #} |
{% for button in value.primary_button %} | ||
<a href="{{ button.value.url }}">{{ button.value.text }}</a> | ||
{% endfor %} | ||
|
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.
Suggestion(non-blocking): ditto
{# We expect only 1 button (`max_num=1` in block definition) #} |
Link to Ticket
Description of Changes Made
This PR introduces an
intro
rich text field, aprimary_button
, and asecondary_button
to the blog chooser block and the work chooser block.Additionally, it introduces a
primary_button
andsecondary_button
to both blocks.How to Test
Screenshots
Page editor
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library