-
-
-
+
diff --git a/blocks/vocabulaire-summary/build/style-index.css b/blocks/vocabulaire-summary/build/style-index.css
index 8befdfd..2488c9e 100644
--- a/blocks/vocabulaire-summary/build/style-index.css
+++ b/blocks/vocabulaire-summary/build/style-index.css
@@ -1,57 +1,4 @@
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!
\***************************************************************************************************************************************************************************************************************************************/
-/**
- * The following styles get applied both on the front of your site
- * and in the editor.
- *
- * Replace them with your own styles or remove the file completely.
- */
-.homegrade-blocks-vocabulaire-summary {
- padding: 20px;
-}
-.homegrade-blocks-vocabulaire-summary details {
- cursor: pointer;
- padding: 20px;
- background-color: white;
-}
-.homegrade-blocks-vocabulaire-summary details[open] summary .open-close-icon {
- transform: translate(0, -50%) rotate(180deg);
-}
-.homegrade-blocks-vocabulaire-summary summary {
- cursor: pointer;
- position: relative;
- margin: 0;
- font-weight: bold;
-}
-.homegrade-blocks-vocabulaire-summary summary::marker {
- content: none;
-}
-.homegrade-blocks-vocabulaire-summary summary .open-close-icon {
- transition: transform 0.3s ease-in-out;
- right: 20px;
- top: 50%;
- transform: translate(0, -50%);
- position: absolute;
- display: flex;
- border: 2px solid black;
- justify-content: center;
- align-items: center;
- border-radius: 50%;
- height: 26px;
- width: 26px;
-}
-.homegrade-blocks-vocabulaire-summary__title {
- margin: 0;
- padding-bottom: 20px;
-}
-.homegrade-blocks-vocabulaire-summary__content {
- padding-top: 30px;
-}
-.homegrade-blocks-vocabulaire-summary__content-wrapper {
- overflow: hidden;
- height: 0;
- transition: height 0.3s ease-in-out;
-}
-/*# sourceMappingURL=style-index.css.map*/
\ No newline at end of file
diff --git a/blocks/vocabulaire-summary/build/style-index.css.map b/blocks/vocabulaire-summary/build/style-index.css.map
index ed4985e..f3dd332 100644
--- a/blocks/vocabulaire-summary/build/style-index.css.map
+++ b/blocks/vocabulaire-summary/build/style-index.css.map
@@ -1 +1 @@
-{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;AAAD;AACC;EACC;EACA;EACA;AACF;AACC;EACC;AACF;AACC;EACC;EACA;EACA;EACA;AACF;AAAE;EACC;AAEH;AAAE;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACH;AAEC;EACC;EACA;AAAF;AAEC;EACC;AAAF;AAEC;EACC;EACA;EACA;AAAF,C","sources":["webpack://vocabulaire-summary/./src/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.homegrade-blocks-vocabulaire-summary {\n\tpadding: 20px;\n\tdetails {\n\t\tcursor: pointer;\n\t\tpadding: 20px;\n\t\tbackground-color: white;\n\t}\n\tdetails[open] summary .open-close-icon {\n\t\ttransform: translate(0, -50%) rotate(180deg);\n\t}\n\tsummary {\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tmargin: 0;\n\t\tfont-weight: bold;\n\t\t&::marker {\n\t\t\tcontent: none;\n\t\t}\n\t\t.open-close-icon {\n\t\t\t// transform-origin: center center;\n\t\t\ttransition: transform 0.3s ease-in-out;\n\t\t\tright: 20px;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(0, -50%);\n\t\t\tposition: absolute;\n\t\t\tdisplay: flex;\n\t\t\tborder: 2px solid black;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tborder-radius: 50%;\n\t\t\theight: 26px;\n\t\t\twidth: 26px;\n\t\t}\n\t}\n\t&__title {\n\t\tmargin: 0;\n\t\tpadding-bottom: 20px;\n\t}\n\t&__content {\n\t\tpadding-top: 30px;\n\t}\n\t&__content-wrapper {\n\t\toverflow: hidden;\n\t\theight: 0;\n\t\ttransition: height 0.3s ease-in-out;\n\t}\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"./style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;AAAD;AACC;EACC;EACA;EACA;AACF;AACC;EACC;AACF;AACC;EACC;EACA;EACA;EACA;AACF;AAAE;EACC;AAEH;AAAE;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACH;AAEC;EACC;EACA;AAAF;AAEC;EACC;AAAF;AAEC;EACC;EACA;AAAF,C","sources":["webpack://vocabulaire-summary/./src/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.homegrade-blocks-vocabulaire-summary {\n\tpadding: 20px;\n\tdetails {\n\t\tcursor: pointer;\n\t\tpadding: 20px;\n\t\tbackground-color: white;\n\t}\n\tdetails[open] summary .open-close-icon {\n\t\ttransform: translate(0, -50%) rotate(180deg);\n\t}\n\tsummary {\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tmargin: 0;\n\t\tfont-weight: bold;\n\t\t&::marker {\n\t\t\tcontent: none;\n\t\t}\n\t\t.open-close-icon {\n\t\t\t// transform-origin: center center;\n\t\t\ttransition: transform 0.3s ease-in-out;\n\t\t\tright: 20px;\n\t\t\ttop: 50%;\n\t\t\ttransform: translate(0, -50%);\n\t\t\tposition: absolute;\n\t\t\tdisplay: flex;\n\t\t\tborder: 2px solid black;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\tborder-radius: 50%;\n\t\t\theight: 26px;\n\t\t\twidth: 26px;\n\t\t}\n\t}\n\t&__title {\n\t\tmargin: 0;\n\t\tpadding-bottom: 20px;\n\t}\n\t&__content {\n\t\tpadding-top: 30px;\n\t}\n\t&__content-wrapper {\n\t\toverflow: hidden;\n\t\ttransition: height 0.3s ease-in-out;\n\t}\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/blocks/vocabulaire-summary/src/block.json b/blocks/vocabulaire-summary/src/block.json
index b4a77df..744739a 100644
--- a/blocks/vocabulaire-summary/src/block.json
+++ b/blocks/vocabulaire-summary/src/block.json
@@ -16,7 +16,6 @@
},
"textdomain": "homegrade-blocks",
"editorScript": "file:./index.js",
- "viewScript": "file:./frontend.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php",
diff --git a/blocks/vocabulaire-summary/src/edit.js b/blocks/vocabulaire-summary/src/edit.js
index c4fb0e5..3a64228 100644
--- a/blocks/vocabulaire-summary/src/edit.js
+++ b/blocks/vocabulaire-summary/src/edit.js
@@ -182,10 +182,12 @@ export default function Edit({ attributes, setAttributes }) {
-
-
- {elem.tooltipDefinition}
-
+
+
+
+ {elem.tooltipDefinition}
+
+
))}
diff --git a/blocks/vocabulaire-summary/src/frontend.js b/blocks/vocabulaire-summary/src/frontend.js
deleted file mode 100644
index c2e83c3..0000000
--- a/blocks/vocabulaire-summary/src/frontend.js
+++ /dev/null
@@ -1,57 +0,0 @@
-window.addEventListener("DOMContentLoaded", (event) => {
- // GETTING ELEMENTS FROM THE DOM
- const vocabulaireSummary = document.querySelector(
- ".homegrade-blocks-vocabulaire-summary"
- );
- const wordsDetails = vocabulaireSummary.querySelectorAll("details");
-
- function openAccordion(wordDetail) {
- let contentDefinitionWrapper = wordDetail.querySelector(
- ".homegrade-blocks-vocabulaire-summary__content-wrapper"
- );
- let contentDefinitionParagraph = wordDetail.querySelector(
- ".homegrade-blocks-vocabulaire-summary__content"
- );
- wordDetail.setAttribute("open", "true");
- wordDetail.setAttribute("is_opening", "");
-
- contentDefinitionWrapper.style.height =
- contentDefinitionParagraph.offsetHeight + "px";
- // remove is opening after css transition
-
- wordDetail.addEventListener("transitionend", () => {
- wordDetail.removeAttribute("is_opening");
- });
- }
- function closeAccordion(wordDetail) {
- let contentDefinitionWrapper = wordDetail.querySelector(
- ".homegrade-blocks-vocabulaire-summary__content-wrapper"
- );
-
- contentDefinitionWrapper.style.height = "0px";
-
- setTimeout(() => {
- wordDetail.removeAttribute("open");
- }, 300);
- }
- // HANDLING CLICK
- function toggleActive(wordDetail) {
- let isOpen = wordDetail.getAttribute("open");
- let isOpening = wordDetail.getAttribute("is_opening");
-
- if (isOpen == null && isOpening == null) {
- openAccordion(wordDetail);
- }
- if (isOpen == "true") {
- closeAccordion(wordDetail);
- }
- }
-
- // HANDLING CLICK
- Array.from(wordsDetails).forEach((wordDetail) => {
- wordDetail.addEventListener("click", (event) => {
- event.preventDefault();
- toggleActive(wordDetail);
- });
- });
-});
diff --git a/blocks/vocabulaire-summary/src/render.php b/blocks/vocabulaire-summary/src/render.php
index 36c752c..1700aa2 100644
--- a/blocks/vocabulaire-summary/src/render.php
+++ b/blocks/vocabulaire-summary/src/render.php
@@ -21,17 +21,19 @@ $thematique = get_the_terms($post->ID, 'thematiques')[0];
-
+
-
-
-
-
+
diff --git a/blocks/vocabulaire-summary/src/style.scss b/blocks/vocabulaire-summary/src/style.scss
index ca08871..e16fa9a 100644
--- a/blocks/vocabulaire-summary/src/style.scss
+++ b/blocks/vocabulaire-summary/src/style.scss
@@ -1,54 +1,47 @@
-/**
- * The following styles get applied both on the front of your site
- * and in the editor.
- *
- * Replace them with your own styles or remove the file completely.
- */
+// /**
+// * The following styles get applied both on the front of your site
+// * and in the editor.
+// *
+// * Replace them with your own styles or remove the file completely.
+// */
-.homegrade-blocks-vocabulaire-summary {
- padding: 20px;
- details {
- cursor: pointer;
- padding: 20px;
- background-color: white;
- }
- details[open] summary .open-close-icon {
- transform: translate(0, -50%) rotate(180deg);
- }
- summary {
- cursor: pointer;
- position: relative;
- margin: 0;
- font-weight: bold;
- &::marker {
- content: none;
- }
- .open-close-icon {
- // transform-origin: center center;
- transition: transform 0.3s ease-in-out;
- right: 20px;
- top: 50%;
- transform: translate(0, -50%);
- position: absolute;
- display: flex;
- border: 2px solid black;
- justify-content: center;
- align-items: center;
- border-radius: 50%;
- height: 26px;
- width: 26px;
- }
- }
- &__title {
- margin: 0;
- padding-bottom: 20px;
- }
- &__content {
- padding-top: 30px;
- }
- &__content-wrapper {
- overflow: hidden;
- height: 0;
- transition: height 0.3s ease-in-out;
- }
-}
+// .homegrade-blocks-vocabulaire-summary {
+// padding: 20px;
+// details {
+// cursor: pointer;
+// padding: 20px;
+// background-color: white;
+// }
+// details[open] summary .open-close-icon {
+// transform: translate(0, -50%) rotate(180deg);
+// }
+// summary {
+// cursor: pointer;
+// position: relative;
+// margin: 0;
+// font-weight: bold;
+// &::marker {
+// content: none;
+// }
+// .open-close-icon {
+// // transform-origin: center center;
+// transition: transform 0.3s ease-in-out;
+// right: 20px;
+// top: 50%;
+// transform: translate(0, -50%);
+// position: absolute;
+// display: flex;
+// border: 2px solid black;
+// justify-content: center;
+// align-items: center;
+// border-radius: 50%;
+// height: 26px;
+// width: 26px;
+// }
+// }
+// &__title {
+// margin: 0;
+// padding-bottom: 20px;
+// }
+
+// }