From 1b6e90856b4ce31ce4c6ac57b158225f477d89ec Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 19 Jul 2023 11:40:26 +0200 Subject: [PATCH] =?UTF-8?q?refining=20accessibility=20=E2=80=94=20starting?= =?UTF-8?q?=20on=20conseils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.php | 13 +- comments.php | 74 ------ css/app.css | 224 +++++++++++------- css/editor-style.css | 35 ++- footer.php | 4 +- functions.php | 1 + header.php | 2 +- includes/admin.php | 34 ++- includes/init.php | 23 +- includes/post_types.php | 18 +- includes/shortcuts/shortcuts.php | 102 ++++---- includes/taxonomy.php | 66 +++--- includes/templates.php | 13 + includes/utilities.php | 2 + includes/widget.php | 22 +- js/app.js | 114 ++++++--- resources/css/app.css | 2 +- resources/css/base/generalites.css | 1 - resources/css/layout/menu-homegrade.css | 31 +-- resources/css/layout/menu-renovateur.css | 8 +- .../graphic-assets/icone-external-link.svg | 2 +- resources/js/header.js | 182 ++++++++++---- searchform.php | 4 +- single.php | 19 +- .../aides-financieres/aides-financieres.php | 6 +- .../demarches-administratives.php | 4 +- .../home/latest-news/latest-news.php | 2 +- .../questions-frequentes.php | 4 +- .../home/show-thematiques/block.json | 3 +- .../show-thematiques/show-thematiques.css | 12 +- .../home/show-thematiques/show-thematiques.js | 81 +++++-- .../show-thematiques/show-thematiques.php | 22 +- template-blocks/home/show-thematiques/test.js | 1 - .../card-frequent-question.php | 8 +- .../card-news.css | 5 +- template-components/card-news.php | 14 +- template-components/card-thematique.php | 3 +- template-components/content-single.php | 26 +- template-components/content.php | 18 +- .../header/menu-renovateur.php | 34 +-- .../header/menu-renovateur_old.php | 59 ----- template-components/header/search-module.php | 1 - 42 files changed, 737 insertions(+), 562 deletions(-) delete mode 100644 comments.php create mode 100644 includes/templates.php delete mode 100644 template-blocks/home/show-thematiques/test.js rename resources/css/components/card-post.css => template-components/card-news.css (80%) delete mode 100644 template-components/header/menu-renovateur_old.php diff --git a/404.php b/404.php index 91a9ff1..dc1e221 100644 --- a/404.php +++ b/404.php @@ -1,24 +1,27 @@ class="no-js"> + - + +
404
-

- - +

+
+
- + + \ No newline at end of file diff --git a/comments.php b/comments.php deleted file mode 100644 index fef6856..0000000 --- a/comments.php +++ /dev/null @@ -1,74 +0,0 @@ - - -
- - -

- -

- -
    - 'ol', - 'short_ping' => true, - 'avatar_size' => 56, - ) - ); - ?> -
- - - - 1 && get_option( 'page_comments' ) ) : ?> - - - - - - -

- - - 'bg-primary text-white cursor-pointer rounded font-bold py-2 px-4', - 'comment_field' => '', - ) - ); - ?> - -
diff --git a/css/app.css b/css/app.css index 08d9180..31b7d6a 100644 --- a/css/app.css +++ b/css/app.css @@ -597,6 +597,18 @@ video { } } +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + .m-8 { margin: 2rem; } @@ -606,16 +618,16 @@ video { margin-bottom: 0.75rem; } -.my-8 { - margin-top: 2rem; - margin-bottom: 2rem; -} - .mx-auto { margin-left: auto; margin-right: auto; } +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem; +} + .mb-8 { margin-bottom: 2rem; } @@ -668,10 +680,6 @@ video { flex-grow: 1; } -.cursor-pointer { - cursor: pointer; -} - .flex-col { flex-direction: column; } @@ -780,11 +788,6 @@ video { padding-bottom: 0.5rem; } -.px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} - .py-12 { padding-top: 3rem; padding-bottom: 3rem; @@ -818,10 +821,6 @@ video { font-weight: 300; } -.font-bold { - font-weight: 700; -} - .font-extrabold { font-weight: 800; } @@ -1359,55 +1358,6 @@ button:focus { hue-rotate(263deg) brightness(99%) contrast(96%); } -.card-post { - position: relative; - border-radius: 1.5rem; - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.card-post__thumbnail { - height: 190px; - border-top-left-radius: 1.5rem; - border-top-right-radius: 1.5rem; - -o-object-fit: cover; - object-fit: cover; -} - -.card-post__inner { - height: 100%; - padding: 2rem; -} - -.card-post__tag { - margin-bottom: 1rem; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - border-radius: 0.75rem; - --tw-bg-opacity: 1; - background-color: rgb(255 237 236 / var(--tw-bg-opacity)); - padding-left: 1rem; - padding-right: 1rem; - padding-top: 0.25rem; - padding-bottom: 0.25rem; - --tw-text-opacity: 1; - color: rgb(223 30 30 / var(--tw-text-opacity)); -} - -.card-post__title { - margin-bottom: 1rem; - font-size: 1.5rem; - line-height: 2rem; - font-weight: 700; - --tw-text-opacity: 1; - color: rgb(223 30 30 / var(--tw-text-opacity)); - line-height: 1.1; -} - .card-large-content-container { display: flex; flex-direction: column; @@ -1654,6 +1604,60 @@ button:focus { text-underline-offset: 4px; } +.card-news { + position: relative; + border-radius: 1.5rem; + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity)); + --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.card-news__thumbnail { + height: 190px; + border-top-left-radius: 1.5rem; + border-top-right-radius: 1.5rem; + -o-object-fit: cover; + object-fit: cover; +} + +.card-news__inner { + height: 100%; + padding: 2rem; +} + +.card-news__heading { + display: flex; + flex-direction: column-reverse; +} + +.card-news__tag { + margin-bottom: 1rem; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; + border-radius: 0.75rem; + --tw-bg-opacity: 1; + background-color: rgb(255 237 236 / var(--tw-bg-opacity)); + padding-left: 1rem; + padding-right: 1rem; + padding-top: 0.25rem; + padding-bottom: 0.25rem; + --tw-text-opacity: 1; + color: rgb(223 30 30 / var(--tw-text-opacity)); +} + +.card-news__title { + margin-bottom: 1rem; + font-size: 1.5rem; + line-height: 2rem; + font-weight: 700; + --tw-text-opacity: 1; + color: rgb(223 30 30 / var(--tw-text-opacity)); + line-height: 1.1; +} + .card-frequent-question { position: relative; border-radius: 1.5rem; @@ -2070,6 +2074,13 @@ article > *:not(.entry-content), } } +.menu-renovateur .website_logo a:focus img { + outline: red solid 1px; + outline-width: 1px; + outline-offset: 8px; + outline-radius: 50px; +} + /* &__main-elements { @apply w-full bg-red-200 flex justify-between items-center; } */ @@ -2286,20 +2297,20 @@ article > *:not(.entry-content), transition: all 0.3s ease-in-out; } -.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon { +.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon { position: relative; } -.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--top { +.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--top { top: 50%; transform: translateY(-50%) rotate(45deg); } -.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--middle { +.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--middle { opacity: 0; } -.menu-renovateur__mobile-menu-toggle[aria-expanded] .toggle-icon__bar--bottom { +.menu-renovateur__mobile-menu-toggle[aria-expanded='true'] .toggle-icon__bar--bottom { top: 50%; transform: translateY(-50%) rotate(-45deg); } @@ -2474,8 +2485,11 @@ article > *:not(.entry-content), .menu-homegrade .sub-menu { position: static; + bottom: 0px; margin-left: auto; margin-right: auto; + --tw-translate-y: 100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); --tw-bg-opacity: 1; background-color: rgb(47 1 84 / var(--tw-bg-opacity)); padding: 1.5rem; @@ -2569,21 +2583,25 @@ article > *:not(.entry-content), } .menu-homegrade__navlist li.menu-item:hover, + .menu-homegrade__navlist li.menu-item button:focus, .menu-homegrade__navlist li.menu-item a:focus { cursor: pointer; background-color: rgba(255, 255, 255, 0.1); } -.menu-homegrade__navlist li.menu-item a:focus { +.menu-homegrade__navlist li.menu-item button:focus, + .menu-homegrade__navlist li.menu-item a:focus { + border-radius: 0.375rem; text-decoration: none; + outline: 1px solid rgba(255, 255, 255, 0.8); + outline-offset: 8px; } /* IF SUBMENU CHILD */ -.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:hover, +.menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:hover, .menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:focus { - --tw-text-opacity: 1; - color: rgb(223 30 30 / var(--tw-text-opacity)); + /* @apply text-secondary; */ } .menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle { @@ -2592,27 +2610,23 @@ article > *:not(.entry-content), } .menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle:after { - right: 0px; - content: '▼'; - position: absolute; + content: ''; display: inline-block; - line-height: 0.5; - height: 10px; - top: calc(50% - 4px); - width: 10px; - margin-left: 20px; - transform-origin: center; - background-repeat: no-repeat; - background-size: contain; transition: all 0.3s ease-out; + border-bottom: 2px solid white; + border-right: 2px solid white; + height: 10px; + width: 10px; + margin-left: 10px; } .menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle[aria-expanded='false']:after { - transform: rotate(0deg); + transform: translateY(-20%) rotate(45deg); } .menu-homegrade__navlist li.menu-item .menu-item__submenu-toggle[aria-expanded='true']:after { - transform: rotate(180deg); + /* transform: rotate(225deg); */ + transform: translateY(40%) rotate(225deg); } .menu-homegrade__burger-menu-toggle { @@ -3048,10 +3062,18 @@ article > *:not(.entry-content), .swiper-wrapper { width: 100%; + flex-direction: column; + row-gap: 5rem; padding-top: 6rem; padding-bottom: 4rem; } +@media (min-width: 960px) { + .swiper-wrapper { + flex-direction: row; + } +} + .swiper-slide .card-thematique { height: 100%; } @@ -3061,7 +3083,19 @@ article > *:not(.entry-content), position: absolute; top: 50%; z-index: 50; + display: none; opacity: 0.8; +} + +@media (min-width: 960px) { + .thematique-button-next, +.thematique-button-prev { + display: block; + } +} + +.thematique-button-next, +.thematique-button-prev { width: 60px; height: 60px; } @@ -3071,8 +3105,8 @@ article > *:not(.entry-content), .thematique-button-prev:hover, .thematique-button-prev:focus { opacity: 1; - filter: invert(13%) sepia(71%) saturate(4425%) - hue-rotate(338deg) brightness(109%) contrast(117%); + filter: invert(13%) sepia(71%) saturate(4425%) hue-rotate(338deg) brightness(109%) + contrast(117%); } .thematique-button-next:focus, .thematique-button-prev:focus { @@ -3088,6 +3122,16 @@ article > *:not(.entry-content), left: 0px; } +.swiper-pagination { + display: none; +} + +@media (min-width: 960px) { + .swiper-pagination { + display: block; + } +} + .swiper-pagination-bullet { margin-left: 0.5rem; margin-right: 0.5rem; diff --git a/css/editor-style.css b/css/editor-style.css index 1452ff0..7d017bd 100644 --- a/css/editor-style.css +++ b/css/editor-style.css @@ -44,6 +44,18 @@ } } +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0 +} + .m-8 { margin: 2rem } @@ -53,16 +65,16 @@ margin-bottom: 0.75rem } -.my-8 { - margin-top: 2rem; - margin-bottom: 2rem -} - .mx-auto { margin-left: auto; margin-right: auto } +.my-8 { + margin-top: 2rem; + margin-bottom: 2rem +} + .mb-8 { margin-bottom: 2rem } @@ -115,10 +127,6 @@ flex-grow: 1 } -.cursor-pointer { - cursor: pointer -} - .flex-col { flex-direction: column } @@ -227,11 +235,6 @@ padding-bottom: 0.5rem } -.px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem -} - .py-12 { padding-top: 3rem; padding-bottom: 3rem @@ -265,10 +268,6 @@ font-weight: 300 } -.font-bold { - font-weight: 700 -} - .font-extrabold { font-weight: 800 } diff --git a/footer.php b/footer.php index a1dbfcb..7f4026e 100644 --- a/footer.php +++ b/footer.php @@ -68,10 +68,10 @@ ?> Plan du site
- " href=""> + " href=""> - " href=""> + " href=""> diff --git a/functions.php b/functions.php index 67cf002..c4ec850 100644 --- a/functions.php +++ b/functions.php @@ -10,6 +10,7 @@ require_once(__DIR__ . '/includes/logos.php'); require_once(__DIR__ . '/includes/taxonomy.php'); require_once(__DIR__ . '/includes/utilities.php'); require_once(__DIR__ . '/includes/navwalker.php'); +require_once(__DIR__ . '/includes/templates.php'); // require_once(__DIR__ . '/includes/widget.php'); // require_once( __DIR__ . '/includes/logos.php'); \ No newline at end of file diff --git a/header.php b/header.php index 8073204..36a3f64 100644 --- a/header.php +++ b/header.php @@ -18,7 +18,7 @@