Compare commits
No commits in common. "2ff123d0262b30efcff7e7fe0c263b806ba28635" and "56882895728667af2c64da10cbda9056e0a84e07" have entirely different histories.
2ff123d026
...
5688289572
|
|
@ -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()) :
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,41 @@
|
||||||
<?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');
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
@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';
|
||||||
|
|
|
||||||
|
|
@ -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,10 +43,12 @@
|
||||||
}
|
}
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* 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 {
|
||||||
|
|
@ -62,7 +64,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;
|
||||||
|
|
|
||||||
133
resources/css/components/post-grid.css
Normal file
133
resources/css/components/post-grid.css
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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');
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
7
template-parts/components/subscribe-infolettre.php
Normal file
7
template-parts/components/subscribe-infolettre.php
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
$block_content = '<!-- wp:carhop-blocks/subscribe-infolettre {"title":"Restez connectés à l’histoire 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);
|
||||||
Loading…
Reference in New Issue
Block a user