From a17c578433ef543e220697813a9367a260df83e1 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 28 May 2026 19:14:31 +0000
Subject: [PATCH] =new gitblit setup

---
 content/development.php |   86 ++++++++++++++++++++++++++++--------------
 1 files changed, 57 insertions(+), 29 deletions(-)

diff --git a/content/development.php b/content/development.php
index ce43adb..9be1497 100644
--- a/content/development.php
+++ b/content/development.php
@@ -3,6 +3,7 @@
 // /content/development.php
 use JVBase\meta\Meta;
 use JVBase\registrar\Registrar;
+use JVBase\utility\Image;
 
 if (!defined('ABSPATH')) {
     exit;
@@ -16,6 +17,7 @@
 add_filter('ajv_DevelopmentSchemaDefault', 'ajv_development_schema');
 add_filter('ajv_DevelopmentMetaDefault', 'ajv_development_meta');
 add_filter('ajv_DevelopmentArchiveDefault', 'ajv_development_archive');
+add_filter('ajv_DevelopmentExtras', 'ajv_development_extras');
 
 function ajv_development(){
     if (!class_exists('JVBase\registrar\Registrar')) {
@@ -143,7 +145,25 @@
         ]
     ]);
 }
-//
+
+function ajv_development_extras(array $extras):array
+{
+    return [[
+        'type'          => 'JVBase\managers\SEO\render\Thing\Intangible\Service',
+        'id'            => get_post_type_archive_link(BASE.'development').'#service',
+        'name'          => 'Custom Website Development in Edmonton, Alberta',
+        'description'   => 'Custom website development by Canadian developer Jake Vanderwerf.
+        Whether you\'re looking for custom functionality, integration of your services, or a completely custom development solutions.',
+        'url'           => get_post_type_archive_link(BASE.'development'),
+        'provider'      => ['id' => get_home_url(null, '#localbusiness')],
+        'areaServed'    => [
+            '@type' => 'JVBase\managers\SEO\render\Thing\Place\AdministrativeArea\Country',
+            'name'  => 'Canada'
+        ],
+    ]];
+
+}
+
 //function ajv_development():array
 //{
 //    return [
@@ -313,7 +333,8 @@
 //}
 
 
-function ajv_render_development_content(array $block, string $content):string
+
+function ajv_prerender_development_content(array $block, ?string $content, ?WP_Block $parent):?string
 {
     $out = '';
     $ID = get_the_ID();
@@ -321,49 +342,53 @@
 
     $fields = $meta->getAll();
 
+
+
     $bits = [];
-    if (array_key_exists('post_excerpt', $fields) && !empty($fields['post_excerpt'])) {
-        $bits[] = sprintf(
-            '<section id="excerpt"><h2>At a Glance</h2>%s</section>',
-            jvb_filter_content($fields['post_excerpt'])
+    $excerpt = '';
+
+    $rows = [];
+    foreach (['project', 'form', 'city', 'style', 'theme'] as $type) {
+
+        if (!empty($fields[$type])) {
+            $rows[] = jvbMetaTermList($fields[$type], $type);
+        }
+
+    }
+    if (!empty($rows)) {
+        $excerpt .= sprintf(
+            '<ul class="summary">%s</ul>',
+            implode('', array_map(function ($row) {
+                return '<li>'.$row.'</li>';
+            }, $rows))
         );
     }
 
-    if (array_key_exists('url', $fields) && !empty($fields['url'])) {
+    if (!empty($fields['post_excerpt']??'')) {
+        $excerpt .= wpautop($fields['post_excerpt']);
+    }
+    if (!empty($excerpt)) {
+        $bits[] = sprintf('<section id="summary"><h3>At a Glance</h3>%s</section>',$excerpt);
+    }
+
+    if (!empty($fields['gallery']??'')) {
         $bits[] = sprintf(
-            '<section id="url"><a class="button" href="%s" target="_blank">See it Live</a></section>',
-            $fields['url']
+            '<section id="gallery"><h2>Gallery</h2>%s</section>',
+            Image::gallery($fields['gallery'])
         );
     }
 
-    if (array_key_exists('gallery', $fields) && !empty($fields['gallery'])) {
-        $gallery = explode(',',$fields['gallery']);
-        $gallery = array_map(function ($imgID) {
-            $out = '<figure>'.jvbFormatImage($imgID,'tiny','medium');
-            $caption = wp_get_attachment_caption($imgID);
-            $out .= ($caption && $caption !== '') ? '<figcaption>'.jvb_filter_content($caption).'</figcaption>' : '';
-            $out .= '</figure>';
-            return $out;
-
-        }, $gallery);
-        $gallery = implode('',$gallery);
-        $bits[] = sprintf(
-            '<section id="gallery"><h2>Gallery</h2><div>%s</div></section>',
-            $gallery
-        );
-    }
-
-    if (array_key_exists('post_content', $fields) && !empty($fields['post_content'])) {
+    if (!empty($fields['post_content']??'')) {
         $bits[] = sprintf(
             '<section id="content">%s</section>',
             $fields['post_content']
         );
     }
 
-    if (array_key_exists('needs', $fields) && !empty($fields['needs'])) {
+    if (!empty($fields['needs']??'')) {
         $bits[] = ajvb_format_needs($fields['needs']);
     }
-    if (array_key_exists('wants', $fields) && !empty($fields['wants'])) {
+    if (!empty($fields['wants']??'')) {
         $bits[] = ajvb_format_wants($fields['wants']);
     }
 
@@ -382,6 +407,9 @@
     return [
         'type'              => 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork',
         'name'              => '{{post_title}} | Canadian Development',
+        'about'             => [
+
+        ],
         'description'       => '{{post_excerpt}}',
         'thumbnail'         => '{{post_thumbnail}}',
         'dateCreated'       => '{{post_date}}',

--
Gitblit v1.10.0