-
Notifications
You must be signed in to change notification settings - Fork 32
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
[EWPP-1360] EWPP-1363: Style Sources field in full view mode. #903
Conversation
<h2 class="ecl-u-type-heading-2">{{ 'Sources'|t }}</h2> | ||
<div class="ecl-list"> | ||
{% for item in items %} | ||
<article class="ecl-content-item ecl-u-d-s-flex ecl-u-pb-m"> | ||
<div class="ecl-u-flex-grow-1"> | ||
<div class="ecl-content-item__title ecl-u-type-heading-5 ecl-u-mb-xs ecl-u-mt-none"> | ||
{%- if item.content['#url'] %} | ||
{% include '@ecl-twig/link' with { | ||
link: { | ||
type: 'standalone', | ||
icon_position: 'after', | ||
label: item.content['#title'], | ||
path: item.content['#url'] | ||
}, | ||
icon: { | ||
name: 'external', | ||
size: 's', | ||
path: ecl_icon_path | ||
} | ||
} %} | ||
{% else %} | ||
{{ item.content['#title'] }} | ||
{%- endif -%} | ||
</div> | ||
</div> | ||
</article> | ||
{% endfor %} | ||
</div> |
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.
Looks like it would be more suitable to reuse the list_item
pattern like we did for related_links field.
See \oe_theme_preprocess_field function inside oe_theme.theme.
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.
Unfortunately, we can't, for now, use the list_item
pattern according to fact that we can't control the link's icon. I think it would be the more preferable solution anyway to use a pattern but with additional parameter for controlling the link's type (for adding external icon if needed).
I suppose it can be impelmented in follow-up ticket.
EWPP-1363
Description
Style Sources field in full view mode.
Change log