diff --git a/__attachment.php b/__attachment.php new file mode 100644 index 0000000..66dc5d4 --- /dev/null +++ b/__attachment.php @@ -0,0 +1 @@ +
'; + write_log($post); + echo ''; + $thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; $thematiqueParent = getParentThematique($thematique); - $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug); + $thematiqueColorSlug = getThematiqueFamilySlug($thematiqueParent->slug) ?? null; if (in_array($pagenow, array('post.php', 'post-new.php'), true) && $thematiqueColorSlug) { diff --git a/includes/post_types.php b/includes/post_types.php index f1bebb8..6dd6a9c 100644 --- a/includes/post_types.php +++ b/includes/post_types.php @@ -114,7 +114,7 @@ function create_posttype() 'show_in_rest' => true, 'menu_icon' => 'dashicons-info-outline', 'menu_position' => 2.1, - 'supports' => array('title', 'custom-fields', 'excerpt'), + 'supports' => array('title', 'custom-fields'), ) ); register_post_type( diff --git a/includes/taxonomy.php b/includes/taxonomy.php index 71ab6fd..7a263bd 100644 --- a/includes/taxonomy.php +++ b/includes/taxonomy.php @@ -44,7 +44,7 @@ function undo_create_term($term_id, $tt_id, $taxonomy) function add_custom_taxonomies() { // ————— Thématiques ————— - register_taxonomy('thematiques', ['questions', 'conseils', 'brochures'], array( + register_taxonomy('thematiques', ['questions', 'conseils', 'brochures', 'fiches-infos'], array( // 'hierarchical' => true, 'labels' => array( 'name' => __('Thématiques', 'homegrade-theme__texte-backoffice'), diff --git a/includes/utilities.php b/includes/utilities.php index b5132a1..93f2976 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -1,7 +1,9 @@ parent == 0) { return $thematique; } else { diff --git a/js/app.js b/js/app.js index f94a067..47b5441 100644 --- a/js/app.js +++ b/js/app.js @@ -206,7 +206,7 @@ function singleConseil() { let chapterIndex = document.querySelector(".chapter_index"); let questionBlocks = document.querySelectorAll(".questions-container-block"); - function handleLinksBehavior() { + function handleLinksBehavior2() { let chapterLinks = document.querySelectorAll(".chapter_index__link"); chapterLinks.forEach((link) => { link.addEventListener("click", (e) => { @@ -221,9 +221,10 @@ }); } function handleChapterIndicatorPosition() { + let chapterIndicator = document.querySelector(".chapter_index__position-indicator"); } - handleLinksBehavior(); } + handleLinksBehavior(); // resources/js/app.js window.addEventListener("load", function() { diff --git a/resources/css/app.css b/resources/css/app.css index 12bcd99..c3f9940 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -27,6 +27,7 @@ @import '../../template-components/cards/card-frequent_question.css'; @import '../../template-components/cards/card-thematique.css'; @import '../../template-components/post-conseils/chapter-header.css'; +@import '../../template-components/posts-components/chapter-header.css'; /* ########### LAYOUT ############ */ @import './layout/header.css'; @@ -35,6 +36,11 @@ @import './layout/menu-renovateur.css'; @import './layout/menu-homegrade.css'; +/* ###### EDITOR ##### */ +@import './editor-content/color-taxonomy-scheme.css'; +@import './editor-content/gutenberg.css'; +@import './editor-content/format-types.css'; + /* ########### BLOCKS ############ */ /* Home */ @@ -50,14 +56,11 @@ @import './blocks/questions-container-block.css'; @import './blocks/points-cles.css'; @import './blocks/highlight.css'; +@import './blocks/tooltip.css'; /* ########### PAGE ############ */ @import './pages/demo-components.css'; -@import './pages/template-archive-brochures.css'; +@import './pages/template-archive-publications.css'; @import './pages/template-archive-conseils.css'; @import './pages/template-archive-questions.css'; @import './pages/single-conseils.css'; - -/* ###### EDITOR ##### */ -@import './editor-content/color-taxonomy-scheme.css'; -@import './editor-content/gutenberg.css'; diff --git a/resources/css/base/generalites.css b/resources/css/base/generalites.css index 77a107a..4d7c156 100644 --- a/resources/css/base/generalites.css +++ b/resources/css/base/generalites.css @@ -8,3 +8,14 @@ button:focus { outline-radius: 50px; /* border-radius: 10px; */ } + +*::marker { + display: inline-block; + color: red; + font-size: 20px; + font-weight: bold; +} +summary { + margin: 10px; + /* display: inline-block; */ +} diff --git a/resources/css/blocks/questions-container-block.css b/resources/css/blocks/questions-container-block.css index a6ebeb9..45700d0 100644 --- a/resources/css/blocks/questions-container-block.css +++ b/resources/css/blocks/questions-container-block.css @@ -1,5 +1,6 @@ .questions-container-block { - h2 { - @apply font-bold text-black text-4xl; + @apply py-12; + &__title { + @apply font-bold !text-black !text-4xl; } } diff --git a/resources/css/blocks/tooltip.css b/resources/css/blocks/tooltip.css new file mode 100644 index 0000000..f91c251 --- /dev/null +++ b/resources/css/blocks/tooltip.css @@ -0,0 +1,11 @@ +.tooltip-word { + @apply font-bold; +} +.tooltip-popup { + @apply bg-white rounded-xl shadowed p-4 font-normal; +} +.tooltip-popup:after { + @apply absolute; + z-index: -2; + /* background-color: white; */ +} diff --git a/resources/css/components/brochures-grid.css b/resources/css/components/brochures-grid.css index 68b6c41..647648b 100644 --- a/resources/css/components/brochures-grid.css +++ b/resources/css/components/brochures-grid.css @@ -1,4 +1,4 @@ -.brochures-grid { +.publications-grid { @apply max-w-screen-xl mx-auto py-12 mb-12; &__row { diff --git a/resources/css/editor-content/color-taxonomy-scheme.css b/resources/css/editor-content/color-taxonomy-scheme.css index d3a4121..ccda6b2 100644 --- a/resources/css/editor-content/color-taxonomy-scheme.css +++ b/resources/css/editor-content/color-taxonomy-scheme.css @@ -1,6 +1,7 @@ .entry-content--acoustique-coproprietes, body.acoustique-coproprietes, -.post-conseil-page--acoustique-coproprietes { +.post-conseil-page--acoustique-coproprietes, +.post-question-page--acoustique-coproprietes { h2, h3, ul li::marker { @@ -16,10 +17,14 @@ body.acoustique-coproprietes, .chapter_index__position-indicator { @apply bg-acoustique-coproprietes; } + .tooltip-word { + @apply !decoration-acoustique-coproprietes; + } } .entry-content--energies-urbanisme, body.energies-urbanisme, -.post-conseil-page--energies-urbanisme { +.post-conseil-page--energies-urbanisme, +.post-question-page--energies-urbanisme { h2, h3, ul li::marker { @@ -33,10 +38,14 @@ body.energies-urbanisme, .chapter_index__position-indicator { @apply bg-energies-urbanisme; } + .tooltip-word { + @apply !decoration-energies-urbanisme; + } } .entry-content--isolation-quotidien, body.isolation-quotidien, -.post-conseil-page--isolation-quotidien { +.post-conseil-page--isolation-quotidien, +.post-question-page--isolation-quotidien { h2, h3, ul li::marker { @@ -50,10 +59,14 @@ body.isolation-quotidien, .chapter_index__position-indicator { @apply bg-isolation-quotidien; } + .tooltip-word { + @apply !decoration-isolation-quotidien; + } } .entry-content--patrimoine-renovation, body.patrimoine-renovation, -.post-conseil-page--patrimoine-renovation { +.post-conseil-page--patrimoine-renovation, +.post-question-page--patrimoine-renovation { h2, h3, ul li::marker { @@ -67,10 +80,14 @@ body.patrimoine-renovation, .chapter_index__position-indicator { @apply bg-patrimoine-renovation; } + .tooltip-word { + @apply !decoration-patrimoine-renovation; + } } .entry-content--location, body.location, -.post-conseil-page--location { +.post-conseil-page--location, +.post-question-page--location { h2, h3, ul li::marker { @@ -84,4 +101,7 @@ body.location, .chapter_index__position-indicator { @apply bg-location; } + .tooltip-word { + @apply !decoration-location; + } } diff --git a/resources/css/editor-content/format-types.css b/resources/css/editor-content/format-types.css new file mode 100644 index 0000000..8e69bc0 --- /dev/null +++ b/resources/css/editor-content/format-types.css @@ -0,0 +1,6 @@ +.tooltip-word { + @apply underline; + text-decoration-style: dotted !important; + text-decoration-color:; + text-decoration-thickness: 2px !important; +} diff --git a/resources/css/pages/template-archive-brochures.css b/resources/css/pages/template-archive-brochures.css deleted file mode 100644 index 7966846..0000000 --- a/resources/css/pages/template-archive-brochures.css +++ /dev/null @@ -1,6 +0,0 @@ -.archives-publications-header { - @apply bg-primary max-w-screen-xl text-white text-center mx-auto; -} -.brochures-archives { - @apply max-w-screen-xl mx-auto py-4; -} diff --git a/resources/css/pages/template-archive-publications.css b/resources/css/pages/template-archive-publications.css new file mode 100644 index 0000000..0c758c9 --- /dev/null +++ b/resources/css/pages/template-archive-publications.css @@ -0,0 +1,62 @@ +.archives-publications-header { + @apply bg-primary max-w-screen-xl text-white text-center mx-auto; +} + +.highlighted-brochure { + @apply max-w-screen-xl + p-8 + mx-auto + mt-0 + bg-secondary-light; + + /* &__infos { + &:after { + @apply absolute + left-0 + bottom-0 + w-full + bg-secondary-light; + content: ''; + height: 200px; + z-index: -1; + } + } */ + &__wrapper { + @apply relative + flex + flex-row + items-end + justify-between; + } + &__titling { + @apply flex items-center gap-4; + &__icon { + @apply bg-secondary rounded-full w-8 h-8 flex items-center justify-center; + img { + @apply w-full; + max-width: 40%; + } + } + &__title { + @apply font-bold text-secondary text-xl; + } + } + &__comment { + @apply pt-4 w-2/3 max-w-5xl pr-6; + } + + &__cover { + @apply absolute right-0 bottom-0; + /* transform: translateY(-30%); */ + @apply w-1/3; + max-width: 250px; + /* transform: scale(2) translate(-50%, -20%); */ + } + .cta { + @apply mt-8; + } +} +.brochures-archives, +.fiches-infos-archives { + @apply max-w-screen-xl mx-auto py-4 mt-8; +} diff --git a/resources/img/graphic-assets/house-homegrade-icon.svg b/resources/img/graphic-assets/house-homegrade-icon.svg new file mode 100644 index 0000000..265db44 --- /dev/null +++ b/resources/img/graphic-assets/house-homegrade-icon.svg @@ -0,0 +1,3 @@ + diff --git a/resources/js/single-conseil.js b/resources/js/single-conseil.js index cd9276a..eb25a75 100644 --- a/resources/js/single-conseil.js +++ b/resources/js/single-conseil.js @@ -19,14 +19,10 @@ export default function singleConseil() { } function handleChapterIndicatorPosition() { - let chapterIndicator = document.querySelector('.chapter_index__position-indicator'); - - - } - - } - handleLinksBehavior(); - // console.log(chapterIndex); - // console.log(questionBlocks); - // console.log(chapterLinks); + let chapterIndicator = document.querySelector('.chapter_index__position-indicator'); + } } +handleLinksBehavior(); +// console.log(chapterIndex); +// console.log(questionBlocks); +// console.log(chapterLinks); diff --git a/single-conseils.php b/single-conseils.php index ac144ec..2284222 100644 --- a/single-conseils.php +++ b/single-conseils.php @@ -27,19 +27,24 @@ function build_chapter_index($blocks) ?>
'; +print_r($thematiqueColorSlug); +echo ''; $args = array( @@ -38,16 +42,6 @@ echo ''; $test = get_term_by('id', 12, 'category'); -if ($term->parent == 0) { - $args = array( - 'child_of' => $term->term_id, - 'taxonomy' => $term->taxonomy, - 'hide_empty' => 0, - 'hierarchical' => true, - 'depth' => 1, - ); - wp_list_categories($args); -} // echo '
';
// print_r($thematique_related_page);
@@ -62,7 +56,7 @@ if ($term->parent == 0) {
Home >
name ?>
+ +name ?>
- + -