Compare commits

..

6 Commits

Author SHA1 Message Date
Nonimart
2ff123d026 SUPPRIMER Suppression du composant d'abonnement à la newsletter
All checks were successful
continuous-integration/drone/push Build is passing
2026-02-13 15:49:42 +01:00
Nonimart
b03ce090a3 REFACTOR Commentin code used elsewhere 2026-02-13 15:49:36 +01:00
Nonimart
c04cd14c0d REFACTOR Moving the post grid in carhop theme 2026-02-13 15:49:16 +01:00
Nonimart
506281432a FEATURE Commenting unecessary write log 2026-02-13 15:49:04 +01:00
Nonimart
09979f4287 REFACTOR Removing the auteurs post type declaration and movint it to mu-plugin shared post type 2026-02-13 15:41:00 +01:00
Nonimart
309f0d81ee FIX Commenting write logs 2026-02-13 15:39:55 +01:00
7 changed files with 12 additions and 189 deletions

View File

@ -179,8 +179,8 @@ function build_revues($request)
// si non on fait rien // si non on fait rien
// si oui on ajoute la revue au tableau // si oui on ajoute la revue au tableau
write_log("################TEST ETIQUES: "); // write_log("################TEST ETIQUES: ");
write_log($etiquette); // write_log($etiquette);
// Filtre par étiquette (taxonomie) // Filtre par étiquette (taxonomie)
@ -212,8 +212,8 @@ function build_revues($request)
$revues = new WP_Query($args); $revues = new WP_Query($args);
write_log("################TEST ARTICLES: "); // write_log("################TEST ARTICLES: ");
write_log($revues->posts); // write_log($revues->posts);
ob_start(); ob_start();
if ($revues->have_posts()) : if ($revues->have_posts()) :

View File

@ -1,41 +1,7 @@
<?php <?php
function dynamiques_create_auteurs_posttype() // function dynamiques_create_auteurs_posttype() {}
{ // add_action('init', 'dynamiques_create_auteurs_posttype');
register_post_type(
'auteurs',
array(
'labels' => array(
'name' => __('Auteurs'),
'singular_name' => __('Auteur'),
'add_new' => __('Ajouter un auteur'),
'add_new_item' => __('Ajouter un auteur'),
'edit_item' => __('Editer l\'auteur'),
'new_item' => __('Nouvel auteur'),
'view_item' => __('Voir l\'auteur'),
'search_items' => __('Chercher un auteur'),
'not_found' => __('Pas d\'auteur trouvé'),
'not_found_in_trash' => __('Pas d\'auteur trouvé dans la corbeille'),
'all_items' => __('Tous les auteurs'),
'menu_name' => __('Auteurs'),
'name_admin_bar' => __('Auteurs'),
),
'public' => true,
'has_archive' => true,
'show_in_rest' => true,
'menu_icon' => 'dashicons-admin-users',
'menu_position' => 4,
'supports' => array(
'title',
'thumbnail',
'custom-fields',
'revisions',
),
)
);
}
add_action('init', 'dynamiques_create_auteurs_posttype');
//Acf save post action //Acf save post action
add_action('acf/save_post', 'dynamiques_save_auteurs_post'); add_action('acf/save_post', 'dynamiques_save_auteurs_post');

View File

@ -13,7 +13,6 @@
@import './components/cta.css'; @import './components/cta.css';
@import './components/post-card-dbmod.css'; @import './components/post-card-dbmod.css';
@import './components/news-card.css'; @import './components/news-card.css';
@import './components/post-grid.css';
@import './components/footnote-reference.css'; @import './components/footnote-reference.css';
@import './components/revues-grid.css'; @import './components/revues-grid.css';
@import './components/articles-grid.css'; @import './components/articles-grid.css';

View File

@ -3,12 +3,12 @@
@apply col-span-2 container mx-auto mb-2 lg:mb-0; @apply col-span-2 container mx-auto mb-2 lg:mb-0;
.tablist { .tablist {
@apply flex items-center overflow-y-visible gap-8 lg:gap-3 xl:gap-12 border-b border-primary; /* @apply flex items-center overflow-y-visible gap-8 lg:gap-3 xl:gap-12 border-b border-primary;
position: relative; position: relative;
span { span {
@apply sr-only lg:not-sr-only; @apply sr-only lg:not-sr-only;
} } */
/* @media screen and (max-width: 1024px) { /* @media screen and (max-width: 1024px) {
} */ } */
/* @media screen and (max-width: 1024px) { /* @media screen and (max-width: 1024px) {
@ -43,12 +43,10 @@
} }
} */ } */
button { /* button {
@apply text-base md:text-lg lg:text-lg mt-8 nunito pb-4 flex flex-col lg:flex-row items-center gap-2 lg:gap-4 text-left shrink-0; @apply text-base md:text-lg lg:text-lg mt-8 nunito pb-4 flex flex-col lg:flex-row items-center gap-2 lg:gap-4 text-left shrink-0;
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
/* white-space: normal;
word-wrap: break-word; */
/* break-word: break-; */
word-break: keep-all; word-break: keep-all;
.icon { .icon {
@ -64,7 +62,7 @@
&[aria-selected='false'] { &[aria-selected='false'] {
@apply text-black opacity-40; @apply text-black opacity-40;
} }
} } */
a.cta--download-pdf { a.cta--download-pdf {
@apply ml-auto; @apply ml-auto;

View File

@ -1,133 +0,0 @@
.post-grid {
&__toolbar {
/* @apply flex flex-col md:grid md:grid-cols-2 gap-4 md:items-center justify-between pb-12; */
@apply pb-12 grid grid-cols-2 gap-4 gap-y-8 items-end;
.post-count {
@apply flex items-end gap-2 col-span-1;
&__count {
@apply font-normal uppercase fjalla;
line-height: 0.8;
}
&__text {
@apply text-lg nunito;
}
}
.search-bar {
@apply md:justify-self-end text-primary relative w-full md:max-w-[500px];
&:after {
@apply absolute top-1/2 -translate-y-1/2;
content: '';
right: 10px;
display: flex;
width: 30px;
height: 30px;
background-image: url('../resources/img/icons/carhop-rechercher-green-circle.svg');
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
}
input {
@apply w-full !py-4 px-4 border border-primary rounded-full text-base;
padding-right: 33px;
line-height: 1.5;
height: auto;
&::placeholder {
@apply !text-base font-normal text-carhop-green-700;
}
}
}
select {
@apply w-full md:w-auto border border-carhop-green-700 text-carhop-green-700 rounded-full !py-4 px-4 max-w-full text-base;
line-height: 1.5;
height: auto;
appearance: none; /* Disable the default arrow */
-webkit-appearance: none; /* For WebKit-based browsers */
-moz-appearance: none; /* For Firefox */
background-color: #fff;
background-image: url('../resources/img/elements/select-drop-button.svg');
background-repeat: no-repeat;
background-position: right 10px center;
background-size: 30px;
cursor: pointer;
}
select[name='sort_by'] {
@apply pr-12 w-fit justify-self-end col-span-1;
}
}
.search-by {
@apply col-span-2 md:col-span-1;
&__label {
@apply text-primary font-semibold nunito;
}
.search-by__buttons {
@apply flex items-center border border-primary border-solid w-fit;
button {
@apply block font-normal nunito text-primary py-2 px-4;
&[aria-selected='true'] {
@apply bg-primary text-white;
&:hover {
@apply bg-primary text-white;
}
}
&:hover {
@apply bg-carhop-green-50;
}
}
&[data-filter='thematique'] {
}
}
}
&__toolbar-actions {
@apply flex flex-wrap md:items-center gap-4 justify-self-end w-full md:justify-end col-span-2 md:col-span-1;
select[name='etiquettes'] {
/* @apply bg-blue-300; */
}
select[name='auteurs'] {
/* @apply bg-red-300; */
}
}
&__list {
@apply grid grid-cols-1 lg:grid-cols-2 gap-8;
}
}
body:has(.search-by button[data-filter='thematique'][aria-selected='true']) {
.post-grid__toolbar-actions {
select[name='auteurs'],
.search-bar {
@apply hidden;
}
}
}
body:has(.search-by button[data-filter='auteur'][aria-selected='true']) {
.post-grid__toolbar-actions {
select[name='etiquettes'],
.search-bar {
@apply hidden;
}
}
}
body:has(.search-by button[data-filter='occurence'][aria-selected='true']) {
.post-grid__toolbar-actions {
select[name='etiquettes'],
select[name='auteurs'] {
@apply hidden;
}
}
}

View File

@ -16,7 +16,7 @@ if ($is_carhop_member && isset($carhop_member_id)) {
restore_current_blog(); restore_current_blog();
} }
write_log($is_carhop_member); // write_log($is_carhop_member);
$totalArticles = count_user_articles($ID, 'articles'); $totalArticles = count_user_articles($ID, 'articles');
?> ?>

View File

@ -1,7 +0,0 @@
<?php
$block_content = '<!-- wp:carhop-blocks/subscribe-infolettre {"title":"Restez connectés à lhistoire sociale","className":"wp-block-carhop-blocks-subscribe-infolettre subscribe-infolettre"} -->
<!-- wp:paragraph {"placeholder":"Description","className":"subscribe-infolettre__description"} -->
<p class="subscribe-infolettre__description">Recevez les dernières actualités du CARHOP et la revue Dynamiques directement dans votre boîte mail. Abonnez-vous et surveillez votre boîte : un mail de confirmation vous attend ! </p>
<!-- /wp:paragraph -->
<!-- /wp:carhop-blocks/subscribe-infolettre -->';
echo do_blocks($block_content);