Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
ISAICP-6765: Rename image style and fix text style.
Browse files Browse the repository at this point in the history
  • Loading branch information
saidatom committed Oct 27, 2021
1 parent a2fc0da commit 52e2f0d
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ dependencies:
- field.field.node.document.field_type
- field.field.node.document.og_audience
- node.type.document
- responsive_image.styles.highlighted_solution
- responsive_image.styles.highlighted_content
module:
- field_delimiter
- field_formatter_range
- field_group
- joinup_html_stripper
- layout_builder
- responsive_image
- template_suggestion
- text
- user
third_party_settings:
field_group:
group_categorisation:
children:
- field_short_title
- field_type
- field_document_publication_date
- field_licence
- field_short_title
- field_type
parent_name: ''
weight: 5
format_type: html_element
Expand Down Expand Up @@ -81,7 +81,7 @@ mode: highlighted
content:
body:
label: hidden
type: text_trimmed
type: joinup_html_stripper_stripped
weight: 2
settings:
trim_length: 200
Expand All @@ -95,7 +95,7 @@ content:
region: content
label: hidden
settings:
responsive_image_style: highlighted_solution
responsive_image_style: highlighted_content
image_link: ''
third_party_settings:
template_suggestion:
Expand Down
19 changes: 4 additions & 15 deletions config/sync/core.entity_view_display.node.event.highlighted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ dependencies:
- field.field.node.event.field_topic
- field.field.node.event.og_audience
- node.type.event
- responsive_image.styles.highlighted_solution
- responsive_image.styles.highlighted_content
module:
- field_delimiter
- field_formatter_range
- joinup_html_stripper
- layout_builder
- responsive_image
- smart_trim
- template_suggestion
- user
third_party_settings:
Expand All @@ -46,23 +46,12 @@ bundle: event
mode: highlighted
content:
body:
type: smart_trim
type: joinup_html_stripper_stripped
weight: 2
region: content
label: hidden
settings:
trim_length: 200
trim_type: chars
trim_suffix: ''
wrap_class: trimmed
more_text: More
more_class: more-link
summary_handler: full
wrap_output: false
more_link: false
trim_options:
text: false
trim_zero: false
third_party_settings:
template_suggestion:
template_suggestion: ''
Expand All @@ -72,7 +61,7 @@ content:
region: content
label: hidden
settings:
responsive_image_style: highlighted_solution
responsive_image_style: highlighted_content
image_link: ''
third_party_settings:
template_suggestion:
Expand Down
19 changes: 4 additions & 15 deletions config/sync/core.entity_view_display.node.news.highlighted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ dependencies:
- field.field.node.news.field_topic
- field.field.node.news.og_audience
- node.type.news
- responsive_image.styles.highlighted_solution
- responsive_image.styles.highlighted_content
module:
- field_delimiter
- field_formatter_range
- field_group
- joinup_html_stripper
- layout_builder
- responsive_image
- smart_trim
- template_suggestion
- user
third_party_settings:
Expand Down Expand Up @@ -58,21 +58,10 @@ mode: highlighted
content:
body:
label: hidden
type: smart_trim
type: joinup_html_stripper_stripped
weight: 2
settings:
trim_length: 200
trim_type: chars
trim_suffix: ''
wrap_class: trimmed
more_text: More
more_class: more-link
summary_handler: full
wrap_output: false
more_link: false
trim_options:
text: false
trim_zero: false
third_party_settings:
template_suggestion:
template_suggestion: ''
Expand All @@ -83,7 +72,7 @@ content:
region: content
label: hidden
settings:
responsive_image_style: highlighted_solution
responsive_image_style: highlighted_content
image_link: content
third_party_settings:
template_suggestion:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies:
- field.field.rdf_entity.solution.field_status
- field.field.rdf_entity.solution.field_topic
- rdf_entity.rdfentity.solution
- responsive_image.styles.highlighted_solution
- responsive_image.styles.highlighted_content
module:
- field_delimiter
- field_formatter_range
Expand Down Expand Up @@ -109,7 +109,7 @@ content:
region: content
label: hidden
settings:
responsive_image_style: highlighted_solution
responsive_image_style: highlighted_content
image_link: content
third_party_settings:
template_suggestion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ dependencies:
- image.style.xxl_col_5_2x
theme:
- ventuno
id: highlighted_solution
label: 'Highlighted solution'
id: highlighted_content
label: 'Highlighted content'
image_style_mappings:
-
breakpoint_id: ventuno.xl
Expand Down
1 change: 0 additions & 1 deletion config/sync/user.role.moderator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ permissions:
- 'update discover_topics entityqueue'
- 'update highlighted_content entityqueue'
- 'update highlighted_event entityqueue'
- 'update highlighted_solution entityqueue'
- 'update paragraph content iframe'
- 'update paragraph content json_map'
- 'update site alerts'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
{% endif %}
{{ title_suffix }}
{% block content %}
{{ related_content }}
{% if related_content %}
{{ related_content }}
{% endif %}
{{ content }}
{% endblock %}
</div>
38 changes: 20 additions & 18 deletions web/themes/ventuno/ventuno.theme
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use Drupal\joinup_bundle_class\LogoInterface;
use Drupal\joinup_collection\JoinupCollectionHelper;
use Drupal\rdf_entity\Entity\Rdf;
use Drupal\smart_trim\Truncate\TruncateHTML;
use Drupal\topic\Entity\TopicReferencingEntityInterface;

/**
* Implements hook_theme_suggestions_HOOK_alter().
Expand Down Expand Up @@ -147,26 +148,27 @@ function ventuno_preprocess_block(&$variables) {
/** @var \Drupal\node\NodeInterface $node */
$node = $variables['elements']['content']['entities'][0]['#node'];

$topics = $node->get('field_topic')->getValue();

$options = [
'query' =>
[
'f' =>
$topics = $node instanceof TopicReferencingEntityInterface ? $node->getTopics() : [];
if ($topics) {
$options = [
'query' =>
[
'type:' . $node->bundle(),
'topic:' . reset($topics)["target_id"],
'f' =>
[
'type:' . $node->bundle(),
'topic:' . reset($topics)["target_id"],
],
],
];
$variables['related_content'] = [
'#type' => 'link',
'#title' => t('Related content'),
'#url' => Url::fromRoute('view.search.page_1', [], $options),
'#attributes' => [
'class' => ['more-link'],
],
],
];
$variables['related_content'] = [
'#type' => 'link',
'#title' => t('Related content'),
'#url' => Url::fromRoute('view.search.page_1', [], $options),
'#attributes' => [
'class' => ['more-link'],
],
];
];
}
}
}
}
Expand Down

0 comments on commit 52e2f0d

Please sign in to comment.