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; ?>
- +