Skip to content
Snippets Groups Projects
Commit b68fd18f authored by Joachim Valdemar Yde's avatar Joachim Valdemar Yde
Browse files

Update deprecated 'replace' function in .twig

parent 411d9754
Branches dev
No related tags found
1 merge request!109Update deprecated 'replace' function in .twig
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.7.14] - 30/21/2021
- Update deprecated `replace` function in `.twig`
## [2.7.13] - 8/02/2021 ## [2.7.13] - 8/02/2021
- Remove deprecated functions of D9 (module passes d9-readiness scan) - Remove deprecated functions of D9 (module passes d9-readiness scan)
## [2.7.12] - 8/02/2021 ## [2.7.12] - 8/02/2021
- Add core: 8.x to fix enabling issue - Add core: 8.x to fix enabling issue
## [2.7.11] - 14/01/2021 ## [2.7.11] - 14/01/2021
- Modify composer to require Components 2.x for D9 - Modify composer to require Components 2.x for D9
## [2.7.10] - 14/01/2021 ## [2.7.10] - 14/01/2021
- Update module to be D9-ready - Update module to be D9-ready
## [2.7.9] - 12/01/2021 ## [2.7.9] - 12/01/2021
...@@ -109,13 +118,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -109,13 +118,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issue of mega menu not working on specific versions of IE - Fixed issue of mega menu not working on specific versions of IE
## [2.5.0] - 25/04/2019 ## [2.5.0] - 25/04/2019
- Fixed issue of plus/minus signs in FAQ-list pattern - Fixed issue of plus/minus signs in FAQ-list pattern
- Fixed issue of active trail in 2nd level menu - Fixed issue of active trail in 2nd level menu
## [2.4.0] - 26/02/2019 ## [2.4.0] - 26/02/2019
- Fixed issue of Preview Card styling not loading on Preview List - Fixed issue of Preview Card styling not loading on Preview List
...@@ -124,14 +131,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -124,14 +131,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added text-shadow on Preview Cards' elements - Added text-shadow on Preview Cards' elements
- Removed top margin from Preview List component - Removed top margin from Preview List component
## [2.3.2] - 31/01/2019 ## [2.3.2] - 31/01/2019
- Fixed issue of video resources are displayed very slim - Fixed issue of video resources are displayed very slim
## [2.3.1] - 30/01/2019 ## [2.3.1] - 30/01/2019
- Decreased the number of permitted chars for Preview cards from 65 to 45 - Decreased the number of permitted chars for Preview cards from 65 to 45
## [2.3.0] - 21/01/2019 ## [2.3.0] - 21/01/2019
...@@ -139,7 +145,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -139,7 +145,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed issue og Preview cards overflowing under mega menu - Fixed issue og Preview cards overflowing under mega menu
- Added text shadow for Hero Frames titles and subtitles - Added text shadow for Hero Frames titles and subtitles
## [2.2.2] - 16/01/2019 ## [2.2.2] - 16/01/2019
- Fixed overflowing text in Preview Cards when the card had icon - Fixed overflowing text in Preview Cards when the card had icon
...@@ -148,7 +153,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -148,7 +153,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added styling for "+More" link in mega menu - Added styling for "+More" link in mega menu
## [2.2.0] - 06/12/2018 ## [2.2.0] - 06/12/2018
- Fixed FAQ List pattern not holding 100% of the width - Fixed FAQ List pattern not holding 100% of the width
...@@ -159,4 +163,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -159,4 +163,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added new twig function that returns current language - Added new twig function that returns current language
- Changed design of FAQ List pattern - Changed design of FAQ List pattern
- Removed avatar from "opinion" pieces - Removed avatar from "opinion" pieces
...@@ -3,7 +3,7 @@ type: module ...@@ -3,7 +3,7 @@ type: module
description: "Provides all the necessary modules regarding CERN Web Components." description: "Provides all the necessary modules regarding CERN Web Components."
core: 8.x core: 8.x
core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9
version: 2.7.13 version: 2.7.14
package: CERN Components package: CERN Components
dependencies: dependencies:
- components:components (>=8.x-1.1-alpha1) - components:components (>=8.x-1.1-alpha1)
......
{ {
"name": "drupal/cern-components", "name": "drupal/cern-components",
"description": "Defines a set of re-usable patterns for the CERN Drupal infrastructure", "description": "Defines a set of re-usable patterns for the CERN Drupal infrastructure",
"version": "2.7.13", "version": "2.7.14",
"type": "drupal-custom-module", "type": "drupal-custom-module",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
"authors": [ "authors": [
{ {
"name": "Konstantinos Platis", "name": "Joachim Valdemar Yde",
"email": "konstantinos.platis@cern.ch" "email": "joachim.git@cern.ch"
} },
], {
"repositories": [ "name": "Konstantinos Platis",
{ "email": "konstantinos.platis@cern.ch"
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "vcs",
"url": "https://gitlab.cern.ch/web-team/drupal/public/d8/modules/cern-full-html-format"
}
],
"require": {
"drupal/components": "^2.0",
"drupal/ui_patterns": "^1.2",
"drupal/cern-full-html-format": "^2.0.2",
"drupal/twig_tweak": "^2.8",
"drupal/ds": "^3.9",
"drupal/field_group": "^3.1"
} }
],
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},
{
"type": "vcs",
"url": "https://gitlab.cern.ch/web-team/drupal/public/d8/modules/cern-full-html-format"
}
],
"require": {
"drupal/components": "^2.0",
"drupal/ui_patterns": "^1.2",
"drupal/cern-full-html-format": "^2.0.2",
"drupal/twig_tweak": "^2.8",
"drupal/ds": "^3.9",
"drupal/field_group": "^3.1"
}
} }
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
{# If the section has a title => add title as ID attribute separated with hyphens #} {# If the section has a title => add title as ID attribute separated with hyphens #}
{% if variants.show_title.value == 1 %} {% if variants.show_title.value == 1 %}
<div{{ attributes.setAttribute('id', title|render|lower|replace(' ', '-')) }}> <div{{ attributes.setAttribute('id', title | render | lower | replace({' ': '-'})) }}>
{% else %} {% else %}
<div{{ attributes }}> <div{{ attributes }}>
{% endif %} {% endif %}
......
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