From ba503a97cb426079e52d797e9e5066bcceffe7c7 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sat, 26 Dec 2020 13:28:35 +0100 Subject: [PATCH] added btn class for home btn, added linkint profile in wysiwyg --- config/sync/editor.editor.wysiwyg.yml | 16 ++++++- config/sync/filter.format.wysiwyg.yml | 2 +- config/sync/linkit.linkit_profile.default.yml | 43 +++++++++++++++++++ .../custom/materiotheme/assets/dist/main.css | 21 ++++++++- .../assets/styles/base/_fonts.scss | 10 +++++ .../assets/styles/base/_reset.scss | 2 +- .../materiotheme/assets/styles/main.scss | 15 ++++++- 7 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 config/sync/linkit.linkit_profile.default.yml diff --git a/config/sync/editor.editor.wysiwyg.yml b/config/sync/editor.editor.wysiwyg.yml index 9c82c613..8ed9325a 100644 --- a/config/sync/editor.editor.wysiwyg.yml +++ b/config/sync/editor.editor.wysiwyg.yml @@ -21,10 +21,15 @@ settings: - Bold - Italic - Underline + - + name: misc + items: + - SpecialChar - name: Liens items: - DrupalLink + - Linkit - DrupalUnlink - name: Listes @@ -49,12 +54,19 @@ settings: - PasteText - PasteFromWord plugins: - drupallink: - linkit_enabled: true stylescombo: styles: h4.inter-titre|Inter-titre language: language_list: un + linkit: + linkit_profile: default + video_embed: + defaults: + children: + autoplay: true + responsive: true + width: '854' + height: '480' image_upload: status: true scheme: public diff --git a/config/sync/filter.format.wysiwyg.yml b/config/sync/filter.format.wysiwyg.yml index 8cfefdeb..1721c5e3 100644 --- a/config/sync/filter.format.wysiwyg.yml +++ b/config/sync/filter.format.wysiwyg.yml @@ -77,5 +77,5 @@ filters: settings: youtube: '1' youtube_webp_preview: '0' - autoload: '0' vimeo: '1' + autoload: '0' diff --git a/config/sync/linkit.linkit_profile.default.yml b/config/sync/linkit.linkit_profile.default.yml new file mode 100644 index 00000000..c707e251 --- /dev/null +++ b/config/sync/linkit.linkit_profile.default.yml @@ -0,0 +1,43 @@ +uuid: 7ef4e38a-7202-4e5f-ab8f-cbd0e20b8e03 +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: default +label: default +description: '' +attributes: { } +matchers: + d0dae55a-e60c-4b50-8489-511082d33286: + uuid: d0dae55a-e60c-4b50-8489-511082d33286 + id: 'entity:menu_link_content' + weight: 0 + settings: + result_description: '' + bundles: { } + group_by_bundle: false + 06fa6ab9-a594-4dc1-97b0-2c0c1b157db9: + uuid: 06fa6ab9-a594-4dc1-97b0-2c0c1b157db9 + id: 'entity:node' + weight: 0 + settings: + result_description: '' + bundles: + article: article + materiau: materiau + simplenews_issue: simplenews_issue + thematique: thematique + group_by_bundle: false + include_unpublished: false + 7e4086d4-4fe3-450a-8e33-ac95a8e7a07d: + uuid: 7e4086d4-4fe3-450a-8e33-ac95a8e7a07d + id: 'entity:taxonomy_term' + weight: 0 + settings: + result_description: '' + bundles: + company: company + showroom: showroom + group_by_bundle: false diff --git a/web/themes/custom/materiotheme/assets/dist/main.css b/web/themes/custom/materiotheme/assets/dist/main.css index 0f47c22c..98bc87e7 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.css +++ b/web/themes/custom/materiotheme/assets/dist/main.css @@ -101,7 +101,7 @@ h1, h2, h3, h4, h5, h6 { p a { position: relative; } - p a:after { + p a:not(.btn):after { content: ''; position: absolute; top: 1em; @@ -1204,6 +1204,16 @@ body { font-style: normal; line-height: 1.3; } +a.btn { + display: inline-block; + font-size: 0.9em; + font-weight: bold; + padding: 0.7em 1em; + margin-bottom: 0.3em; + background-color: #fff; + color: #000; + border-radius: 5px; } + aside.messages { border: none; } @@ -1523,8 +1533,14 @@ article.node--type-frontpage .node__content > section.home-database, article.nod article.node--type-frontpage .node__content > section.home-database > div:nth-child(2), article.node--type-frontpage .node__content > section.home-showrooms > div:nth-child(2), article.node--type-frontpage .node__content > section.home-blabla > div:nth-child(2) { grid-column: 2; } +article.node--type-frontpage > h2 { + display: none; } + article.node--type-frontpage .node__content > section.home-database { background-color: #69cdcf; } + article.node--type-frontpage .node__content > section.home-database .field--name-field-a-database a.btn { + background-color: #fff; + color: #69cdcf; } article.node--type-frontpage .node__content > section.home-database .cards-list-home { position: relative; max-height: 580px; @@ -1558,6 +1574,9 @@ article.node--type-frontpage .node__content > section.home-database { article.node--type-frontpage .node__content > section.home-showrooms { background-color: #50aa3c; } + article.node--type-frontpage .node__content > section.home-showrooms .field--name-field-showrooms a.btn { + background-color: #fff; + color: #50aa3c; } article.node--type-frontpage .node__content > section.home-showrooms .field--name-computed-showrooms-reference { position: relative; display: grid; diff --git a/web/themes/custom/materiotheme/assets/styles/base/_fonts.scss b/web/themes/custom/materiotheme/assets/styles/base/_fonts.scss index c1bc126c..48c9dcbd 100644 --- a/web/themes/custom/materiotheme/assets/styles/base/_fonts.scss +++ b/web/themes/custom/materiotheme/assets/styles/base/_fonts.scss @@ -5,3 +5,13 @@ body{ font-style: normal; line-height: 1.3; } +a.btn{ + display: inline-block; + font-size: 0.9em; + font-weight: bold; + padding: 0.7em 1em; + margin-bottom: 0.3em; + background-color: #fff; + color: #000; + border-radius: 5px; +} diff --git a/web/themes/custom/materiotheme/assets/styles/base/_reset.scss b/web/themes/custom/materiotheme/assets/styles/base/_reset.scss index 1052a7a1..ccd79b48 100644 --- a/web/themes/custom/materiotheme/assets/styles/base/_reset.scss +++ b/web/themes/custom/materiotheme/assets/styles/base/_reset.scss @@ -25,7 +25,7 @@ h1,h2,h3,h4,h5,h6{ p a{ position: relative; - &:after{ + &:not(.btn):after{ content:''; position: absolute; top:1em; left:0; diff --git a/web/themes/custom/materiotheme/assets/styles/main.scss b/web/themes/custom/materiotheme/assets/styles/main.scss index c9b0d540..d9576166 100644 --- a/web/themes/custom/materiotheme/assets/styles/main.scss +++ b/web/themes/custom/materiotheme/assets/styles/main.scss @@ -530,6 +530,10 @@ article.node--type-frontpage{ } } + >h2{ + display: none; + } + .node__content{ &>section{ @@ -539,7 +543,12 @@ article.node--type-frontpage{ &.home-database{ background-color: $color-base; @extend %part-columned-layout; - .field--name-field-a-database{} + .field--name-field-a-database{ + a.btn{ + background-color: #fff; + color: $color-base; + } + } .cards-list-home{ position: relative; // max-height: (130px*1.4)*3; @@ -577,6 +586,10 @@ article.node--type-frontpage{ background-color: $color-showrooms; @extend %part-columned-layout; .field--name-field-showrooms{ + a.btn{ + background-color: #fff; + color: $color-showrooms; + } } .field--name-computed-showrooms-reference{ position:relative;