feat(home): build complete homepage and global templates

Scaffolds all components needed for the home and ships a working
front-page implementation covering the 9-section wireframe.

Components (assets/css/components.css)
- 13 sections per Design Handoff section 3:
  buttons, links, forms, cards (5 variants), stat callouts, header,
  nav, mega menu, drawer, footer, hero, logo strip, eyebrow,
  section title/lead, conversion banner, scroll reveal.
- All token-driven, prefixed `av-`, BEM-light. Mobile-first with
  768/1024/1280 breakpoints. Respects prefers-reduced-motion.

Global templates
- header.php: sticky header (60px mobile / 72px desktop), 5-item
  nav, language switcher, primary CTA, mobile drawer with hamburger
  toggle. Skip link first focusable element.
- footer.php: 5-column dark footer (Solutions, Industries, Why
  Asterion, Why Asterion, Newsletter), bottom strip with legal
  links + social.
- index.php: archive/search/blog fallback rendering posts in
  card-blog layout.
- front-page.php: full home with 9 sections, EN copy lifted
  verbatim from PDF Strategie D.1:
    1. Hero "Your Last Mistake Should Be in VR." + 2 CTAs
    2. Trust bar (placeholder logos + 4 inline metrics)
    3. Solutions: MY / FLEX / ACADEMY (3 cards)
    4. Industries: Police / SF / Military / Firefighters (2x2)
    5. Feature heroes: UWeD, Instructor Cockpit, AAR (alternating)
    6. Featured case study with 3 stat callouts
    7. Testimonials (3 quote cards)
    8. Latest insights (queries `post`; placeholder when empty)
    9. Conversion banner (Demo / T&E / Quote)

Verified: HTTP 200 on http://localhost:10004/, 73 KB HTML, 418 ms.

Outstanding (deferred)
- Hero video master + photographs (see MISSING-ASSETS.md)
- Mega menu content (links currently flat to section index)
- Form posts (newsletter currently no-op POST)
- Bricks license activation (manual, requires user key)
- WPML setup wizard (manual, requires user key)
- Lighthouse + axe full audit (visual env required)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-09 12:08:43 +02:00
parent 6f62082dc4
commit 773f137eb7
5 changed files with 1462 additions and 97 deletions

View File

@@ -0,0 +1,70 @@
<?php
/**
* Asterion Bricks — Default index template
*
* Fallback used by WordPress when no more specific template matches.
* Renders standard post lists for archives and the blog hub.
*
* @package AsterionBricks
*/
defined('ABSPATH') || exit;
get_header();
?>
<section class="av-section">
<div class="av-container av-container--narrow">
<?php if (have_posts()) : ?>
<header class="av-section__head">
<?php if (is_archive()) : ?>
<h1 class="av-section__title"><?php the_archive_title(); ?></h1>
<?php $desc = get_the_archive_description(); if ($desc) : ?>
<div class="av-section__lead"><?php echo wp_kses_post($desc); ?></div>
<?php endif; ?>
<?php elseif (is_search()) : ?>
<h1 class="av-section__title"><?php printf(esc_html__('Search results for « %s »', 'asterion-bricks'), get_search_query()); ?></h1>
<?php elseif (is_home()) : ?>
<h1 class="av-section__title"><?php esc_html_e('Insights', 'asterion-bricks'); ?></h1>
<?php endif; ?>
</header>
<div class="av-stack av-stack--xl">
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class('av-card av-card--blog'); ?> style="display:block;background:transparent;box-shadow:none;border-bottom:1px solid var(--color-border-subtle);padding-bottom:var(--space-8);">
<header style="display:flex;flex-direction:column;gap:var(--space-2);margin-bottom:var(--space-3);">
<span class="av-eyebrow"><?php echo esc_html(get_the_date()); ?></span>
<h2 style="font-family:var(--font-display);font-size:var(--text-h2);line-height:var(--leading-h2);font-weight:var(--font-weight-bold);">
<a href="<?php the_permalink(); ?>" style="color:inherit;text-decoration:none;"><?php the_title(); ?></a>
</h2>
</header>
<div style="color:var(--color-text-secondary);font-size:var(--text-body-md);line-height:var(--leading-body-md);">
<?php the_excerpt(); ?>
</div>
<p style="margin-top:var(--space-3);">
<a href="<?php the_permalink(); ?>" class="av-link av-link--with-arrow"><?php esc_html_e('Read more', 'asterion-bricks'); ?></a>
</p>
</article>
<?php endwhile; ?>
</div>
<nav class="av-pagination" style="margin-top:var(--space-12);">
<?php the_posts_pagination([
'mid_size' => 1,
'prev_text' => esc_html__('← Previous', 'asterion-bricks'),
'next_text' => esc_html__('Next →', 'asterion-bricks'),
]); ?>
</nav>
<?php else : ?>
<header class="av-section__head">
<h1 class="av-section__title"><?php esc_html_e('Nothing here yet.', 'asterion-bricks'); ?></h1>
<p class="av-section__lead"><?php esc_html_e('No content matches your request. Try a different search, or head back home.', 'asterion-bricks'); ?></p>
</header>
<p><a class="av-btn av-btn--primary av-btn--md" href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('Back to home', 'asterion-bricks'); ?></a></p>
<?php endif; ?>
</div>
</section>
<?php get_footer(); ?>