<?php
/**
 * Standalone public demo board template.
 *
 * @package WPStack_Sandbox
 */

declare(strict_types=1);

if (!defined('ABSPATH')) {
    exit;
}

$wpsdBranding = (new \WPStack\Sandbox\Infrastructure\SettingsRepository())->branding();
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php wp_head(); ?>
</head>
<body <?php body_class('wpstack-demo-board'); ?>>
<?php wp_body_open(); ?>
<header class="wpsd-site-head">
    <a href="<?php echo esc_url(network_home_url('/')); ?>" aria-label="<?php echo esc_attr($wpsdBranding['brand_name'] . ' demo home'); ?>">
        <span class="wpsd-logo-mark"><?php echo esc_html(strtoupper(substr($wpsdBranding['brand_name'], 0, 1))); ?></span>
        <span><?php echo esc_html(strtoupper($wpsdBranding['brand_name'])); ?> <small><?php echo esc_html(strtoupper($wpsdBranding['lab_label'])); ?></small></span>
    </a>
    <a class="wpsd-main-site" href="<?php echo esc_url($wpsdBranding['brand_url']); ?>" rel="noopener">Visit website <span aria-hidden="true">↗</span></a>
</header>
<?php
while (have_posts()) {
    the_post();
    the_content();
}
?>
<footer class="wpsd-site-foot">
    <p>© <?php echo esc_html(gmdate('Y') . ' ' . $wpsdBranding['brand_name']); ?></p>
    <p>Private demos · No registration · Automatic deletion</p>
</footer>
<?php wp_footer(); ?>
</body>
</html>
