diff --git a/assets/css/layout.css b/assets/css/layout.css
new file mode 100644
index 0000000..a517ca3
--- /dev/null
+++ b/assets/css/layout.css
@@ -0,0 +1,226 @@
+/* CHRNX shell: stable, compact, and intentionally free of scroll animation. */
+
+html[data-theme="light"] body {
+ background: var(--wp--preset--color--paper);
+ color: var(--wp--preset--color--ink);
+}
+
+html[data-theme="light"] h1,
+html[data-theme="light"] h2,
+html[data-theme="light"] h3,
+html[data-theme="light"] h4,
+html[data-theme="light"] h5,
+html[data-theme="light"] h6 {
+ color: var(--wp--preset--color--ink);
+}
+
+header.wp-block-template-part {
+ position: sticky;
+ z-index: 100;
+ top: 0;
+ background: color-mix(in srgb, var(--wp--preset--color--night) 94%, transparent);
+ border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 40%, transparent);
+ backdrop-filter: blur(12px);
+}
+
+html[data-theme="light"] header.wp-block-template-part {
+ background: color-mix(in srgb, var(--wp--preset--color--paper) 94%, transparent);
+ border-bottom-color: var(--wp--preset--color--border);
+}
+
+.chrnx-site-header__inner,
+.chrnx-site-footer__inner {
+ gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
+ max-width: var(--wp--style--global--wide-size);
+ margin-inline: auto;
+ padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
+}
+
+.chrnx-skip-link {
+ position: fixed;
+ z-index: 1000;
+ top: var(--wp--preset--spacing--20);
+ left: var(--wp--preset--spacing--20);
+ padding: 0.75rem 1rem;
+ transform: translateY(-200%);
+ background: var(--wp--preset--color--green);
+ color: var(--wp--preset--color--night);
+ font-weight: 700;
+}
+
+.chrnx-skip-link:focus {
+ transform: translateY(0);
+}
+
+.chrnx-site-brand {
+ display: flex;
+ align-items: center;
+ min-width: 45px;
+ min-height: 45px;
+}
+
+.chrnx-site-brand img {
+ width: clamp(8.5rem, 12vw, 10.5rem);
+ height: auto;
+}
+
+.chrnx-primary-navigation a,
+.chrnx-footer-navigation a,
+.wp-block-navigation__responsive-container-open,
+.wp-block-navigation__responsive-container-close,
+.chrnx-header-search .wp-block-search__button,
+.chrnx-header-search .wp-block-search__input {
+ min-width: 45px;
+ min-height: 45px;
+}
+
+.chrnx-primary-navigation a,
+.chrnx-footer-navigation a {
+ display: inline-flex;
+ align-items: center;
+ padding-inline: 0.55rem;
+}
+
+.chrnx-primary-navigation .wp-block-navigation__container {
+ gap: 0.25rem;
+}
+
+.chrnx-header-search {
+ width: min(10rem, 100%);
+}
+
+.chrnx-header-search .wp-block-search__inside-wrapper {
+ padding: 0;
+}
+
+.chrnx-theme-toggle {
+ display: none;
+ align-items: center;
+ gap: 0.25rem;
+ min-width: 0;
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+.chrnx-theme-enhanced .chrnx-theme-toggle {
+ display: flex;
+}
+
+.chrnx-theme-toggle legend {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+}
+
+.chrnx-theme-toggle label {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-width: 45px;
+ min-height: 45px;
+ padding: 0 0.45rem;
+ border: 1px solid transparent;
+ border-radius: 0.35rem;
+ cursor: pointer;
+}
+
+.chrnx-theme-toggle label:has(input:checked) {
+ border-color: currentcolor;
+ background: var(--wp--preset--color--panel);
+}
+
+html[data-theme="light"] .chrnx-theme-toggle label:has(input:checked) {
+ background: var(--wp--preset--color--surface);
+}
+
+.chrnx-theme-toggle input {
+ accent-color: var(--wp--preset--color--green);
+}
+
+.chrnx-theme-toggle output {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+}
+
+.chrnx-theme-noscript {
+ margin: 0;
+ font-size: var(--wp--preset--font-size--small);
+}
+
+main#chrnx-main {
+ min-height: 50vh;
+ padding-inline: var(--wp--preset--spacing--30);
+}
+
+footer.wp-block-template-part {
+ margin-top: var(--wp--preset--spacing--60);
+ border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 40%, transparent);
+}
+
+html[data-theme="light"] footer.wp-block-template-part {
+ border-top-color: var(--wp--preset--color--border);
+}
+
+.chrnx-site-footer__line,
+.chrnx-site-footer__inner .wp-block-site-title {
+ margin: 0;
+ font-size: var(--wp--preset--font-size--small);
+}
+
+@media (max-width: 780px) {
+
+ .chrnx-site-header__inner {
+ justify-content: flex-start;
+ }
+
+ .chrnx-primary-navigation {
+ margin-left: auto;
+ }
+
+ .chrnx-header-search {
+ order: 3;
+ flex: 1 1 10rem;
+ }
+
+ .chrnx-theme-toggle {
+ order: 4;
+ flex: 1 1 100%;
+ }
+
+}
+
+@media (max-width: 599px) {
+
+ html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container {
+ display: block;
+ position: static;
+ width: 100%;
+ padding: 0;
+ }
+
+ html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container-open,
+ html:not(.chrnx-theme-enhanced) .chrnx-primary-navigation .wp-block-navigation__responsive-container-close {
+ display: none;
+ }
+}
+
+@media (prefers-reduced-motion: reduce) {
+
+ .chrnx-skip-link {
+ transition: none;
+ }
+}
diff --git a/assets/js/theme-toggle.js b/assets/js/theme-toggle.js
index 1f36387..be33a50 100644
--- a/assets/js/theme-toggle.js
+++ b/assets/js/theme-toggle.js
@@ -94,11 +94,10 @@
groups.forEach( ( group ) => {
const status = group.querySelector( '[data-chrnx-theme-status]' );
if ( status ) {
- const label =
- group.dataset[ `status${ resolved[ 0 ].toUpperCase() }${ resolved.slice( 1 ) }` ] ||
- `${ resolved === 'dark' ? 'Dark' : 'Light' } theme active`;
- const systemSuffix = group.dataset.statusSystem || 'following system';
- status.textContent = explicitPreference ? label : `${ label }, ${ systemSuffix }`;
+ const resolvedName = resolved[ 0 ].toUpperCase() + resolved.slice( 1 );
+ const explicitStatus = group.dataset[ `status${ resolvedName }` ];
+ const systemStatus = group.dataset[ `statusSystem${ resolvedName }` ];
+ status.textContent = explicitPreference ? explicitStatus : systemStatus;
}
} );
};
diff --git a/blocks/site-brand/block.json b/blocks/site-brand/block.json
new file mode 100644
index 0000000..4c74ef1
--- /dev/null
+++ b/blocks/site-brand/block.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://schemas.wp.org/trunk/block.json",
+ "apiVersion": 3,
+ "name": "chrnx/site-brand",
+ "version": "0.1.0",
+ "title": "CHRNX Site Brand",
+ "category": "theme",
+ "description": "Display the local CHRNX wordmark linked to the site home.",
+ "textdomain": "chrnx",
+ "supports": { "html": false },
+ "render": "file:./render.php"
+}
diff --git a/blocks/site-brand/render.php b/blocks/site-brand/render.php
new file mode 100644
index 0000000..0c84c39
--- /dev/null
+++ b/blocks/site-brand/render.php
@@ -0,0 +1,22 @@
+
+
+ 'chrnx-site-brand' ) );
+ ?>
+ href=""
+ aria-label=""
+>
+
+
diff --git a/blocks/theme-toggle/render.php b/blocks/theme-toggle/render.php
index 42c2df7..77582f4 100644
--- a/blocks/theme-toggle/render.php
+++ b/blocks/theme-toggle/render.php
@@ -20,7 +20,8 @@ $chrnx_control_name = wp_unique_id( 'chrnx-theme-' );
?>
data-status-light=""
data-status-dark=""
- data-status-system=""
+ data-status-system-light=""
+ data-status-system-dark=""
>
@@ -28,3 +29,4 @@ $chrnx_control_name = wp_unique_id( 'chrnx-theme-' );
+
diff --git a/inc/assets.php b/inc/assets.php
index c67125f..97e66bd 100644
--- a/inc/assets.php
+++ b/inc/assets.php
@@ -15,5 +15,11 @@ function chrnx_enqueue_assets() {
array(),
CHRNX_VERSION
);
+ wp_enqueue_style(
+ 'chrnx-layout',
+ get_theme_file_uri( 'assets/css/layout.css' ),
+ array( 'chrnx-base' ),
+ CHRNX_VERSION
+ );
}
add_action( 'wp_enqueue_scripts', 'chrnx_enqueue_assets' );
diff --git a/inc/blocks.php b/inc/blocks.php
index eb78979..1b92591 100644
--- a/inc/blocks.php
+++ b/inc/blocks.php
@@ -74,7 +74,7 @@ function chrnx_get_editorial_card_markup( $post_id, $heading_level = 3, $class_n
/** Register all block metadata directories that exist. */
function chrnx_register_editorial_blocks() {
- $blocks = array( 'featured-stories', 'journal-stream', 'latest-podcast', 'podcast-meta', 'topic-hero', 'related-posts', 'subscribe-cta', 'theme-toggle' );
+ $blocks = array( 'featured-stories', 'journal-stream', 'latest-podcast', 'podcast-meta', 'topic-hero', 'related-posts', 'subscribe-cta', 'theme-toggle', 'site-brand' );
foreach ( $blocks as $block ) {
$name = 'chrnx/' . $block;
if ( WP_Block_Type_Registry::get_instance()->is_registered( $name ) ) {
diff --git a/inc/setup.php b/inc/setup.php
index fe5a0bd..de97e35 100644
--- a/inc/setup.php
+++ b/inc/setup.php
@@ -13,7 +13,8 @@ function chrnx_setup() {
add_theme_support( 'post-thumbnails' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'editor-styles' );
- add_editor_style( 'assets/css/base.css' );
+ add_editor_style( array( 'assets/css/base.css', 'assets/css/layout.css' ) );
+ remove_action( 'wp_footer', 'the_block_template_skip_link' );
add_image_size( 'chrnx-card', 720, 480, true );
}
diff --git a/inc/theme-preference.php b/inc/theme-preference.php
index 9084613..c3f4821 100644
--- a/inc/theme-preference.php
+++ b/inc/theme-preference.php
@@ -7,8 +7,12 @@
/** Print the no-flash theme resolution before stylesheet links. */
function chrnx_print_theme_preference_bootstrap() {
- ?>
-
- 'chrnx-theme-preference-bootstrap' )
+ );
}
add_action( 'wp_head', 'chrnx_print_theme_preference_bootstrap', 0 );
diff --git a/parts/footer.html b/parts/footer.html
new file mode 100644
index 0000000..e599d5a
--- /dev/null
+++ b/parts/footer.html
@@ -0,0 +1,17 @@
+
+