diff --git a/resources/css/pages/single-parcours.css b/resources/css/pages/single-parcours.css new file mode 100644 index 0000000..e93b264 --- /dev/null +++ b/resources/css/pages/single-parcours.css @@ -0,0 +1,51 @@ +.homegrade-page--parcours { + aside { + @apply py-4; + } + h1 { + @apply text-4xl font-bold; + } + h2 { + @apply text-3xl font-bold; + } + + .parcours-steps { + @apply flex flex-col gap-y-6; + } + .parcours-other-steps-suggestion { + @apply bg-white !p-6 !pr-16 rounded-3xl shadowed flex items-center gap-4; + transition: all 0.3s ease; + &:hover { + @apply translate-x-4 !bg-white !rounded-3xl; + } + + .step-icon { + @apply w-12 h-12 relative; + } + span::after { + transition: all 0.3s ease; + content: ' '; + @apply inline-block absolute w-3 h-3 right-6 top-1/2 -translate-y-1/2 filter-secondary; + background-image: url('../resources/img/graphic-assets/chevron_right.svg'); + background-size: contain; + background-repeat: no-repeat; + background-position: center; + } + } + + .parcours-steps { + @apply sticky top-0; + } +} + +.current-steps-index { + @apply !static; +} + +.current-steps-index { + @apply chapter_index; + + .chapter_index__title { + @apply my-0; + } +} diff --git a/resources/css/pages/template-parcours-renovateur.css b/resources/css/pages/template-parcours-renovateur.css index 05fc72f..4de6ac5 100644 --- a/resources/css/pages/template-parcours-renovateur.css +++ b/resources/css/pages/template-parcours-renovateur.css @@ -1,7 +1,14 @@ .parcours-steps-container { - @apply md:grid grid-cols-3 gap-12; + @apply md:grid grid-cols-3 gap-12 pt-8 pb-24; - /* .step-container { - @apply bg-gray p-6 rounded-lg; - } */ + .card { + h2 { + @apply !my-4; + line-height: 1.2; + } + } +} + +.step-icon { + @apply w-12 h-12 relative; } diff --git a/single-parcours-parent.php b/single-parcours-parent.php index bfa5942..e8387f2 100644 --- a/single-parcours-parent.php +++ b/single-parcours-parent.php @@ -1,33 +1,111 @@ 'parcours', + 'posts_per_page' => -1, + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'status' => 'publish', + 'post_parent' => get_queried_object_id(), +)); + + +$otherSteps = new WP_Query(array( + 'post_type' => 'parcours', + 'posts_per_page' => -1, + 'orderby' => 'menu_order', + 'order' => 'ASC', + 'status' => 'publish', + 'post_parent' => 0, + 'post__not_in' => array(get_queried_object_id()) +)); + ?> + + + + + + -
"> -

parent

- -
+ + +
+ posts as $chapter) : ?> + post_content) : ?> +
+

post_title ?>

+ + + post_content ?> + Voir la single post_title ?> +
+ + + +
+ - - - - - \ No newline at end of file diff --git a/single-parcours.php b/single-parcours.php index 07c10b9..f0541cc 100644 --- a/single-parcours.php +++ b/single-parcours.php @@ -1,9 +1,16 @@ -post_parent === 0; + +
-if ($isParentPage) { - get_template_part('single-parcours-parent'); -} else { - get_template_part('single-parcours-child'); -} + post_parent === 0; + if ($isParentPage) { + get_template_part('single-parcours-parent'); + } else { + get_template_part('single-parcours-child'); + } + ?> +
+ + - -slug; - + 'parcours', @@ -17,7 +12,7 @@ $parcoursSteps = new WP_Query(array( ?> -
"> +
@@ -47,13 +42,23 @@ $parcoursSteps = new WP_Query(array( + $pageIcon, + "title" => get_the_title(), + "description" => __("Toutes les étapes à connaître pour rénover votre logement.", "homegrade-theme__texte-fonctionnel"), + + )); + ?> + -

-

posts as $parcoursStep) : ?> -
+
'parcours', @@ -62,17 +67,25 @@ $parcoursSteps = new WP_Query(array( 'order' => 'menu_order', 'post_parent' => $parcoursStep->ID, )); + + + $stepIcon = get_field('step_icon', $parcoursStep->ID); ?> -

post_title ?> -

+ +

post_title ?>

+

post_excerpt ?>

+ -

- - post_title ?> - -

+ + + +
+ +
+
+