Compare commits

...

10 Commits

Author SHA1 Message Date
fb3a366421 REFactor archive templates: create new 'archive-dbmob.php' for dbmod post type, remove old 'archive-dbmod.php', and update content structure in 'content-dbmod.php' for improved layout and data presentation. 2025-05-12 16:58:48 +02:00
1063ed8cd1 STYLE Update app.css: add Google Fonts import, refine CSS selectors, and enhance utility classes for improved layout and typography consistency. 2025-05-12 16:58:35 +02:00
d7961e83cd STYLE Add utilities file: create a new 'utilities.php' file for utility functions to enhance code organization and maintainability. 2025-05-12 16:57:12 +02:00
9a69cf632a STYLE Refactor footer structure: streamline action hooks, switch to blog 1 for footer template inclusion, and enhance code clarity. 2025-05-12 16:57:03 +02:00
1a3d61eb8a STYLE Refactor menu item button function: rename function to 'dynamiques_wrap_parent_menu_item_buttons', update theme location check from 'renovateur' to 'primary', and remove unused code for improved clarity and functionality. 2025-05-12 16:56:57 +02:00
18e5f76288 STYLE Update login styles: change button and link colors to a new shade of teal for improved visual consistency. 2025-05-12 16:56:49 +02:00
1670da7cd1 STYLE Update function includes: replace 'blocks.php' with 'columns.php' and comment out unused includes for better organization and future implementation. 2025-05-12 16:52:47 +02:00
7165ed8ade STYLE Enhance editor styles: add new utility classes for layout, spacing, and typography, including grid and flex properties, and update color variables for consistency. 2025-05-12 16:52:40 +02:00
eaff2c2769 STYLE Add button styles: create a new CSS file for button link styles with border radius and Tailwind utility classes. 2025-05-12 16:52:32 +02:00
9c299e610c STYLE Refactor taxonomy registration: comment out existing taxonomy functions and add new custom taxonomy structure for future implementation. 2025-05-12 16:52:26 +02:00
13 changed files with 645 additions and 666 deletions

49
archive-dbmob.php Normal file
View File

@ -0,0 +1,49 @@
<?php
/**
* The template for displaying archive pages for the dbmod post type
*/
get_header(); ?>
<div class="archive-dbmob">
<div class="container">
<div class="page-heading">
<h1>
<span class="acronyme">DBMOB</span>
<span class="explanation"> Dictionnaire biographique du mouvement ouvrier en Belgique</span>
</h1>
<p>Découvrez notre rôle au sein du projet DBMOB et explorez les notices biographiques réalisées par léquipe du CARHOP. Ces portraits de militant·e·s retracent leurs engagements et contributions. </p>
</div>
<div class="post-grid">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('template-parts/content', 'dbmod'); ?>
<?php endwhile; ?>
</div>
<div class="pagination">
<?php
the_posts_pagination(array(
'mid_size' => 2,
'prev_text' => __('Précédent', 'carhop'),
'next_text' => __('Suivant', 'carhop'),
));
?>
</div>
<?php else : ?>
<div class="col-12">
<?php get_template_part('template-parts/content', 'none'); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>

View File

@ -1,42 +0,0 @@
<?php
/**
* The template for displaying archive pages for the dbmod post type
*/
get_header(); ?>
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="archive-title"><?php echo post_type_archive_title('', false); ?></h1>
</div>
</div>
<div class="row">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="col-md-4 mb-4">
<?php get_template_part('template-parts/content', 'dbmod'); ?>
</div>
<?php endwhile; ?>
<div class="col-12">
<?php
the_posts_pagination(array(
'mid_size' => 2,
'prev_text' => __('Précédent', 'carhop'),
'next_text' => __('Suivant', 'carhop'),
));
?>
</div>
<?php else : ?>
<div class="col-12">
<?php get_template_part('template-parts/content', 'none'); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>

View File

@ -1,3 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Fjalla+One&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');
/*
! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com
*/
@ -597,6 +599,10 @@ video {
}
}
.relative{
position: relative;
}
.m-8{
margin: 2rem;
}
@ -632,10 +638,22 @@ video {
margin-bottom: 0.25rem;
}
.mb-2{
margin-bottom: 0.5rem;
}
.mt-8{
margin-top: 2rem;
}
.mb-12{
margin-bottom: 3rem;
}
.block{
display: block;
}
.inline-block{
display: inline-block;
}
@ -644,6 +662,10 @@ video {
display: flex;
}
.grid{
display: grid;
}
.h-1{
height: 0.25rem;
}
@ -652,6 +674,10 @@ video {
height: 1.5rem;
}
.h-48{
height: 12rem;
}
.min-h-screen{
min-height: 100vh;
}
@ -684,6 +710,10 @@ video {
cursor: pointer;
}
.grid-cols-1{
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.flex-col{
flex-direction: column;
}
@ -700,10 +730,22 @@ video {
justify-content: space-between;
}
.gap-6{
gap: 1.5rem;
}
.overflow-hidden{
overflow: hidden;
}
.rounded{
border-radius: 0.25rem;
}
.rounded-lg{
border-radius: 0.5rem;
}
.border{
border-width: 1px;
}
@ -714,12 +756,17 @@ video {
.border-primary{
--tw-border-opacity: 1;
border-color: rgb(64 79 142 / var(--tw-border-opacity));
border-color: rgb(19 111 99 / var(--tw-border-opacity));
}
.border-red-400{
--tw-border-opacity: 1;
border-color: rgb(248 113 113 / var(--tw-border-opacity));
}
.bg-primary{
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity));
background-color: rgb(19 111 99 / var(--tw-bg-opacity));
}
.bg-gray-200{
@ -732,14 +779,19 @@ video {
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
}
.bg-red-100{
--tw-bg-opacity: 1;
background-color: rgb(254 226 226 / var(--tw-bg-opacity));
}
.bg-white{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.bg-red-500 {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
.object-cover{
-o-object-fit: cover;
object-fit: cover;
}
.p-4{
@ -771,8 +823,14 @@ video {
padding-bottom: 1.5rem;
}
.text-center {
text-align: center;
.py-8{
padding-top: 2rem;
padding-bottom: 2rem;
}
.py-3{
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.text-5xl{
@ -795,6 +853,15 @@ video {
line-height: 1.25rem;
}
.text-3xl{
font-size: 1.875rem;
line-height: 2.25rem;
}
.text-xl{
font-size: 1.25rem;
}
.font-light{
font-weight: 300;
}
@ -807,6 +874,10 @@ video {
font-weight: 800;
}
.font-semibold{
font-weight: 600;
}
.uppercase{
text-transform: uppercase;
}
@ -825,16 +896,6 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity));
}
.text-gray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
}
.text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
.text-gray-600{
--tw-text-opacity: 1;
color: rgb(75 85 99 / var(--tw-text-opacity));
@ -845,11 +906,22 @@ video {
color: rgb(55 65 81 / var(--tw-text-opacity));
}
.text-red-700{
--tw-text-opacity: 1;
color: rgb(185 28 28 / var(--tw-text-opacity));
}
.antialiased{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.shadow-md{
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.alignfull{
margin: 2rem calc(50% - 50vw) !important;
max-width: 100vw !important;
@ -911,429 +983,239 @@ video {
/* ########### BASE ############ */
body {
font-family: 'Nunito Sans', sans-serif;
--tw-text-opacity: 1;
color: rgb(19 111 99 / var(--tw-text-opacity));
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Fjalla One', sans-serif;
--tw-text-opacity: 1;
color: rgb(19 111 99 / var(--tw-text-opacity));
}
h1{
font-size: 3.75rem;
line-height: 1;
}
h2{
font-size: 3rem;
line-height: 1;
}
body.wp-admin h1:not(.editor-visual-editor h1),
body.wp-admin h2:not(.editor-visual-editor h2),
body.wp-admin h3:not(.editor-visual-editor h3),
body.wp-admin h4:not(.editor-visual-editor h4),
body.wp-admin h5:not(.editor-visual-editor h5),
body.wp-admin h6:not(.editor-visual-editor h6) {
font-family: unset !important;
font-style: unset !important;
font-size: unset !important;
line-height: unset !important;
letter-spacing: unset !important;
text-transform: unset !important;
text-align: unset !important;
}
.nunito {
font-family: 'Nunito Sans', sans-serif;
}
.fjalla {
font-family: 'Fjalla One', sans-serif;
}
/* @import './base/base.css';
@import './base/buttons.css'; */
/* ########### COMPONENTS ############ */
.post-card-dbmod__title{
font-size: 1.5rem;
line-height: 2rem;
font-weight: 700;
}
.post-card-dbmod__details{
font-size: 0.875rem;
line-height: 1.25rem;
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity));
}
.latest-news-swiper {
padding: 20px 40px;
}
.news-card{
border-width: 1px;
--tw-border-opacity: 1;
border-color: rgb(19 111 99 / var(--tw-border-opacity));
}
.news-image img {
width: 100%;
height: 200px;
-o-object-fit: cover;
object-fit: cover;
}
.news-content {
padding: 15px;
}
.news-content h3 {
margin: 0 0 10px;
font-size: 1.2em;
}
.news-excerpt {
font-size: 0.9em;
color: #666;
}
/* @import './components/tag-list.css'; */
/* ########### LAYOUT ############ */
.primary-menu-container {
position: relative;
margin-left: auto;
margin-right: auto;
margin-top: 0px;
margin-bottom: 0px;
height: -webkit-fit-content;
height: -moz-fit-content;
height: fit-content;
/* @import './layout/nav.css';
@import './layout/footer.css';
@import './layout/section.css';
@import './layout/gutenberg.css'; */
/* ########### PAGES ############ */
/* @import './pages/archive-dbmob.css'; */
/* ########### BLOCKS ############ */
/* @import './blocks/front-header.css';
@import './blocks/chapter-section.css'; */
/* @import './blocks/dernieres-dynamiques.css'; */
.explore-tags{
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity));
padding-top: 2rem;
padding-bottom: 2rem;
padding-left: 2rem;
padding-right: 2rem;
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}
@media (min-width: 1440px) {
.primary-menu-container {
padding-left: 8rem;
padding-right: 8rem;
}
}
.primary-menu-container nav#primary-menu-nav {
margin-left: auto;
margin-right: auto;
width: 100%;
max-width: 1440px;
}
.primary-menu-container .logo {
margin-right: 3rem;
width: 190px;
background-color: rgb(239 232 255 / var(--tw-bg-opacity));
padding-top: 6rem;
padding-bottom: 6rem;
padding-left: 3rem;
padding-right: 3rem;
}
@media (min-width: 1280px){
.primary-menu-container .logo {
width: 222px;
}
}
.primary-menu-container #primary-menu {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
@media (min-width: 960px) {
.primary-menu-container #primary-menu {
flex-direction: row;
justify-content: space-between;
}
}
.primary-menu-container #primary-menu ul {
-moz-column-gap: 0.5rem;
column-gap: 0.5rem;
padding-right: 0px;
}
@media (min-width: 960px) {
.primary-menu-container #primary-menu ul {
display: flex;
-moz-column-gap: 1rem;
column-gap: 1rem;
padding-right: 1rem;
}
}
@media (min-width: 1280px) {
.primary-menu-container #primary-menu ul {
-moz-column-gap: 2rem;
column-gap: 2rem;
.explore-tags{
padding-left: 6rem;
padding-right: 6rem;
}
}
/* Highlight using list element */
.primary-menu-container #primary-menu li.current-page-parent > a,
.primary-menu-container #primary-menu li.current_page_item > a {
font-weight: 500;
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline;
text-decoration-line: underline;
-webkit-text-decoration-color: #14B8A6;
text-decoration-color: #14B8A6;
text-underline-offset: 8px;
}
.primary-menu-container #primary-menu li.menu-item {
text-align: center;
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 500;
}
.primary-menu-container #primary-menu li.menu-item:hover > a,
.primary-menu-container #primary-menu li.menu-item a:focus {
cursor: pointer;
--tw-text-opacity: 1;
color: rgb(20 184 166 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline;
text-decoration-line: underline;
text-underline-offset: 8px;
}
.primary-menu-container #primary-menu li.menu-item a:focus {
text-decoration: none;
}
/* IF SUBMENU CHILD */
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle:hover,
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle:focus {
--tw-text-opacity: 1;
color: rgb(20 184 166 / var(--tw-text-opacity));
}
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle {
position: relative;
padding-right: 1rem;
}
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle:after {
right: 0px;
content: '▼';
position: absolute;
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;
}
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle[aria-expanded='false']:after {
transform: rotate(0deg);
}
.primary-menu-container #primary-menu li.menu-item .menu-item-submenu-toggle[aria-expanded='true']:after {
transform: rotate(180deg);
}
@media (min-width: 960px) {
.primary-menu-container #primary-menu li.menu-item.menu-item-has-children:hover .menu-item-submenu-toggle:after {
transform: rotate(180deg);
}
.primary-menu-container #primary-menu li.menu-item.menu-item-has-children:hover .sub-menu {
display: block;
}
}
/* submenus */
.primary-menu-container #primary-menu li .sub-menu {
position: static;
.explore-tags .inner{
margin-left: auto;
margin-right: auto;
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity));
padding: 1.5rem;
max-width: 1440px;
display: flex;
gap: 4rem;
}
@media (min-width: 960px) {
.primary-menu-container #primary-menu li .sub-menu {
position: absolute;
margin-left: 0px;
margin-right: 0px;
@media (min-width: 1280px){
.explore-tags .inner{
gap: 8rem;
}
}
.primary-menu-container #primary-menu li .sub-menu {
z-index: 999;
display: none;
.explore-tags__title{
margin-bottom: 1.5rem;
font-size: 1rem;
line-height: 1.5rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: 'Nunito Sans', sans-serif;
}
.primary-menu-container #primary-menu li .sub-menu.sub-menu-open {
display: block;
.explore-tags__subtitle{
font-size: 3rem;
line-height: 1;
font-weight: 400;
text-transform: uppercase;
}
.primary-menu-container #primary-menu li .sub-menu li {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
.explore-tags .tag-list{
display: flex;
flex-wrap: wrap;
gap: 2rem;
}
@media (min-width: 960px) {
.primary-menu-container #primary-menu li .sub-menu li {
text-align: left;
}
}
.primary-menu-container #primary-menu li .sub-menu > a::after {
transform: translateY(-2px) rotate(-90deg);
content: '';
display: inline-block;
height: 10px;
width: 10px;
margin-left: 20px;
background-image: url('../resources/img/arrow_down_white.svg');
background-repeat: no-repeat;
background-size: contain;
transition: all 0.3s ease-out;
}
button#burger-menu-toggle {
position: absolute;
right: 2.5rem;
top: 50%;
z-index: 50;
--tw-translate-y: -50%;
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));
}
@media (min-width: 960px) {
button#burger-menu-toggle {
display: none;
}
}
button#burger-menu-toggle {
width: 26px;
height: 26px;
}
button#burger-menu-toggle .menu-toggle-bar {
position: absolute;
top: 50%;
right: 0px;
display: block;
height: 2px;
width: 100%;
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
margin-top: -1px;
transition: all 0.3s ease;
}
button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--top {
transform: translate(0, -7px);
}
button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--middle {
}
button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--bottom {
transform: translate(0, 7px);
}
.nav-open button#burger-menu-toggle .menu-toggle-bar {
--tw-bg-opacity: 1;
background-color: rgb(20 184 166 / var(--tw-bg-opacity));
}
.nav-open button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--top {
transform: translate(0, 0) rotate(45deg);
}
.nav-open button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--middle {
opacity: 0;
}
.nav-open button#burger-menu-toggle .menu-toggle-bar.menu-toggle-bar--bottom {
transform: translate(0, 0) rotate(-45deg);
}
button#burger-menu-toggle:hover path {
fill: #14B8A6;
}
/* RESPONSIVE */
@media (max-width: 960px) {
.primary-menu-container #primary-menu {
position: absolute;
left: 0px;
z-index: 40;
margin-top: 0px;
display: none;
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity));
/* transition: all 0.3s ease-out;
transform: translateY(-120vh); */
min-height: 100vh;
.explore-tags .tag-list__tag{
display: flex;
height: -webkit-fit-content;
height: -moz-fit-content;
height: fit-content;
top: 0;
width: 100vw;
}
/* Rendu conditionnel de l'élément si contenu dans une classe de parent (nesting inversé) */
.nav-open .primary-menu-container #primary-menu {
display: flex;
}
.primary-menu-container #primary-menu > ul {
margin-left: auto;
margin-right: auto;
max-width: 20rem;
/* min-height: 96vh; */
padding-top: 5vh;
}
.primary-menu-container #primary-menu li.menu-item {
margin-top: 0px;
display: block !important;
padding-top: 2rem;
padding-bottom: 2rem;
padding-bottom: 0px;
text-align: center;
align-items: center;
gap: 0.5rem;
border-width: 1px;
--tw-border-opacity: 1;
border-color: rgb(19 111 99 / var(--tw-border-opacity));
padding: 1rem;
font-size: 1.125rem;
line-height: 1.75rem;
font-weight: 500;
font-weight: 700;
}
.explore-tags .tag-list__tag svg {
transition: transform 0.3s ease-in-out;
height: 2rem;
width: 2rem;
}
.explore-tags .tag-list__tag svg circle{
fill: #136F63;
stroke: transparent;
}
.explore-tags .tag-list__tag svg path{
stroke: #fff;
}
.explore-tags .tag-list__tag:hover{
border-style: none;
--tw-bg-opacity: 1;
background-color: rgb(19 111 99 / var(--tw-bg-opacity));
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}
.primary-menu-container #primary-menu li.menu-item .sub-menu li {
font-size: 0.875rem;
line-height: 1.25rem;
.explore-tags .tag-list__tag:hover svg {
transform: rotate(90deg);
}
/* BURGER MENU */
body:has(.nav-open) {
max-height: 100vh;
overflow: hidden;
/* #content,
footer,
.wpml-ls-statics-footer {
@apply !hidden;
} */
.explore-tags .tag-list__tag:hover svg circle{
fill: #fff;
}
.cta_plain_secondary,
.switch_language {
/* @apply self-end; */
.explore-tags .tag-list__tag:hover svg path{
stroke: #136F63;
}
}
@media (max-width: 960px) and (hover: none) {
/* ul {
@apply w-max mx-auto;
} */
.primary-menu-container li.menu-item {
margin-left: auto;
margin-right: auto;
}
}
article > *:not(.entry-content),
.entry-content > * {
margin-left: auto;
margin-right: auto;
max-width: 960px;
}
.entry-content h1, .block-editor-block-list__layout h1 {
font-size: 1.5rem;
line-height: 2rem;
}
.entry-content h2, .block-editor-block-list__layout h2 {
font-size: 1.25rem;
}
.entry-content h3, .block-editor-block-list__layout h3 {
font-size: 1.125rem;
line-height: 1.75rem;
}
.entry-content p a, .entry-content ul a, .entry-content ol a, .block-editor-block-list__layout p a, .block-editor-block-list__layout ul a, .block-editor-block-list__layout ol a {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity));
-webkit-text-decoration-line: underline;
text-decoration-line: underline;
}
.entry-content p a:hover, .entry-content ul a:hover, .entry-content ol a:hover, .block-editor-block-list__layout p a:hover, .block-editor-block-list__layout ul a:hover, .block-editor-block-list__layout ol a:hover {
-webkit-text-decoration-line: none;
text-decoration-line: none;
}
.entry-content p,
.entry-content ul,
.entry-content ol,
.block-editor-block-list__layout p,
.block-editor-block-list__layout ul,
.block-editor-block-list__layout ol {
margin-bottom: 2rem;
}
.entry-content ul:not(.block-editor-block-variation-picker__variations) li, .block-editor-block-list__layout ul:not(.block-editor-block-variation-picker__variations) li {
list-style-position: inside;
list-style-type: disc;
}
.entry-content ol li, .block-editor-block-list__layout ol li {
list-style-position: inside;
list-style-type: decimal;
}
/* ########### BLOCKS ############ */
/* Home */
/* @import '../../template-blocks/home/home-header/home-header.css'; */
@media (min-width: 600px){
.sm\:inline{
display: inline;
}
}
@media (min-width: 782px){
.md\:my-6{
margin-top: 1.5rem;
@ -1348,6 +1230,10 @@ article > *:not(.entry-content),
width: 50%;
}
.md\:grid-cols-2{
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.md\:text-3xl{
font-size: 1.875rem;
line-height: 2.25rem;
@ -1381,6 +1267,10 @@ article > *:not(.entry-content),
display: none;
}
.lg\:grid-cols-3{
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lg\:items-center{
align-items: center;
}

View File

@ -44,6 +44,10 @@
}
}
.relative {
position: relative
}
.m-8 {
margin: 2rem
}
@ -79,10 +83,22 @@
margin-bottom: 0.25rem
}
.mb-2 {
margin-bottom: 0.5rem
}
.mt-8 {
margin-top: 2rem
}
.mb-12 {
margin-bottom: 3rem
}
.block {
display: block
}
.inline-block {
display: inline-block
}
@ -91,6 +107,10 @@
display: flex
}
.grid {
display: grid
}
.h-1 {
height: 0.25rem
}
@ -99,6 +119,10 @@
height: 1.5rem
}
.h-48 {
height: 12rem
}
.min-h-screen {
min-height: 100vh
}
@ -131,12 +155,8 @@
cursor: pointer
}
.list-disc {
list-style-type: disc
}
.list-decimal {
list-style-type: decimal
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr))
}
.flex-col {
@ -155,10 +175,22 @@
justify-content: space-between
}
.gap-6 {
gap: 1.5rem
}
.overflow-hidden {
overflow: hidden
}
.rounded {
border-radius: 0.25rem
}
.rounded-lg {
border-radius: 0.5rem
}
.border {
border-width: 1px
}
@ -169,12 +201,17 @@
.border-primary {
--tw-border-opacity: 1;
border-color: rgb(64 79 142 / var(--tw-border-opacity))
border-color: rgb(19 111 99 / var(--tw-border-opacity))
}
.border-red-400 {
--tw-border-opacity: 1;
border-color: rgb(248 113 113 / var(--tw-border-opacity))
}
.bg-primary {
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity))
background-color: rgb(19 111 99 / var(--tw-bg-opacity))
}
.bg-gray-200 {
@ -187,14 +224,19 @@
background-color: rgb(249 250 251 / var(--tw-bg-opacity))
}
.bg-red-100 {
--tw-bg-opacity: 1;
background-color: rgb(254 226 226 / var(--tw-bg-opacity))
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity))
}
.bg-red-500 {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity))
.object-cover {
-o-object-fit: cover;
object-fit: cover
}
.p-4 {
@ -226,8 +268,14 @@
padding-bottom: 1.5rem
}
.text-center {
text-align: center
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem
}
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem
}
.text-5xl {
@ -250,6 +298,15 @@
line-height: 1.25rem
}
.text-3xl {
font-size: 1.875rem;
line-height: 2.25rem
}
.text-xl {
font-size: 1.25rem
}
.font-light {
font-weight: 300
}
@ -262,6 +319,10 @@
font-weight: 800
}
.font-semibold {
font-weight: 600
}
.uppercase {
text-transform: uppercase
}
@ -280,16 +341,6 @@
color: rgb(255 255 255 / var(--tw-text-opacity))
}
.text-gray-500 {
--tw-text-opacity: 1;
color: rgb(107 114 128 / var(--tw-text-opacity))
}
.text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity))
}
.text-gray-600 {
--tw-text-opacity: 1;
color: rgb(75 85 99 / var(--tw-text-opacity))
@ -300,14 +351,9 @@
color: rgb(55 65 81 / var(--tw-text-opacity))
}
.text-blue-500 {
.text-red-700 {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity))
}
.underline {
-webkit-text-decoration-line: underline;
text-decoration-line: underline
color: rgb(185 28 28 / var(--tw-text-opacity))
}
.antialiased {
@ -315,6 +361,12 @@
-moz-osx-font-smoothing: grayscale
}
.shadow-md {
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
}
.alignfull {
margin: 2rem calc(50% - 50vw) !important;
max-width: 100vw !important;
@ -404,6 +456,12 @@ body {
max-width: 782px
}
@media (min-width: 600px) {
.sm\:inline {
display: inline
}
}
@media (min-width: 782px) {
.md\:my-6 {
margin-top: 1.5rem;
@ -418,6 +476,10 @@ body {
width: 50%
}
.md\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr))
}
.md\:text-3xl {
font-size: 1.875rem;
line-height: 2.25rem
@ -451,6 +513,10 @@ body {
display: none
}
.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr))
}
.lg\:items-center {
align-items: center
}

View File

@ -14,16 +14,16 @@ body {
#wp-submit {
--tw-border-opacity: 1;
border-color: rgb(64 79 142 / var(--tw-border-opacity));
border-color: rgb(19 111 99 / var(--tw-border-opacity));
--tw-bg-opacity: 1;
background-color: rgb(64 79 142 / var(--tw-bg-opacity));
background-color: rgb(19 111 99 / var(--tw-bg-opacity));
}
#nav a,
#backtoblog a {
/* color: var(--red) !important; */
--tw-text-opacity: 1;
color: rgb(64 79 142 / var(--tw-text-opacity));
color: rgb(19 111 99 / var(--tw-text-opacity));
}
#loginform {
@ -32,6 +32,6 @@ body {
.wp-pwd span {
--tw-text-opacity: 1;
color: rgb(64 79 142 / var(--tw-text-opacity));
color: rgb(19 111 99 / var(--tw-text-opacity));
/* color: var(--red) !important; */
}

View File

@ -6,11 +6,19 @@
<?php do_action('tailpress_content_after'); ?>
<footer id="colophon" class="site-footer bg-gray-50 py-12" role="contentinfo">
<?php
$current_blog_id = get_current_blog_id();
switch_to_blog(1);
$blog1_theme_path = get_template_directory();
restore_current_blog();
include($blog1_theme_path . '/template-parts/footer.php');
?>
<?php do_action('tailpress_footer'); ?>
<div class="container mx-auto text-center text-gray-500">
&copy; <?php echo date_i18n( 'Y' );?> - <?php echo get_bloginfo( 'name' );?>
</div>
</footer>
</div>

View File

@ -2,13 +2,14 @@
require_once(__DIR__ . '/includes/errorlog.php');
require_once(__DIR__ . '/includes/init.php');
require_once(__DIR__ . '/includes/blocks.php');
require_once(__DIR__ . '/includes/post_types.php');
require_once(__DIR__ . '/includes/admin.php');
require_once(__DIR__ . '/includes/logos.php');
require_once(__DIR__ . '/includes/collective-access-api.php');
require_once(__DIR__ . '/includes/columns.php');
// require_once(__DIR__ . '/includes/taxonomy.php');
// require_once(__DIR__ . '/includes/admin.php');
// require_once(__DIR__ . '/includes/logos.php');
// require_once(__DIR__ . '/includes/nawalker_fction.php');
// require_once(__DIR__ . '/includes/utilities.php');
// require_once(__DIR__ . '/includes/widget.php');
// require_once( __DIR__ . '/includes/taxonomy.php');
// require_once( __DIR__ . '/includes/errorlog.php');
// require_once( __DIR__ . '/includes/logos.php');

View File

@ -4,9 +4,8 @@
Walker to ReWrap li submenu parent with button instead of
-----------------------------------------------------------*/
function wrap_parent_menu_item_buttons($output, $item, $depth, $args)
function dynamiques_wrap_parent_menu_item_buttons($output, $item, $depth, $args)
{
// write_log($item);
// $item->classes = array_merge($item->classes, array('menu-item-' . $item->ID));
@ -22,34 +21,21 @@ function wrap_parent_menu_item_buttons($output, $item, $depth, $args)
if ($args->theme_location === "renovateur") {
if ($args->theme_location === "primary") {
$page_icon = get_field('page_icon', $item->object_id);
if (in_array('menu-item-has-children', $item->classes, true)) {
$output = '<button type="button" class="menu-item-submenu-toggle" aria-expanded="false" aria-controls="sub-menu-' . $item->ID . '">' . $item->title . '</button>';
}
// #### ICONE DE PAGE FOR TOP LEVEL MENU ITEMS
if (isset($page_icon)) {
$icon = '<img class="page_icon" src="' . $page_icon['url'] . '" alt=""/>';
$link = $output;
$output = $icon . $link;
}
write_log($output);
// #### TAXONOMY : GET ICON & INFOS ABOUT TAX
if ($item->type === "taxonomy") {
$term = get_term_by('id', $item->object_id, 'thematiques');
$cover = get_field('taxonomy_pictures', "thematiques_" . $item->object_id);
$output = '<a class="lol" href="' . $item->url . '">';
$output .= '<img class="thematique-icon" src="' . $cover['icon']['url'] . '"/>';
$output .= '<h6>' . $item->title . "</h6>";
$output .= '<p>' . $term->description . "</p>";
$output .= "</a>";
}
}
if ($args->theme_location === "footer" && in_array('menu-item-has-children', $item->classes, true)) {
@ -57,7 +43,7 @@ function wrap_parent_menu_item_buttons($output, $item, $depth, $args)
}
return $output;
}
add_filter('walker_nav_menu_start_el', 'wrap_parent_menu_item_buttons', 10, 4);
add_filter('walker_nav_menu_start_el', 'dynamiques_wrap_parent_menu_item_buttons', 10, 4);

View File

@ -1,30 +1,42 @@
<?php
function add_custom_taxonomies() {
register_taxonomy('thematiques', 'post', array(
// // Register Custom Taxonomy
// function custom_taxonomy()
// {
// 'hierarchical' => true,
// This array of options controls the labels displayed in the WordPress Admin UI
'labels' => array(
'name' => _x( 'Thématiques', 'taxonomy general name' ),
'singular_name' => _x( 'Thématique', 'taxonomy singular name' ),
'search_items' => __( 'Chercher une Thématique' ),
'all_items' => __( 'Toutes les Thématiques' ),
'parent_item' => __( 'Thématique Parent' ),
'parent_item_colon' => __( 'Thématique Parent:' ),
'edit_item' => __( 'Editer la Thématique' ),
'update_item' => __( 'Mettre à jour la Thématique' ),
'add_new_item' => __( 'Ajouter une Thématique' ),
'new_item_name' => __( 'Nom de la nouvelle Thématique' ),
'menu_name' => __( 'Thématiques' ),
),
// Control the slugs used for this taxonomy
'rewrite' => array(
'slug' => 'thematiques', // This controls the base slug that will display before each term
// 'with_front' => false, // Don't display the category base before "/locations/"
'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
),
));
}
add_action( 'init', 'add_custom_taxonomies', 0 );
// $labels = array(
// 'name' => _x('Étiquettes', 'Taxonomy General Name', 'text_domain'),
// 'singular_name' => _x('Étiquette', 'Taxonomy Singular Name', 'text_domain'),
// 'menu_name' => __('Étiquettes', 'text_domain'),
// 'all_items' => __('Toutes les étiquettes', 'text_domain'),
// 'parent_item' => __('Étiquette parente', 'text_domain'),
// 'parent_item_colon' => __('Étiquette parente:', 'text_domain'),
// 'new_item_name' => __('Nouvelle étiquette', 'text_domain'),
// 'add_new_item' => __('Ajouter une étiquette', 'text_domain'),
// 'edit_item' => __('Modifier l\'étiquette', 'text_domain'),
// 'update_item' => __('Mettre à jour l\'étiquette', 'text_domain'),
// 'view_item' => __('Voir l\'étiquette', 'text_domain'),
// 'separate_items_with_commas' => __('Séparer les étiquettes avec des virgules', 'text_domain'),
// 'add_or_remove_items' => __('Ajouter ou supprimer des étiquettes', 'text_domain'),
// 'choose_from_most_used' => __('Choisir parmi les plus utilisées', 'text_domain'),
// 'popular_items' => __('Étiquettes populaires', 'text_domain'),
// 'search_items' => __('Rechercher des étiquettes', 'text_domain'),
// 'not_found' => __('Non trouvé', 'text_domain'),
// 'no_terms' => __('Aucune étiquette', 'text_domain'),
// 'items_list' => __('Liste des étiquettes', 'text_domain'),
// 'items_list_navigation' => __('Navigation dans la liste des étiquettes', 'text_domain'),
// );
// $args = array(
// 'show_in_rest' => true,
// 'labels' => $labels,
// 'hierarchical' => false,
// 'public' => true,
// 'show_ui' => true,
// 'show_admin_column' => true,
// 'show_in_nav_menus' => true,
// 'show_tagcloud' => true,
// 'meta_box_cb' => true,
// );
// register_taxonomy('etiquettes', array('articles', 'revues'), $args);
// }
// add_action('init', 'custom_taxonomy', 0);

0
includes/utilities.php Normal file
View File

View File

@ -0,0 +1,6 @@
.wp-block-button__link {
border-radius: 0px;
@apply border-primary border bg-transparent text-primary;
}

View File

@ -1,6 +1,6 @@
.primary-menu-container {
@apply mx-auto
bg-primary
text-white
relative
h-fit
@ -35,11 +35,17 @@
xl:pr-24;
}
li.menu-item:has(.page_icon) {
@apply flex flex-col items-center justify-center gap-3;
.page_icon {
@apply w-12 h-12 object-contain;
}
}
/* Highlight using list element */
li.current-page-parent > a,
li.current_page_item > a {
@apply font-medium
text-white
!text-white
decoration-secondary
underline
underline-offset-8;
@ -55,7 +61,7 @@
@apply cursor-pointer
underline
underline-offset-8
text-secondary;
!text-white;
}
a:focus {
text-decoration: none;
@ -65,7 +71,7 @@
.menu-item-submenu-toggle {
&:hover,
&:focus {
@apply text-secondary;
@apply !text-white;
}
@apply relative pr-4;
&:after {

View File

@ -5,7 +5,14 @@
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('dbmod-item'); ?>>
<?php
$chapo = get_field('chapo');
$content = get_field('content');
$author = get_field('author');
$maitron_url = get_field('maitron_url');
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post-card-dbmod'); ?>>
<div class="card h-100">
<?php if (has_post_thumbnail()) : ?>
<div class="card-img-top">
@ -13,40 +20,30 @@
</div>
<?php endif; ?>
<div class="card-body">
<h2 class="card-title">
<div class="post-card-dbmod__content">
<h2 class="post-card-dbmod__title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h2>
<div class="card-text">
<?php the_excerpt(); ?>
</div>
<?php if ($author) : ?>
<p class="author">par :<?php echo esc_html($author); ?></p>
<?php endif; ?>
<div class="post-card-dbmod__details">
<?php
// Afficher les champs ACF si présents
if (function_exists('get_field')) :
// Exemple d'affichage de champs ACF
$marque = get_field('marque');
$modele = get_field('modele');
$annee = get_field('annee');
?>
<div class="dbmod-details">
<?php if ($marque) : ?>
<p class="marque">Marque: <?php echo esc_html($marque); ?></p>
<?php if ($chapo) : ?>
<p class="chapo"><?php echo esc_html($chapo); ?></p>
<?php endif; ?>
<?php if ($modele) : ?>
<p class="modele">Modèle: <?php echo esc_html($modele); ?></p>
<?php if ($content) : ?>
<p class="content"><?php echo esc_html($content); ?></p>
<?php endif; ?>
<?php if ($annee) : ?>
<p class="annee">Année: <?php echo esc_html($annee); ?></p>
<?php if ($maitron_url) : ?>
<p class="maitron_url">Maitron URL: <?php echo esc_html($maitron_url); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<div class="card-footer">