From ade073a4bba90f6498e0784dfb4198daaf7a81d3 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 9 Nov 2023 18:16:50 +0100 Subject: [PATCH] adding sitemap progress --- includes/rooting.php | 7 ++ resources/css/pages/sitemap-progress.css | 61 +++++++++ single-jobs.php | 4 +- sitemap-progress.php | 154 +++++++++++++++++++++++ template-components/heading-box--job.php | 6 +- 5 files changed, 227 insertions(+), 5 deletions(-) create mode 100644 resources/css/pages/sitemap-progress.css create mode 100644 sitemap-progress.php diff --git a/includes/rooting.php b/includes/rooting.php index 584984c..eeaa309 100644 --- a/includes/rooting.php +++ b/includes/rooting.php @@ -11,6 +11,13 @@ function redirect_to_demo_components_page() include(dirname(__DIR__, 1) . '/demo-components.php'); exit(); } + if ($_SERVER['REQUEST_URI'] == '/sitemap-progress') { + global $wp_query; + $wp_query->is_404 = false; + status_header(200); + include(dirname(__DIR__, 1) . '/sitemap-progress.php'); + exit(); + } } diff --git a/resources/css/pages/sitemap-progress.css b/resources/css/pages/sitemap-progress.css new file mode 100644 index 0000000..cb18e3c --- /dev/null +++ b/resources/css/pages/sitemap-progress.css @@ -0,0 +1,61 @@ +.page-site-map-progress { + @apply pt-8; + @apply max-w-xl mx-auto; + + h1 { + @apply font-bold text-3xl text-neutral-800 mb-6; + } + + .site-page { + @apply flex justify-between items-center py-3; + &__page-name { + @apply text-neutral-500 font-semibold text-lg h-fit; + line-height: 1; + } + &__status { + @apply text-sm text-white px-4 py-2 rounded-3xl shrink-0; + &:after { + @apply font-semibold tracking-wide; + } + &[status='v0'] { + @apply bg-red-600; + &:after { + content: ' À traiter'; + } + } + &[status='current'] { + @apply bg-amber-500; + + &:after { + content: ' En cours'; + } + } + &[status='v1'] { + @apply bg-blue-500; + + &:after { + content: ' Intégrée (v1)'; + } + } + &[status='v2'] { + @apply bg-green-400; + + &:after { + content: ' Fonctionnelle (v2)'; + } + } + &[status='v3'] { + @apply bg-green-700; + + &:after { + content: '✓'; + color: white; + } + } + } + } + + .site-page + .site-page { + @apply border-t border-t-neutral-300; + } +} diff --git a/single-jobs.php b/single-jobs.php index 39fcbb8..079119d 100644 --- a/single-jobs.php +++ b/single-jobs.php @@ -9,7 +9,7 @@ $relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null; -
"> +
get_the_title(), "thumbnail" => get_the_post_thumbnail(get_the_ID(), "full", array('class' => 'heading-box--jobs__thumbnail')), - "published" => get_the_date(), + "modified" => get_the_modified_date(), "subtitle" => __("Offre d'emploi", "homegrade-theme__texte-fonctionnel"), )); diff --git a/sitemap-progress.php b/sitemap-progress.php new file mode 100644 index 0000000..ece4c10 --- /dev/null +++ b/sitemap-progress.php @@ -0,0 +1,154 @@ + + + +
+ +

Sitemap progress

+ +
    +
  • +

    Home

    +

    +
  • +
  • +

    Homegrade | Qui sommes-nous ?

    +

    +
  • +
  • +

    Homegrade | Historique

    +

    +
  • +
  • +

    Homegrade | Transparence

    +

    +
  • +
  • +

    Homegrade | L'observatoire royal d'astronomie

    +

    +
  • +
  • +

    Nos services

    +

    +
  • +
  • +

    Collaborations | RENOLUTION

    +

    +
  • +
  • +

    Collaborations | Réseau Habitat

    +

    +
  • +
  • +

    Professsionnels | Formation PEB

    +

    +
  • +
  • +

    Professsionnels | Ready to Renov

    +

    +
  • +
  • +

    Professsionnels | Ready to Renov | Charte engagement

    +

    +
  • +
  • +

    Professsionnels | Ready to Renov | Formulaire engagement

    +

    +
  • + +
  • +

    News | Archive

    +

    +
  • +
  • +

    News | Single

    +

    +
  • +
  • +

    News | Single | Presse

    +

    +
  • +
  • +

    FAQ | Archives

    +

    +
  • +
  • +

    FAQ | Single

    +

    +
  • +
  • +

    Jobs | Archive

    +

    +
  • +
  • +

    Jobs | Single

    +

    +
  • +
  • +

    Presse

    +

    +
  • +
  • +

    Contact

    +

    +
  • +
  • +

    Conseils | Archives

    +

    +
  • +
  • +

    Conseils | Single | Parent

    +

    +
  • +
  • +

    Conseils | Single | Enfant

    +

    +
  • +
  • +

    Aides financières | Crédits Ecoreno

    +

    +
  • +
  • +

    Aides financières | Primes et incitants financiers

    +

    +
  • +
  • +

    Aides financières | Primes Rénolution

    +

    +
  • +
  • +

    Page résultats suite à une recherche (bouton rechercher)

    +

    +
  • +
  • +

    Conditions générales d'utilisation

    +

    +
  • +
  • +

    Politique de confidentialité

    +

    +
  • +
  • +

    Déclaration d'accessibilité

    +

    +
  • +
  • +

    Plan du site

    +

    +
  • +
  • +

    Page 404

    +

    +
  • + + + + + + + +
+
+ + + -

name ?>

+

@@ -22,7 +22,7 @@ $subtitle = $args['subtitle'] ?? null; get_template_part("template-components/post-infos-capsule", null, array( "postID" => get_the_ID(), - "published" => $published + "modified" => $modified )); ?>