-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #656 from City-of-Helsinki/UHF-9963
UHF-9963: You might be interested in blocks new design
- Loading branch information
Showing
19 changed files
with
114 additions
and
85 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
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
30 changes: 1 addition & 29 deletions
30
public/modules/custom/helfi_annif/templates/recommendations-block.html.twig
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,31 +1,3 @@ | ||
{% for row in rows %} | ||
{# Created date and modified date #} | ||
{% set published_at = row.published_at.value %} | ||
{% if published_at is not empty %} | ||
{% set html_published_at %} | ||
<time datetime="{{ published_at|format_date('custom', 'Y-m-d') ~ 'T' ~ published_at|format_date('custom', 'H:i') }}" class="news-listing__datetime news-listing__datetime--published" {{ alternative_language ? create_attribute(({ 'lang': lang_attributes.fallback_lang, 'dir': lang_attributes.fallback_dir })) }}> | ||
<span class="visually-hidden">{{ 'Published'|t({}, {'context': 'The helper text before the node published timestamp'}) }}</span> | ||
{{ published_at|format_date('publication_date_format') }} | ||
</time> | ||
{% endset %} | ||
{% else %} | ||
{% set html_published_at = '-' %} | ||
{% endif %} | ||
|
||
{% set card_url = url('entity.node.canonical', {'node': row.id})['#markup'] %} | ||
|
||
{% embed '@hdbt/component/card.twig' with { | ||
card_modifier_class: 'news-listing__item', | ||
card_title_level: 'h3', | ||
card_title: row.title.value, | ||
card_url: card_url, | ||
card_metas: [ | ||
{ | ||
icon: 'clock', | ||
label: 'Published'|t({}, {'context': 'Label for news card published time'}), | ||
content: html_published_at | ||
}, | ||
], | ||
} %} | ||
{% endembed %} | ||
{{ row }} | ||
{% endfor %} |
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,6 @@ | ||
msgid "" | ||
msgstr "" | ||
|
||
msgctxt "Recommendations block title" | ||
msgid "You might be interested in" | ||
msgstr "Sinua voisi kiinnostaa" |
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,6 @@ | ||
msgid "" | ||
msgstr "" | ||
|
||
msgctxt "Recommendations block title" | ||
msgid "You might be interested in" | ||
msgstr "Du kanske är intresserad av" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.