From 353030d2dc2b3fdfc07e499f51f131f11125f3b6 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sun, 16 Aug 2026 12:54:38 -0500 Subject: [PATCH] feat(projects): add single-projects detail template --- .gitignore | 1 + single-projects.php | 168 +++++++++++++++++++++++++ style.css | 4 +- styles/components/project-card.css | 86 +++++++++++++ views/components/project-meta-row.php | 18 ++- views/components/project-stat-card.php | 20 +-- 6 files changed, 282 insertions(+), 15 deletions(-) create mode 100644 single-projects.php diff --git a/.gitignore b/.gitignore index dc6d456..5b820b7 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ testimonials.class.php resource-filter/ phpcs-results.txt .claude/ +notes/ # Playwright /test-results/ diff --git a/single-projects.php b/single-projects.php new file mode 100644 index 0000000..8013e7b --- /dev/null +++ b/single-projects.php @@ -0,0 +1,168 @@ +name ) : ''; + $excerpt = has_excerpt( $project_id ) ? get_the_excerpt( $project_id ) : ''; + ?> +
+
+
+ +
+

+ + + + +

+

+ + + v + +

+ +

+ + +
+ + + + + v + + + + + + + + +
+
+ +
+
+ + + + +
+

+ +
+
+ + +
+
+
+
+
- + diff --git a/views/components/project-stat-card.php b/views/components/project-stat-card.php index d4312b7..c8e17b4 100644 --- a/views/components/project-stat-card.php +++ b/views/components/project-stat-card.php @@ -2,23 +2,29 @@ /** * Project Stat Card Component * - * Renders one stat tile. Expects $label, $value, and $icon (optional SVG - * markup) in scope. $icon MUST be aria-hidden decorative markup; the label - * is the accessible name. + * Renders one stat tile. Reads $label, $value, and optional $icon from + * get_query_var(), because get_template_part() does not forward its $args + * parameter into the partial's local scope. $icon MUST be aria-hidden + * decorative markup; the label is the accessible name. * * @package KsPortfolio */ namespace KsPortfolio; -if ( ! isset( $label ) || ! isset( $value ) ) { +$stat_label = get_query_var( 'label' ); +$stat_value = get_query_var( 'value' ); +$icon = get_query_var( 'icon' ); + +if ( ! isset( $stat_label ) || ! isset( $stat_value ) ) { return; } -$stat_label = (string) $label; -$stat_value = (string) $value; + +$stat_label = (string) $stat_label; +$stat_value = (string) $stat_value; ?>
- +