feat(child-theme): scaffold asterion-bricks v0.1.0

Initial child theme structure inheriting from Bricks parent. Token-driven,
RGPD-native, mobile-first foundation ready for component and template work.

What's in this commit
- style.css: WP theme metadata (Template: bricks, v0.1.0)
- functions.php: enqueue cascade tokens -> utilities -> components,
  defer-loaded main.js, font preload, theme support, image sizes
  (av-hero 2400x1350, av-card 800x600, av-thumb 400x300), Gutenberg
  default styles dequeued
- theme.json: Gutenberg color/typo palette mirroring tokens
- assets/css/tokens.css: full design system per Design Handoff section 2
  (brand colors, neutrals, semantics, type scale + line-heights, 8pt
  spacing, radii, shadows, z-index, motion, prefers-reduced-motion)
- assets/css/utilities.css: modern reset + .av-container, .av-skip-link,
  .av-sr-only, .av-stack, .av-section helpers, opinionated heading scale
- assets/css/components.css: index of planned components + buttons
  (5 variants x 4 sizes per Design Handoff section 3.1) and links
- assets/js/main.js: vanilla skeleton with header scroll, IntersectionObserver
  reveal, count-up, mobile drawer; respects prefers-reduced-motion
- inc/cpt.php: register_post_type case_study (slug /customers/) + scenario
  (slug /scenarios/) + shared 'industry' taxonomy
- inc/seo.php: Organization JSON-LD on home; placeholders for Product,
  Article, FAQPage, BreadcrumbList
- assets/fonts/: Inter Variable + Italic WOFF2 self-hosted (RGPD; no
  Google Fonts CDN). Inter Display @font-face commented — Inter 4+ uses
  opsz axis from the same file.

Out of scope (intentionally deferred)
- Component fills: cards, forms, navigation, alerts, modals, tabs (placeholders)
- Page templates: home and beyond
- Bricks JSON template exports
- Schema.org Product / Article / FAQPage / BreadcrumbList implementations

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 11:49:10 +02:00
parent f9192631ff
commit 6f62082dc4
15 changed files with 1359 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
<?php
/**
* Asterion Bricks — Custom Post Types
*
* Registers the post types unique to asterionvr.com :
*
* - case_study : long-form deployment write-ups, archived under /customers/
* used in /customers/ hub and /industries/* « relevant case »
* sections.
* - scenario : individual training scenarios (vehicle stop, urban CQB,
* riot containment...) referenced from /technology/scenarios/
* and from each /industries/* page.
*
* Blog posts stay on the native `post` type (per BRIEF section 6).
*
* @package AsterionBricks
* @since 0.1.0
*/
defined('ABSPATH') || exit;
add_action('init', function () {
/* -- case_study --------------------------------------------------- */
register_post_type('case_study', [
'label' => __('Case Studies', 'asterion-bricks'),
'labels' => [
'name' => __('Case Studies', 'asterion-bricks'),
'singular_name' => __('Case Study', 'asterion-bricks'),
'menu_name' => __('Case Studies', 'asterion-bricks'),
'add_new' => __('Add New', 'asterion-bricks'),
'add_new_item' => __('Add New Case Study', 'asterion-bricks'),
'edit_item' => __('Edit Case Study', 'asterion-bricks'),
'new_item' => __('New Case Study', 'asterion-bricks'),
'view_item' => __('View Case Study', 'asterion-bricks'),
'search_items' => __('Search Case Studies', 'asterion-bricks'),
'not_found' => __('No case studies found', 'asterion-bricks'),
'not_found_in_trash' => __('No case studies in trash', 'asterion-bricks'),
'featured_image' => __('Hero image', 'asterion-bricks'),
'archives' => __('Customers', 'asterion-bricks'),
],
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_rest' => true, // Bricks + Gutenberg
'show_in_nav_menus' => true,
'menu_icon' => 'dashicons-portfolio',
'menu_position' => 22,
'capability_type' => 'post',
'has_archive' => 'customers',
'hierarchical' => false,
'rewrite' => [
'slug' => 'customers',
'with_front' => false,
'feeds' => true,
'pages' => true,
],
'supports' => ['title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'revisions'],
]);
/* -- scenario ----------------------------------------------------- */
register_post_type('scenario', [
'label' => __('Scenarios', 'asterion-bricks'),
'labels' => [
'name' => __('Scenarios', 'asterion-bricks'),
'singular_name' => __('Scenario', 'asterion-bricks'),
'menu_name' => __('Scenarios', 'asterion-bricks'),
'add_new_item' => __('Add New Scenario', 'asterion-bricks'),
'edit_item' => __('Edit Scenario', 'asterion-bricks'),
'new_item' => __('New Scenario', 'asterion-bricks'),
'view_item' => __('View Scenario', 'asterion-bricks'),
'search_items' => __('Search Scenarios', 'asterion-bricks'),
'featured_image' => __('Scenario thumbnail', 'asterion-bricks'),
],
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_rest' => true,
'show_in_nav_menus' => true,
'menu_icon' => 'dashicons-shield',
'menu_position' => 23,
'capability_type' => 'post',
'has_archive' => 'scenarios',
'hierarchical' => false,
'rewrite' => [
'slug' => 'scenarios',
'with_front' => false,
],
'supports' => ['title', 'editor', 'thumbnail', 'excerpt', 'custom-fields', 'revisions'],
]);
/* -- Taxonomy : industry (shared between case_study and scenario)
-- Lets us tag content by Police / Special Forces / Military / Firefighters
-- so the /industries/* pages can pull related items dynamically.
--------------------------------------------------------------- */
register_taxonomy('industry', ['case_study', 'scenario'], [
'label' => __('Industries', 'asterion-bricks'),
'labels' => [
'name' => __('Industries', 'asterion-bricks'),
'singular_name' => __('Industry', 'asterion-bricks'),
'add_new_item' => __('Add Industry', 'asterion-bricks'),
'all_items' => __('All Industries', 'asterion-bricks'),
],
'public' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'hierarchical' => true,
'rewrite' => ['slug' => 'industry', 'with_front' => false],
]);
});
/**
* Flush rewrite rules on theme activation so new slugs (/customers/, /scenarios/)
* resolve immediately without manual « Save permalinks » in WP admin.
*/
add_action('after_switch_theme', function () {
flush_rewrite_rules();
});

View File

@@ -0,0 +1,60 @@
<?php
/**
* Asterion Bricks — SEO module
*
* Hosts custom Schema.org JSON-LD and any meta-tag overrides specific to
* Asterion VR. Most generic SEO (title tags, OG, sitemap) is delegated to
* Rank Math or Yoast (per BRIEF section 4).
*
* Planned :
* - Organization schema on home + footer-rendered pages
* - Product schema on /solutions/* pages (each tier = a Product)
* - Article schema on /insights/<slug>/
* - FAQPage schema on /trust/ and conversion templates
* - BreadcrumbList schema site-wide
*
* @package AsterionBricks
* @since 0.1.0
*/
defined('ABSPATH') || exit;
/**
* Inject Organization JSON-LD on the home page.
* Safe minimum — extended once logos/SameAs URLs are confirmed.
*/
add_action('wp_head', function () {
if (! is_front_page()) {
return;
}
$org = [
'@context' => 'https://schema.org',
'@type' => 'Organization',
'name' => 'Asterion VR',
'url' => home_url('/'),
'logo' => get_stylesheet_directory_uri() . '/assets/img/logo-asterion-vr.svg',
'foundingDate' => '2016',
'address' => [
'@type' => 'PostalAddress',
'addressLocality' => 'Montgermont',
'addressRegion' => 'Bretagne',
'addressCountry' => 'FR',
],
'sameAs' => [
// TODO : confirm public profiles with client.
// 'https://www.linkedin.com/company/asterion-vr/',
// 'https://www.youtube.com/@asterionvr',
],
];
printf(
"<script type=\"application/ld+json\">%s</script>\n",
wp_json_encode($org, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
);
}, 5);
// TODO : Product schema for /solutions/<tier>/ pages.
// TODO : Article schema for /insights/<slug>/ pages.
// TODO : FAQPage schema for /trust/ and conversion pages.
// TODO : BreadcrumbList schema site-wide.