From 3744b872b42939b6bb3acf21bf0ca3e92eaf779a Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 21 Aug 2023 17:33:36 +0200 Subject: [PATCH] point gilles gauthier --- __attachment.php | 1 + css/app.css | 692 ++++++++++++------ css/editor-style.css | 8 + includes/admin.php | 14 +- includes/post_types.php | 2 +- includes/taxonomy.php | 2 +- includes/utilities.php | 8 +- js/app.js | 5 +- resources/css/app.css | 13 +- resources/css/base/generalites.css | 11 + .../css/blocks/questions-container-block.css | 5 +- resources/css/blocks/tooltip.css | 11 + resources/css/components/brochures-grid.css | 2 +- .../editor-content/color-taxonomy-scheme.css | 30 +- resources/css/editor-content/format-types.css | 6 + .../css/pages/template-archive-brochures.css | 6 - .../pages/template-archive-publications.css | 62 ++ .../graphic-assets/house-homegrade-icon.svg | 3 + resources/js/single-conseil.js | 16 +- single-conseils.php | 38 +- taxonomy-thematiques.php | 92 ++- .../archives/brochure-grid-row.php | 16 +- .../post-conseils/chapter-header.php | 3 +- .../posts-components/chapter-header.css | 26 + .../posts-components/chapter-header.php | 42 ++ template-publications.php | 125 ++-- 26 files changed, 873 insertions(+), 366 deletions(-) create mode 100644 __attachment.php create mode 100644 resources/css/blocks/tooltip.css create mode 100644 resources/css/editor-content/format-types.css delete mode 100644 resources/css/pages/template-archive-brochures.css create mode 100644 resources/css/pages/template-archive-publications.css create mode 100644 resources/img/graphic-assets/house-homegrade-icon.svg create mode 100644 template-components/posts-components/chapter-header.css create mode 100644 template-components/posts-components/chapter-header.php diff --git a/__attachment.php b/__attachment.php new file mode 100644 index 0000000..66dc5d4 --- /dev/null +++ b/__attachment.php @@ -0,0 +1 @@ +

salut

\ No newline at end of file diff --git a/css/app.css b/css/app.css index c828414..211436a 100644 --- a/css/app.css +++ b/css/app.css @@ -1159,6 +1159,18 @@ button:focus { /* border-radius: 10px; */ } +*::marker { + display: inline-block; + color: red; + font-size: 20px; + font-weight: bold; +} + +summary { + margin: 10px; + /* display: inline-block; */ +} + .filter-acoustique-coproprietes { filter: invert(27%) sepia(88%) saturate(1302%) hue-rotate(206deg) brightness(105%) contrast(114%); @@ -1811,7 +1823,7 @@ button:focus { padding-bottom: 1rem; } -.brochures-grid { +.publications-grid { margin-left: auto; margin-right: auto; margin-bottom: 3rem; @@ -1820,42 +1832,42 @@ button:focus { padding-bottom: 3rem; } -.brochures-grid__row { +.publications-grid__row { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2rem; align-items: center; } -.brochures-grid__row + .brochures-grid__row { +.publications-grid__row + .publications-grid__row { margin-top: 2rem; border-top-width: 1px; border-color: rgb(239, 239, 239, 0.6); padding-top: 2rem; } -.brochures-grid__cover { +.publications-grid__cover { grid-column: span 1 / span 1; width: 5rem; border-radius: 0.5rem; } -.brochures-grid__title { +.publications-grid__title { grid-column: span 4 / span 4; font-weight: 700; } -.brochures-grid__thematique { +.publications-grid__thematique { grid-column: span 2 / span 2; text-align: center; } -.brochures-grid__edition { +.publications-grid__edition { grid-column: span 2 / span 2; text-align: center; } -.brochures-grid__button { +.publications-grid__button { grid-column: span 2 / span 2; display: flex; justify-content: flex-end; @@ -2126,6 +2138,56 @@ button:focus { margin-bottom: 2rem; } +.post-chapter-header { + margin-left: auto; + margin-right: auto; + margin-top: 2rem; + display: flex; + max-width: 1440px; + align-content: space-between; + align-items: center; + border-radius: 1rem; + padding: 2rem; +} + +@media (min-width: 782px) { + .post-chapter-header { + padding-left: 4rem; + padding-right: 4rem; + } +} + +.post-chapter-header { + margin-bottom: 20px; +} + +.post-chapter-header__page-thematic-cover { + max-width: 400px; +} + +.post-chapter-header__page-thematic-title { + padding-bottom: 1rem; + font-size: 1.25rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.05em; +} + +.post-chapter-header__page-title { + font-size: 2.25rem; + line-height: 2.5rem; + font-weight: 700; +} + +.post-chapter-header__infos { + max-width: 42rem; +} + +.post-chapter-header__infos .cta { + margin-top: 2rem; + margin-bottom: 2rem; +} + /* ########### LAYOUT ############ */ header#main-header { @@ -3020,6 +3082,286 @@ header#main-header { display: none; } +/* ###### EDITOR ##### */ + +.entry-content--acoustique-coproprietes h2, + .entry-content--acoustique-coproprietes h3, + .entry-content--acoustique-coproprietes ul li::marker, + body.acoustique-coproprietes h2, + body.acoustique-coproprietes h3, + body.acoustique-coproprietes ul li::marker, + .post-conseil-page--acoustique-coproprietes h2, + .post-conseil-page--acoustique-coproprietes h3, + .post-conseil-page--acoustique-coproprietes ul li::marker, + .post-question-page--acoustique-coproprietes h2, + .post-question-page--acoustique-coproprietes h3, + .post-question-page--acoustique-coproprietes ul li::marker { + --tw-text-opacity: 1; + color: rgb(36 94 242 / var(--tw-text-opacity)); +} + +.entry-content--acoustique-coproprietes .homegrade-blocks-highlight, + .entry-content--acoustique-coproprietes .homegrade-blocks-chapter-header-block, + .entry-content--acoustique-coproprietes .post-conseils-chapter-header, + body.acoustique-coproprietes .homegrade-blocks-highlight, + body.acoustique-coproprietes .homegrade-blocks-chapter-header-block, + body.acoustique-coproprietes .post-conseils-chapter-header, + .post-conseil-page--acoustique-coproprietes .homegrade-blocks-highlight, + .post-conseil-page--acoustique-coproprietes .homegrade-blocks-chapter-header-block, + .post-conseil-page--acoustique-coproprietes .post-conseils-chapter-header, + .post-question-page--acoustique-coproprietes .homegrade-blocks-highlight, + .post-question-page--acoustique-coproprietes .homegrade-blocks-chapter-header-block, + .post-question-page--acoustique-coproprietes .post-conseils-chapter-header { + --tw-bg-opacity: 1; + background-color: rgb(223 241 255 / var(--tw-bg-opacity)); +} + +.entry-content--acoustique-coproprietes .chapter_index__position-indicator, body.acoustique-coproprietes .chapter_index__position-indicator, .post-conseil-page--acoustique-coproprietes .chapter_index__position-indicator, .post-question-page--acoustique-coproprietes .chapter_index__position-indicator { + --tw-bg-opacity: 1; + background-color: rgb(36 94 242 / var(--tw-bg-opacity)); +} + +.entry-content--acoustique-coproprietes .tooltip-word, body.acoustique-coproprietes .tooltip-word, .post-conseil-page--acoustique-coproprietes .tooltip-word, .post-question-page--acoustique-coproprietes .tooltip-word { + -webkit-text-decoration-color: #245EF2 !important; + text-decoration-color: #245EF2 !important; +} + +.entry-content--energies-urbanisme h2, + .entry-content--energies-urbanisme h3, + .entry-content--energies-urbanisme ul li::marker, + body.energies-urbanisme h2, + body.energies-urbanisme h3, + body.energies-urbanisme ul li::marker, + .post-conseil-page--energies-urbanisme h2, + .post-conseil-page--energies-urbanisme h3, + .post-conseil-page--energies-urbanisme ul li::marker, + .post-question-page--energies-urbanisme h2, + .post-question-page--energies-urbanisme h3, + .post-question-page--energies-urbanisme ul li::marker { + --tw-text-opacity: 1; + color: rgb(2 126 80 / var(--tw-text-opacity)); +} + +.entry-content--energies-urbanisme .homegrade-blocks-highlight, + .entry-content--energies-urbanisme .homegrade-blocks-chapter-header-block, + .entry-content--energies-urbanisme .post-conseils-chapter-header, + body.energies-urbanisme .homegrade-blocks-highlight, + body.energies-urbanisme .homegrade-blocks-chapter-header-block, + body.energies-urbanisme .post-conseils-chapter-header, + .post-conseil-page--energies-urbanisme .homegrade-blocks-highlight, + .post-conseil-page--energies-urbanisme .homegrade-blocks-chapter-header-block, + .post-conseil-page--energies-urbanisme .post-conseils-chapter-header, + .post-question-page--energies-urbanisme .homegrade-blocks-highlight, + .post-question-page--energies-urbanisme .homegrade-blocks-chapter-header-block, + .post-question-page--energies-urbanisme .post-conseils-chapter-header { + --tw-bg-opacity: 1; + background-color: rgb(227 255 240 / var(--tw-bg-opacity)); +} + +.entry-content--energies-urbanisme .chapter_index__position-indicator, body.energies-urbanisme .chapter_index__position-indicator, .post-conseil-page--energies-urbanisme .chapter_index__position-indicator, .post-question-page--energies-urbanisme .chapter_index__position-indicator { + --tw-bg-opacity: 1; + background-color: rgb(2 126 80 / var(--tw-bg-opacity)); +} + +.entry-content--energies-urbanisme .tooltip-word, body.energies-urbanisme .tooltip-word, .post-conseil-page--energies-urbanisme .tooltip-word, .post-question-page--energies-urbanisme .tooltip-word { + -webkit-text-decoration-color: #027E50 !important; + text-decoration-color: #027E50 !important; +} + +.entry-content--isolation-quotidien h2, + .entry-content--isolation-quotidien h3, + .entry-content--isolation-quotidien ul li::marker, + body.isolation-quotidien h2, + body.isolation-quotidien h3, + body.isolation-quotidien ul li::marker, + .post-conseil-page--isolation-quotidien h2, + .post-conseil-page--isolation-quotidien h3, + .post-conseil-page--isolation-quotidien ul li::marker, + .post-question-page--isolation-quotidien h2, + .post-question-page--isolation-quotidien h3, + .post-question-page--isolation-quotidien ul li::marker { + --tw-text-opacity: 1; + color: rgb(194 69 3 / var(--tw-text-opacity)); +} + +.entry-content--isolation-quotidien .homegrade-blocks-highlight, + .entry-content--isolation-quotidien .homegrade-blocks-chapter-header-block, + .entry-content--isolation-quotidien .post-conseils-chapter-header, + body.isolation-quotidien .homegrade-blocks-highlight, + body.isolation-quotidien .homegrade-blocks-chapter-header-block, + body.isolation-quotidien .post-conseils-chapter-header, + .post-conseil-page--isolation-quotidien .homegrade-blocks-highlight, + .post-conseil-page--isolation-quotidien .homegrade-blocks-chapter-header-block, + .post-conseil-page--isolation-quotidien .post-conseils-chapter-header, + .post-question-page--isolation-quotidien .homegrade-blocks-highlight, + .post-question-page--isolation-quotidien .homegrade-blocks-chapter-header-block, + .post-question-page--isolation-quotidien .post-conseils-chapter-header { + --tw-bg-opacity: 1; + background-color: rgb(255 251 236 / var(--tw-bg-opacity)); +} + +.entry-content--isolation-quotidien .chapter_index__position-indicator, body.isolation-quotidien .chapter_index__position-indicator, .post-conseil-page--isolation-quotidien .chapter_index__position-indicator, .post-question-page--isolation-quotidien .chapter_index__position-indicator { + --tw-bg-opacity: 1; + background-color: rgb(194 69 3 / var(--tw-bg-opacity)); +} + +.entry-content--isolation-quotidien .tooltip-word, body.isolation-quotidien .tooltip-word, .post-conseil-page--isolation-quotidien .tooltip-word, .post-question-page--isolation-quotidien .tooltip-word { + -webkit-text-decoration-color: #C24503 !important; + text-decoration-color: #C24503 !important; +} + +.entry-content--patrimoine-renovation h2, + .entry-content--patrimoine-renovation h3, + .entry-content--patrimoine-renovation ul li::marker, + body.patrimoine-renovation h2, + body.patrimoine-renovation h3, + body.patrimoine-renovation ul li::marker, + .post-conseil-page--patrimoine-renovation h2, + .post-conseil-page--patrimoine-renovation h3, + .post-conseil-page--patrimoine-renovation ul li::marker, + .post-question-page--patrimoine-renovation h2, + .post-question-page--patrimoine-renovation h3, + .post-question-page--patrimoine-renovation ul li::marker { + --tw-text-opacity: 1; + color: rgb(139 47 247 / var(--tw-text-opacity)); +} + +.entry-content--patrimoine-renovation .homegrade-blocks-highlight, + .entry-content--patrimoine-renovation .homegrade-blocks-chapter-header-block, + .entry-content--patrimoine-renovation .post-conseils-chapter-header, + body.patrimoine-renovation .homegrade-blocks-highlight, + body.patrimoine-renovation .homegrade-blocks-chapter-header-block, + body.patrimoine-renovation .post-conseils-chapter-header, + .post-conseil-page--patrimoine-renovation .homegrade-blocks-highlight, + .post-conseil-page--patrimoine-renovation .homegrade-blocks-chapter-header-block, + .post-conseil-page--patrimoine-renovation .post-conseils-chapter-header, + .post-question-page--patrimoine-renovation .homegrade-blocks-highlight, + .post-question-page--patrimoine-renovation .homegrade-blocks-chapter-header-block, + .post-question-page--patrimoine-renovation .post-conseils-chapter-header { + --tw-bg-opacity: 1; + background-color: rgb(255 229 253 / var(--tw-bg-opacity)); +} + +.entry-content--patrimoine-renovation .chapter_index__position-indicator, body.patrimoine-renovation .chapter_index__position-indicator, .post-conseil-page--patrimoine-renovation .chapter_index__position-indicator, .post-question-page--patrimoine-renovation .chapter_index__position-indicator { + --tw-bg-opacity: 1; + background-color: rgb(139 47 247 / var(--tw-bg-opacity)); +} + +.entry-content--patrimoine-renovation .tooltip-word, body.patrimoine-renovation .tooltip-word, .post-conseil-page--patrimoine-renovation .tooltip-word, .post-question-page--patrimoine-renovation .tooltip-word { + -webkit-text-decoration-color: #8B2FF7 !important; + text-decoration-color: #8B2FF7 !important; +} + +.entry-content--location h2, + .entry-content--location h3, + .entry-content--location ul li::marker, + body.location h2, + body.location h3, + body.location ul li::marker, + .post-conseil-page--location h2, + .post-conseil-page--location h3, + .post-conseil-page--location ul li::marker, + .post-question-page--location h2, + .post-question-page--location h3, + .post-question-page--location ul li::marker { + --tw-text-opacity: 1; + color: rgb(223 0 43 / var(--tw-text-opacity)); +} + +.entry-content--location .homegrade-blocks-highlight, + .entry-content--location .homegrade-blocks-chapter-header-block, + .entry-content--location .post-conseils-chapter-header, + body.location .homegrade-blocks-highlight, + body.location .homegrade-blocks-chapter-header-block, + body.location .post-conseils-chapter-header, + .post-conseil-page--location .homegrade-blocks-highlight, + .post-conseil-page--location .homegrade-blocks-chapter-header-block, + .post-conseil-page--location .post-conseils-chapter-header, + .post-question-page--location .homegrade-blocks-highlight, + .post-question-page--location .homegrade-blocks-chapter-header-block, + .post-question-page--location .post-conseils-chapter-header { + --tw-bg-opacity: 1; + background-color: rgb(254 226 231 / var(--tw-bg-opacity)); +} + +.entry-content--location .chapter_index__position-indicator, body.location .chapter_index__position-indicator, .post-conseil-page--location .chapter_index__position-indicator, .post-question-page--location .chapter_index__position-indicator { + --tw-bg-opacity: 1; + background-color: rgb(223 0 43 / var(--tw-bg-opacity)); +} + +.entry-content--location .tooltip-word, body.location .tooltip-word, .post-conseil-page--location .tooltip-word, .post-question-page--location .tooltip-word { + -webkit-text-decoration-color: #DF002B !important; + text-decoration-color: #DF002B !important; +} + +article > *:not(.entry-content, .chapter-header-block), +.entry-content > * { + margin-left: auto; + margin-right: auto; + max-width: 960px; +} + +.entry-content h1 { + font-size: 1.5rem; + line-height: 2rem; +} + +.entry-content h2 { + font-size: 1.25rem; +} + +.entry-content h3 { + font-size: 1.5rem; + line-height: 2rem; + font-weight: 700; +} + +.entry-content p a, .entry-content ul a, .entry-content ol a { + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(47 1 84 / var(--tw-text-opacity)); + -webkit-text-decoration-line: underline; + text-decoration-line: underline; + text-underline-offset: 4px; +} + +/* &:after { + @apply inline-block bg-red-500 h-3 w-3 ml-2; + content: ''; + background-image: url('/wp-content/themes/homegrade/dist/images/arrow.svg'); + } */ + +.entry-content p a:hover, .entry-content ul a:hover, .entry-content ol a:hover { + -webkit-text-decoration-line: none; + text-decoration-line: none; +} + +.entry-content p, + .entry-content ul, + .entry-content ol { + margin-bottom: 2rem; +} + +.entry-content ul:not(.block-editor-block-variation-picker__variations) li { + list-style-position: inside; + list-style-type: disc; +} + +.entry-content ol li { + list-style-position: inside; + list-style-type: decimal; +} + +.tooltip-word { + -webkit-text-decoration-line: underline; + text-decoration-line: underline; + -webkit-text-decoration-style: dotted !important; + text-decoration-style: dotted !important; + -webkit-text-decoration-color:; + text-decoration-color:; + text-decoration-thickness: 2px !important; +} + /* ########### BLOCKS ############ */ /* Home */ @@ -3502,12 +3844,17 @@ header#main-header { /* @import './blocks/chapter-header-block.css'; */ -.questions-container-block h2 { - font-size: 2.25rem; - line-height: 2.5rem; +.questions-container-block { + padding-top: 3rem; + padding-bottom: 3rem; +} + +.questions-container-block__title { + font-size: 2.25rem !important; + line-height: 2.5rem !important; font-weight: 700; - --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); + --tw-text-opacity: 1 !important; + color: rgb(0 0 0 / var(--tw-text-opacity)) !important; } .wp-block-homegrade-content-blocks-points-cles { @@ -3549,6 +3896,25 @@ header#main-header { background-color: rgb(47 1 84 / var(--tw-bg-opacity)); } +.tooltip-word { + font-weight: 700; +} + +.tooltip-popup { + border-radius: 0.75rem; + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + padding: 1rem; + font-weight: 400; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} + +.tooltip-popup:after { + position: absolute; + z-index: -2; + /* background-color: white; */ +} + /* ########### PAGE ############ */ .demo-components .title { @@ -3581,9 +3947,92 @@ header#main-header { color: rgb(255 255 255 / var(--tw-text-opacity)); } -.brochures-archives { +.highlighted-brochure { margin-left: auto; margin-right: auto; + margin-top: 0px; + max-width: 1280px; + --tw-bg-opacity: 1; + background-color: rgb(255 237 236 / var(--tw-bg-opacity)); + padding: 2rem; +} + +/* &__infos { + &:after { + @apply absolute + left-0 + bottom-0 + w-full + bg-secondary-light; + content: ''; + height: 200px; + z-index: -1; + } + } */ + +.highlighted-brochure__wrapper { + position: relative; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: space-between; +} + +.highlighted-brochure__titling { + display: flex; + align-items: center; + gap: 1rem; +} + +.highlighted-brochure__titling__icon { + display: flex; + height: 2rem; + width: 2rem; + align-items: center; + justify-content: center; + border-radius: 9999px; + --tw-bg-opacity: 1; + background-color: rgb(223 30 30 / var(--tw-bg-opacity)); +} + +.highlighted-brochure__titling__icon img { + width: 100%; + max-width: 40%; +} + +.highlighted-brochure__titling__title { + font-size: 1.25rem; + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(223 30 30 / var(--tw-text-opacity)); +} + +.highlighted-brochure__comment { + width: 66.666667%; + max-width: 64rem; + padding-top: 1rem; + padding-right: 1.5rem; +} + +.highlighted-brochure__cover { + position: absolute; + right: 0px; + bottom: 0px; + /* transform: translateY(-30%); */ + width: 33.333333%; + max-width: 250px; + /* transform: scale(2) translate(-50%, -20%); */ +} + +.highlighted-brochure .cta { + margin-top: 2rem; +} + +.brochures-archives, +.fiches-infos-archives { + margin-left: auto; + margin-right: auto; + margin-top: 2rem; max-width: 1280px; padding-top: 1rem; padding-bottom: 1rem; @@ -3652,221 +4101,6 @@ header#main-header { display: block; } -/* ###### EDITOR ##### */ - -.entry-content--acoustique-coproprietes h2, - .entry-content--acoustique-coproprietes h3, - .entry-content--acoustique-coproprietes ul li::marker, - body.acoustique-coproprietes h2, - body.acoustique-coproprietes h3, - body.acoustique-coproprietes ul li::marker, - .post-conseil-page--acoustique-coproprietes h2, - .post-conseil-page--acoustique-coproprietes h3, - .post-conseil-page--acoustique-coproprietes ul li::marker { - --tw-text-opacity: 1; - color: rgb(36 94 242 / var(--tw-text-opacity)); -} - -.entry-content--acoustique-coproprietes .homegrade-blocks-highlight, - .entry-content--acoustique-coproprietes .homegrade-blocks-chapter-header-block, - .entry-content--acoustique-coproprietes .post-conseils-chapter-header, - body.acoustique-coproprietes .homegrade-blocks-highlight, - body.acoustique-coproprietes .homegrade-blocks-chapter-header-block, - body.acoustique-coproprietes .post-conseils-chapter-header, - .post-conseil-page--acoustique-coproprietes .homegrade-blocks-highlight, - .post-conseil-page--acoustique-coproprietes .homegrade-blocks-chapter-header-block, - .post-conseil-page--acoustique-coproprietes .post-conseils-chapter-header { - --tw-bg-opacity: 1; - background-color: rgb(223 241 255 / var(--tw-bg-opacity)); -} - -.entry-content--acoustique-coproprietes .chapter_index__position-indicator, body.acoustique-coproprietes .chapter_index__position-indicator, .post-conseil-page--acoustique-coproprietes .chapter_index__position-indicator { - --tw-bg-opacity: 1; - background-color: rgb(36 94 242 / var(--tw-bg-opacity)); -} - -.entry-content--energies-urbanisme h2, - .entry-content--energies-urbanisme h3, - .entry-content--energies-urbanisme ul li::marker, - body.energies-urbanisme h2, - body.energies-urbanisme h3, - body.energies-urbanisme ul li::marker, - .post-conseil-page--energies-urbanisme h2, - .post-conseil-page--energies-urbanisme h3, - .post-conseil-page--energies-urbanisme ul li::marker { - --tw-text-opacity: 1; - color: rgb(2 126 80 / var(--tw-text-opacity)); -} - -.entry-content--energies-urbanisme .homegrade-blocks-highlight, - .entry-content--energies-urbanisme .homegrade-blocks-chapter-header-block, - .entry-content--energies-urbanisme .post-conseils-chapter-header, - body.energies-urbanisme .homegrade-blocks-highlight, - body.energies-urbanisme .homegrade-blocks-chapter-header-block, - body.energies-urbanisme .post-conseils-chapter-header, - .post-conseil-page--energies-urbanisme .homegrade-blocks-highlight, - .post-conseil-page--energies-urbanisme .homegrade-blocks-chapter-header-block, - .post-conseil-page--energies-urbanisme .post-conseils-chapter-header { - --tw-bg-opacity: 1; - background-color: rgb(227 255 240 / var(--tw-bg-opacity)); -} - -.entry-content--energies-urbanisme .chapter_index__position-indicator, body.energies-urbanisme .chapter_index__position-indicator, .post-conseil-page--energies-urbanisme .chapter_index__position-indicator { - --tw-bg-opacity: 1; - background-color: rgb(2 126 80 / var(--tw-bg-opacity)); -} - -.entry-content--isolation-quotidien h2, - .entry-content--isolation-quotidien h3, - .entry-content--isolation-quotidien ul li::marker, - body.isolation-quotidien h2, - body.isolation-quotidien h3, - body.isolation-quotidien ul li::marker, - .post-conseil-page--isolation-quotidien h2, - .post-conseil-page--isolation-quotidien h3, - .post-conseil-page--isolation-quotidien ul li::marker { - --tw-text-opacity: 1; - color: rgb(194 69 3 / var(--tw-text-opacity)); -} - -.entry-content--isolation-quotidien .homegrade-blocks-highlight, - .entry-content--isolation-quotidien .homegrade-blocks-chapter-header-block, - .entry-content--isolation-quotidien .post-conseils-chapter-header, - body.isolation-quotidien .homegrade-blocks-highlight, - body.isolation-quotidien .homegrade-blocks-chapter-header-block, - body.isolation-quotidien .post-conseils-chapter-header, - .post-conseil-page--isolation-quotidien .homegrade-blocks-highlight, - .post-conseil-page--isolation-quotidien .homegrade-blocks-chapter-header-block, - .post-conseil-page--isolation-quotidien .post-conseils-chapter-header { - --tw-bg-opacity: 1; - background-color: rgb(255 251 236 / var(--tw-bg-opacity)); -} - -.entry-content--isolation-quotidien .chapter_index__position-indicator, body.isolation-quotidien .chapter_index__position-indicator, .post-conseil-page--isolation-quotidien .chapter_index__position-indicator { - --tw-bg-opacity: 1; - background-color: rgb(194 69 3 / var(--tw-bg-opacity)); -} - -.entry-content--patrimoine-renovation h2, - .entry-content--patrimoine-renovation h3, - .entry-content--patrimoine-renovation ul li::marker, - body.patrimoine-renovation h2, - body.patrimoine-renovation h3, - body.patrimoine-renovation ul li::marker, - .post-conseil-page--patrimoine-renovation h2, - .post-conseil-page--patrimoine-renovation h3, - .post-conseil-page--patrimoine-renovation ul li::marker { - --tw-text-opacity: 1; - color: rgb(139 47 247 / var(--tw-text-opacity)); -} - -.entry-content--patrimoine-renovation .homegrade-blocks-highlight, - .entry-content--patrimoine-renovation .homegrade-blocks-chapter-header-block, - .entry-content--patrimoine-renovation .post-conseils-chapter-header, - body.patrimoine-renovation .homegrade-blocks-highlight, - body.patrimoine-renovation .homegrade-blocks-chapter-header-block, - body.patrimoine-renovation .post-conseils-chapter-header, - .post-conseil-page--patrimoine-renovation .homegrade-blocks-highlight, - .post-conseil-page--patrimoine-renovation .homegrade-blocks-chapter-header-block, - .post-conseil-page--patrimoine-renovation .post-conseils-chapter-header { - --tw-bg-opacity: 1; - background-color: rgb(255 229 253 / var(--tw-bg-opacity)); -} - -.entry-content--patrimoine-renovation .chapter_index__position-indicator, body.patrimoine-renovation .chapter_index__position-indicator, .post-conseil-page--patrimoine-renovation .chapter_index__position-indicator { - --tw-bg-opacity: 1; - background-color: rgb(139 47 247 / var(--tw-bg-opacity)); -} - -.entry-content--location h2, - .entry-content--location h3, - .entry-content--location ul li::marker, - body.location h2, - body.location h3, - body.location ul li::marker, - .post-conseil-page--location h2, - .post-conseil-page--location h3, - .post-conseil-page--location ul li::marker { - --tw-text-opacity: 1; - color: rgb(223 0 43 / var(--tw-text-opacity)); -} - -.entry-content--location .homegrade-blocks-highlight, - .entry-content--location .homegrade-blocks-chapter-header-block, - .entry-content--location .post-conseils-chapter-header, - body.location .homegrade-blocks-highlight, - body.location .homegrade-blocks-chapter-header-block, - body.location .post-conseils-chapter-header, - .post-conseil-page--location .homegrade-blocks-highlight, - .post-conseil-page--location .homegrade-blocks-chapter-header-block, - .post-conseil-page--location .post-conseils-chapter-header { - --tw-bg-opacity: 1; - background-color: rgb(254 226 231 / var(--tw-bg-opacity)); -} - -.entry-content--location .chapter_index__position-indicator, body.location .chapter_index__position-indicator, .post-conseil-page--location .chapter_index__position-indicator { - --tw-bg-opacity: 1; - background-color: rgb(223 0 43 / var(--tw-bg-opacity)); -} - -article > *:not(.entry-content, .chapter-header-block), -.entry-content > * { - margin-left: auto; - margin-right: auto; - max-width: 960px; -} - -.entry-content h1 { - font-size: 1.5rem; - line-height: 2rem; -} - -.entry-content h2 { - font-size: 1.25rem; -} - -.entry-content h3 { - font-size: 1.5rem; - line-height: 2rem; - font-weight: 700; -} - -.entry-content p a, .entry-content ul a, .entry-content ol a { - font-weight: 700; - --tw-text-opacity: 1; - color: rgb(47 1 84 / var(--tw-text-opacity)); - -webkit-text-decoration-line: underline; - text-decoration-line: underline; - text-underline-offset: 4px; -} - -/* &:after { - @apply inline-block bg-red-500 h-3 w-3 ml-2; - content: ''; - background-image: url('/wp-content/themes/homegrade/dist/images/arrow.svg'); - } */ - -.entry-content p a:hover, .entry-content ul a:hover, .entry-content ol a:hover { - -webkit-text-decoration-line: none; - text-decoration-line: none; -} - -.entry-content p, - .entry-content ul, - .entry-content ol { - margin-bottom: 2rem; -} - -.entry-content ul:not(.block-editor-block-variation-picker__variations) li { - list-style-position: inside; - list-style-type: disc; -} - -.entry-content ol li { - list-style-position: inside; - list-style-type: decimal; -} - .hover\:bg-primary:hover { --tw-bg-opacity: 1; background-color: rgb(47 1 84 / var(--tw-bg-opacity)); diff --git a/css/editor-style.css b/css/editor-style.css index b87791b..f08c58b 100644 --- a/css/editor-style.css +++ b/css/editor-style.css @@ -91,6 +91,14 @@ margin-bottom: 3rem } +.mt-8 { + margin-top: 2rem +} + +.mt-16 { + margin-top: 4rem +} + .block { display: block } diff --git a/includes/admin.php b/includes/admin.php index c1ed240..78277a6 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -90,7 +90,9 @@ add_action('admin_menu', 'custom_menu_page_removing'); function hide_editor() { - $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; + if (!is_admin()) return null; + $post_id = isset($_GET['post']) ? $_GET['post'] : (isset($_POST['post_ID']) ? $_POST['post_ID'] : null); + if (!isset($post_id)) return; $template_file = get_post_meta($post_id, '_wp_page_template', true); @@ -183,11 +185,17 @@ add_action('manage_brochures_posts_custom_column', 'handle_posts_custom_columns' ------------------------------------------------------------------------*/ function wpdocs_admin_classes($classes) { + // if (is_admin()) { + // return $classes; + // } global $pagenow; global $post; - $thematique = get_the_terms(get_the_ID(), 'thematiques')[0]; + echo '
';
+	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) ?>
- + + + + + + @@ -47,6 +52,13 @@ function build_chapter_index($blocks)
">
+ +
+ + + +
+
diff --git a/taxonomy-thematiques.php b/taxonomy-thematiques.php index b52f283..1f85a8f 100644 --- a/taxonomy-thematiques.php +++ b/taxonomy-thematiques.php @@ -1,11 +1,15 @@ parent ? get_term(get_queried_object()->parent, 'thematiques') : get_term(get_queried_object(), 'thematiques'); +$thematiqueColorSlug = getThematiqueFamilySlug($thematique_generale->slug); + -$current_general_thematique = get_queried_object()->parent ? get_term(get_queried_object()->parent, 'thematiques') : get_term(get_queried_object(), 'thematiques'); $current_children_thematique = get_queried_object()->parent != 0 ? get_queried_object() : null; +echo '
';
+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 ?>
  • @@ -74,11 +68,77 @@ if ($term->parent == 0) { -
    +
    + parent) : ?> + $thematique_generale->term_id, + 'taxonomy' => 'thematiques', + 'hide_empty' => true, + )); + + ?> + + + + + + +
    + + + get_queried_object_id(), + 'title' => __("Les questions les plus fréquentes sur ", "homegrade-theme__texte-fonctionnel__faq-archive-questions") . get_queried_object()->name, + 'sub-title' => $thematique->name, + 'thematique' => $thematique, + 'thematique_generale' => $thematique_generale, + 'thematiqueColorSlug' => $thematiqueColorSlug, + ) + +); ?> + +
    ""> post_content; + + $query_args = array( + 'post_type' => 'questions', + 'posts_per_page' => -1, + 'tax_query' => array( + array( + 'taxonomy' => 'thematiques', + 'field' => 'term_id', + 'terms' => $thematique_generale->term_id, + + ) + ) + ); + $questions = new WP_Query($query_args); + ?> + +have_posts()) : while ($questions->have_posts()) : $questions->the_post(); ?> + +
    + + + + +
    + +
    + +
    + + + + +
    +
    -
  • +
  • - + -

    -

    name ?>

    +

    +

    name ?>

    -

    +

    -
    - +
    +
  • \ No newline at end of file diff --git a/template-components/post-conseils/chapter-header.php b/template-components/post-conseils/chapter-header.php index bf66a41..f9767c5 100644 --- a/template-components/post-conseils/chapter-header.php +++ b/template-components/post-conseils/chapter-header.php @@ -1,5 +1,6 @@ ID, 'thematiques')[0] ?? null; $thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique; $thematique_generale_id_fr = apply_filters('wpml_object_id', $thematique_generale->term_id, 'thematiques', TRUE, 'fr'); diff --git a/template-components/posts-components/chapter-header.css b/template-components/posts-components/chapter-header.css new file mode 100644 index 0000000..35f170c --- /dev/null +++ b/template-components/posts-components/chapter-header.css @@ -0,0 +1,26 @@ +.post-chapter-header { + @apply p-8 md:px-16 mt-8 max-w-screen-2xl + flex + content-between + items-center mx-auto + rounded-2xl; + + margin-bottom: 20px; + + &__page-thematic-cover { + max-width: 400px; + } + &__page-thematic-title { + @apply text-xl uppercase font-bold tracking-wider pb-4; + } + &__page-title { + @apply text-4xl font-bold; + } + &__infos { + @apply max-w-2xl; + + .cta { + @apply my-8; + } + } +} diff --git a/template-components/posts-components/chapter-header.php b/template-components/posts-components/chapter-header.php new file mode 100644 index 0000000..8bcb234 --- /dev/null +++ b/template-components/posts-components/chapter-header.php @@ -0,0 +1,42 @@ +ID, 'thematiques')[0] ?? null; +$thematique_generale = $args['thematique_generale']; +$thematique_generale_id_fr = apply_filters('wpml_object_id', $thematique_generale->term_id, 'thematiques', TRUE, 'fr'); + + +// Récupère la source de l'image par rapport à l'ID FR pour s'assurer de bien synchroniser les images dans les deux langues +$thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale_id_fr)['illustration_s'] ?? null; +$lastUpdate = get_the_modified_date('', get_the_ID()); + +echo '
    ';
    +print_r($questions->posts);
    +echo '
    '; + +?> + + +
    +
    + +

    ">

    + + + '; + // print_r($args['title']); + // print_r("YOOOOOO"); + // echo '
    '; + + ?> +

    + + + + + + + \ No newline at end of file diff --git a/template-publications.php b/template-publications.php index 75475c1..e94ab44 100644 --- a/template-publications.php +++ b/template-publications.php @@ -1,5 +1,7 @@