Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 2d04bc43 authored by Gilmar Lima's avatar Gilmar Lima
Browse files

OEL-1017: Improve template semantics, remove unused variables and general improvements.

parent 7f6ac390
No related branches found
No related tags found
1 merge request!68OEL-1017: [oe_whitelabel] Style the news content type
......@@ -4,20 +4,22 @@
* News full display.
*/
#}
{{ pattern('content_banner', {
background: 'gray',
title: label,
content: content.oe_summary,
image: image,
meta: [
content.oe_publication_date|render|striptags,
],
badges: badges|render|default([])
}) }}
<div class="container mt-md-4-75 mt-4">
<div class="row">
<div class="col-12 col-lg-10 col-xl-9 col-xxl-8">
{{ content.body }}
<article{{attributes}}>
{{ pattern('content_banner', {
background: 'gray',
title: label,
content: content.oe_summary,
image: image,
meta: [
content.oe_publication_date|render|striptags,
]
}) }}
<div class="container mt-md-4-75 mt-4">
<div class="row">
<div class="col-12 col-lg-10 col-xl-9 col-xxl-8 mb-4">
{{ content.body }}
</div>
</div>
</div>
</div>
</article>
......@@ -7,18 +7,20 @@
{% set _title %}
<a class="text-underline-hover" href="{{ url }}">{{ label }}</a>
{% endset %}
{{ pattern('card', {
variant: 'search',
title: _title,
text: content.oe_summary,
image: image,
content: {
'#type': 'html_tag',
'#tag': 'span',
'#attributes': {
class: 'text-muted text-nowrap me-4-5',
},
'#value': content.oe_publication_date|render|striptags,
{% set _content = {
'#type': 'html_tag',
'#tag': 'span',
'#attributes': {
class: 'text-muted text-nowrap me-4-5',
},
badges: badges|render|default([])
}) }}
'#value': content.oe_publication_date|render|striptags,
}%}
<article{{attributes}}>
{{ pattern('card', {
variant: 'search',
title: _title,
text: content.oe_summary,
image: image,
content: _content
}) }}
</article>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment