Compare commits
10 Commits
16bc8f54f5
...
257f0d50f0
| Author | SHA1 | Date | |
|---|---|---|---|
| 257f0d50f0 | |||
| 1426f52631 | |||
| 0cb36f8d56 | |||
| f4eaafdb4f | |||
| b28f842e0c | |||
| 594cfc35b4 | |||
| e03fb775e7 | |||
| 0fec0ebc39 | |||
| 3b08bff748 | |||
| ad6d5ccbf6 |
|
|
@ -112,7 +112,7 @@ function create_posttype()
|
|||
'fiches-infos',
|
||||
array(
|
||||
'labels' => array(
|
||||
'name' => __('Fiches Infos', 'homegrade-theme__texte-backoffice'),
|
||||
'name' => __('Fiches info', 'homegrade-theme__texte-backoffice'),
|
||||
'singular_name' => __('Fiches Info', 'homegrade-theme__texte-backoffice')
|
||||
),
|
||||
'public' => true,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ function getThematiqueFamilySlug($thematique_slug)
|
|||
if (!$thematique_slug) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch ($thematique_slug) {
|
||||
case "energie":
|
||||
case "urbanisme":
|
||||
|
|
@ -20,7 +21,7 @@ function getThematiqueFamilySlug($thematique_slug)
|
|||
case "akoestiek":
|
||||
case "petites-coproprietes":
|
||||
case "coproprietes":
|
||||
case "kleine-mede-eigendommen":
|
||||
case "mede-eigendommen":
|
||||
return "acoustique-coproprietes";
|
||||
|
||||
case "isolation":
|
||||
|
|
@ -267,3 +268,22 @@ function build_page_chapter_index($blocks)
|
|||
}
|
||||
return $chapterBlockIndex;
|
||||
}
|
||||
|
||||
/* -------------------------------------------
|
||||
GET PARCOURS PREVIOUS/NEXT POSTS
|
||||
---------------------------------------------*/
|
||||
|
||||
function get_parcours_previous_next_posts($post)
|
||||
{
|
||||
|
||||
$prev_post = get_previous_post() ?? null;
|
||||
$next_post = get_next_post() ?? null;
|
||||
$test_next = get_adjacent_post(false, '', false, 'thematiques');
|
||||
$test = new WP_Query(array('orderby' => 'menu_order', 'order' => 'ASC'));
|
||||
|
||||
return [
|
||||
'prev_post' => $prev_post,
|
||||
'next_post' => $next_post,
|
||||
'test' => $test_next
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@
|
|||
.acoustique &,
|
||||
.akoestiek &,
|
||||
.coproprietes &,
|
||||
.kleine-mede-eigendommen & {
|
||||
.mede-eigendommen & {
|
||||
@apply bg-acoustique-coproprietes;
|
||||
}
|
||||
.isolation &,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
.homegrade-blocks-plus-loin {
|
||||
.homegrade-blocks-custom-heading.has-icon {
|
||||
&.has-icon:before {
|
||||
@apply bg-secondary;
|
||||
@apply bg-secondary-light;
|
||||
}
|
||||
&.has-icon--key::before {
|
||||
background-image: url('../resources/img/pictogrammes/icon_key_dark.svg');
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
@apply flex flex-col text-2xl mt-8 bg-white shadowed-lg rounded-3xl !p-8 relative;
|
||||
|
||||
text-decoration: none !important;
|
||||
transitions: all 0.3s ease-in-out;
|
||||
transition: all 0.3s ease-in-out;
|
||||
&:hover {
|
||||
@apply !bg-white !rounded-3xl translate-y-2;
|
||||
transitions: all 0.3s ease-in-out;
|
||||
transition: all 0.3s ease-in-out;
|
||||
scale: 1.01;
|
||||
.homegrade-blocks-page-card__cta .cta_arrow_button {
|
||||
@apply translate-x-1;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,23 @@
|
|||
}
|
||||
}
|
||||
.previous-next-parcours {
|
||||
&__previous {
|
||||
@apply text-right;
|
||||
|
||||
&:after {
|
||||
@apply mr-auto ml-0;
|
||||
order: -1;
|
||||
background-image: url('../resources/img/graphic-assets/chevron_left.svg');
|
||||
}
|
||||
}
|
||||
&__next {
|
||||
@apply text-left;
|
||||
&:before {
|
||||
@apply ml-auto mr-0;
|
||||
order: 2;
|
||||
background-image: url('../resources/img/graphic-assets/chevron_right.svg');
|
||||
}
|
||||
}
|
||||
&__previous,
|
||||
&__next {
|
||||
.page_icon {
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ body.coproprietes,
|
|||
.taxonomy-question-page--coproprietes,
|
||||
.post-conseil-page--coproprietes,
|
||||
.post-question-page--coproprietes,
|
||||
body.kleine-mede-eigendommen,
|
||||
.entry-content--kleine-mede-eigendommen,
|
||||
.taxonomy-question-page--kleine-mede-eigendommen,
|
||||
.post-conseil-page--kleine-mede-eigendommen,
|
||||
.post-question-page--kleine-mede-eigendommen,
|
||||
body.mede-eigendommen,
|
||||
.entry-content--mede-eigendommen,
|
||||
.taxonomy-question-page--mede-eigendommen,
|
||||
.post-conseil-page--mede-eigendommen,
|
||||
.post-question-page--mede-eigendommen,
|
||||
body.acoustique,
|
||||
.entry-content--acoustique,
|
||||
.taxonomy-question-page--acoustique,
|
||||
|
|
@ -107,7 +107,7 @@ body.akoestiek,
|
|||
}
|
||||
}
|
||||
|
||||
.card-news__thematique-tag--kleine-mede-eigendommen,
|
||||
.card-news__thematique-tag--mede-eigendommen,
|
||||
.card-news__thematique-tag--coproprietes,
|
||||
.card-news__thematique-tag--acoustique,
|
||||
.card-news__thematique-tag--akoestiek {
|
||||
|
|
@ -120,11 +120,11 @@ body.coproprietes,
|
|||
.taxonomy-question-page--coproprietes,
|
||||
.post-conseil-page--coproprietes,
|
||||
.post-question-page--coproprietes,
|
||||
body.kleine-mede-eigendommen,
|
||||
.entry-content--kleine-mede-eigendommen,
|
||||
.taxonomy-question-page--kleine-mede-eigendommen,
|
||||
.post-conseil-page--kleine-mede-eigendommen,
|
||||
.post-question-page--kleine-mede-eigendommen {
|
||||
body.mede-eigendommen,
|
||||
.entry-content--mede-eigendommen,
|
||||
.taxonomy-question-page--mede-eigendommen,
|
||||
.post-conseil-page--mede-eigendommen,
|
||||
.post-question-page--mede-eigendommen {
|
||||
.post-question-chapter-header,
|
||||
.post-conseils-chapter-header {
|
||||
background: var(--wp--preset--gradient--gradient-blue);
|
||||
|
|
@ -742,11 +742,11 @@ body.coproprietes,
|
|||
.taxonomy-question-page--coproprietes,
|
||||
.post-conseil-page--coproprietes,
|
||||
.post-question-page--coproprietes,
|
||||
body.kleine-mede-eigendommen,
|
||||
.entry-content--kleine-mede-eigendommen,
|
||||
.taxonomy-question-page--kleine-mede-eigendommen,
|
||||
.post-conseil-page--kleine-mede-eigendommen,
|
||||
.post-question-page--kleine-mede-eigendommen,
|
||||
body.mede-eigendommen,
|
||||
.entry-content--mede-eigendommen,
|
||||
.taxonomy-question-page--mede-eigendommen,
|
||||
.post-conseil-page--mede-eigendommen,
|
||||
.post-question-page--mede-eigendommen,
|
||||
body.urbanisme,
|
||||
.entry-content--urbanisme,
|
||||
.taxonomy-question-page--urbanisme,
|
||||
|
|
@ -850,7 +850,7 @@ body.duurzaamheid,
|
|||
@apply bg-location-durabilite-light text-location-durabilite;
|
||||
}
|
||||
&--coproprietes,
|
||||
&--kleine-mede-eigendommen,
|
||||
&--mede-eigendommen,
|
||||
&--acoustique,
|
||||
&--akoestiek {
|
||||
@apply bg-acoustique-coproprietes-light text-acoustique-coproprietes;
|
||||
|
|
|
|||
|
|
@ -147,8 +147,6 @@ article > *:not(.entry-content, .chapter-header-block),
|
|||
margin-top: 9px;
|
||||
}
|
||||
|
||||
/* a:not(.wp-block-button__link, .cta) { */
|
||||
|
||||
a:not(
|
||||
.cta--secondary,
|
||||
.wp-block-button__link,
|
||||
|
|
@ -156,8 +154,7 @@ article > *:not(.entry-content, .chapter-header-block),
|
|||
.homegrade-blocks-lien-chapitre__cta,
|
||||
.breadcrumbs_navigation a,
|
||||
.share-link,
|
||||
.previous-next-posts__link,
|
||||
|
||||
.previous-next-posts__link
|
||||
) {
|
||||
@apply text-primary underline font-bold relative;
|
||||
@apply px-2 py-1;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import editorInit from './editor';
|
||||
import menuInit from './menus';
|
||||
import singleConseil from './single-conseil';
|
||||
import SchemaBulletPointsInit from './schema-bullet-points';
|
||||
import taxonomyThematiqueFaqInit from './taxonomy-thematique-(faq)';
|
||||
import archiveNewsInit from './archive-template-news';
|
||||
|
|
@ -14,7 +13,6 @@ window.addEventListener('DOMContentLoaded', (event) => {
|
|||
menuInit();
|
||||
SchemaBulletPointsInit();
|
||||
pageScrollerInit();
|
||||
// singleConseil();
|
||||
editorInit();
|
||||
accordeonInit();
|
||||
taxonomyThematiqueFaqInit();
|
||||
|
|
|
|||
|
|
@ -46,28 +46,31 @@ $pageIcon = get_field('step_icon', $post->ID);
|
|||
$prev_thumbnail_url = get_the_post_thumbnail_url($prev_post, 'thumbnail');
|
||||
$prev_page_icon = get_field('step_icon', $prev_post->ID) ?? null;
|
||||
$next_page_icon = get_field('step_icon', $next_post->ID) ?? null;
|
||||
|
||||
$test = get_parcours_previous_next_posts($post);
|
||||
?>
|
||||
|
||||
<?php if ($next_post) : ?>
|
||||
<a class="previous-next-parcours__next" href="<?php echo get_the_permalink($next_post->ID) ?>">
|
||||
<div class="previous-next-parcours__link-content">
|
||||
<p class="post_denomination"><?php echo __("Étape suivante ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||
<p class="post_title"><?php echo $next_post->post_title ?></p>
|
||||
</div>
|
||||
<img class="page_icon" src="<?php echo $next_page_icon['url'] ?>" alt="">
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($prev_post) : ?>
|
||||
<a class="previous-next-parcours__previous" href="<?php echo get_the_permalink($prev_post->ID) ?>">
|
||||
<img class="page_icon" src="<?php echo $prev_page_icon['url'] ?>" alt="">
|
||||
|
||||
<div class="previous-next-parcours__link-content">
|
||||
<p class="post_denomination"><?php echo __("Étape précédente ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||
<p class="post_title"><?php echo $prev_post->post_title ?></p>
|
||||
</div>
|
||||
<img class="page_icon" src="<?php echo $prev_page_icon['url'] ?>" alt="">
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($next_post) : ?>
|
||||
<a class="previous-next-parcours__next" href="<?php echo get_the_permalink($next_post->ID) ?>">
|
||||
<img class="page_icon" src="<?php echo $next_page_icon['url'] ?>" alt="">
|
||||
<div class="previous-next-parcours__link-content">
|
||||
<p class="post_denomination"><?php echo __("Étape suivante ", "homegrade-theme__texte-fonctionnel") ?></p>
|
||||
<p class="post_title"><?php echo $next_post->post_title ?></p>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
.heading-box--parcours-parent {
|
||||
@apply heading-box;
|
||||
@apply text-center;
|
||||
|
||||
@apply mt-12 lg:mt-8;
|
||||
&__title {
|
||||
@apply text-3xl;
|
||||
@apply text-6xl;
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
line-height: 1.2;
|
||||
}
|
||||
&__page-icon {
|
||||
@apply mx-auto w-28 absolute top-0 left-1/2;
|
||||
@apply mx-auto w-24 h-24 md:w-28 md:h-28 absolute top-0 left-1/2;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
.cta--secondary {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user