From bf41df9ad631d3e826bd653832952a9d2a9c3104 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sun, 26 Jul 2026 22:08:55 +0200 Subject: [PATCH] Document theme behavior and format editor styles --- 404.php | 3 ++- archive.php | 3 ++- assets/js/theme.js | 4 ++++ comments.php | 4 +++- editor-style.css | 42 +++++++++++++++++++++++++++++++++++++- footer.php | 3 ++- front-page.php | 7 +++++-- functions.php | 5 +++++ header.php | 7 +++++-- index.php | 3 ++- page.php | 3 ++- search.php | 7 +++++-- searchform.php | 1 + single.php | 12 +++++++---- style.css | 6 ++++++ template-parts/content.php | 6 ++++-- 16 files changed, 97 insertions(+), 19 deletions(-) diff --git a/404.php b/404.php index f3d22e0..eb17d9b 100644 --- a/404.php +++ b/404.php @@ -1,3 +1,4 @@ - +

-
1 ) ); } ?>
+
1 ) ); } ?>
{ + // Cycle the persisted preference; CSS resolves "auto" from the system setting. const root = document.documentElement; const colorModes = ['auto', 'light', 'dark']; const storedTheme = localStorage.getItem('c1024-theme'); @@ -24,6 +25,7 @@ }); } + // Hide the sticky header only while scrolling down past its own height; batch scroll work per frame. const header = document.querySelector('.site-header'); let lastY = window.scrollY; let ticking = false; @@ -38,6 +40,7 @@ }); }, { passive: true }); + // Keep the search panel accessible and close it when focus moves outside its controls. const searchToggle = document.querySelector('[data-search-toggle]'); const searchPanel = document.querySelector('[data-search-panel]'); if (searchToggle && searchPanel) { @@ -54,6 +57,7 @@ }); } + // The mobile trigger controls the header class consumed by the responsive navigation CSS. const menuToggle = document.querySelector('[data-menu-toggle]'); if (menuToggle && header) menuToggle.addEventListener('click', () => { const open = header.classList.toggle('menu-open'); diff --git a/comments.php b/comments.php index b43285b..9bc7262 100644 --- a/comments.php +++ b/comments.php @@ -1,4 +1,5 @@
@@ -8,5 +9,6 @@ if ( post_password_required() ) { return; }

- +
diff --git a/editor-style.css b/editor-style.css index 950993a..77cb63b 100644 --- a/editor-style.css +++ b/editor-style.css @@ -1 +1,41 @@ -@font-face{font-family:'Alpha Lyrae';src:url('fonts/AlphaLyrae-Medium.woff2') format('woff2')}@font-face{font-family:'Crimson Pro';src:url('fonts/crimson-pro-latin-ext-wght-normal.woff2') format('woff2')}@font-face{font-family:'Berkeley Mono';src:url('fonts/BerkeleyMono-Regular.woff2') format('woff2')}body{font-family:'Crimson Pro',Georgia,serif;font-size:22px;line-height:1.55;color:#1d1b19}h1,h2,h3,h4{font-family:'Alpha Lyrae',sans-serif;font-weight:500;letter-spacing:.025em}code,pre{font-family:'Berkeley Mono',monospace}a{color:#c3480b} +/* Editor previews use the same self-hosted faces as the front end; keep paths stylesheet-relative. */ +@font-face { + font-family: 'Alpha Lyrae'; + src: url('fonts/AlphaLyrae-Medium.woff2') format('woff2'); +} + +@font-face { + font-family: 'Crimson Pro'; + src: url('fonts/crimson-pro-latin-ext-wght-normal.woff2') format('woff2'); +} + +@font-face { + font-family: 'Berkeley Mono'; + src: url('fonts/BerkeleyMono-Regular.woff2') format('woff2'); +} + +/* Static editor equivalents of the front-end light-mode typography and accent tokens. */ +body { + font-family: 'Crimson Pro', Georgia, serif; + font-size: 22px; + line-height: 1.55; + color: #1d1b19; +} + +h1, +h2, +h3, +h4 { + font-family: 'Alpha Lyrae', sans-serif; + font-weight: 500; + letter-spacing: .025em; +} + +code, +pre { + font-family: 'Berkeley Mono', monospace; +} + +a { + color: #c3480b; +} diff --git a/footer.php b/footer.php index 0c8f237..8ea720d 100644 --- a/footer.php +++ b/footer.php @@ -4,6 +4,7 @@ 'footer', 'menu_class' => 'footer-menu', 'container' => false, 'fallback_cb' => false ) ); ?> - + diff --git a/front-page.php b/front-page.php index dccb7fa..a43f5cb 100644 --- a/front-page.php +++ b/front-page.php @@ -1,16 +1,19 @@ - +

- 1 ) ); } } else { while ( have_posts() ) { the_post(); ?>
>
+ 1 ) ); } } else { while ( have_posts() ) { the_post(); ?>
>
__( 'Footer menu', 'c1024-2026' ), ) ); } +// Register theme capabilities before WordPress initializes theme-dependent features. add_action( 'after_setup_theme', 'c1024_2026_setup' ); function c1024_2026_assets() { wp_enqueue_style( 'c1024-2026-style', get_stylesheet_uri(), array(), '1.0.0' ); wp_enqueue_script( 'c1024-2026-theme', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true ); } +// Load public assets through WordPress so dependencies and plugin integrations remain ordered. add_action( 'wp_enqueue_scripts', 'c1024_2026_assets' ); +// These settings drive the optional front-page hero without hard-coding media or copy. function c1024_2026_customize_register( $wp_customize ) { $wp_customize->add_section( 'c1024_2026_home_hero', array( 'title' => __( 'Home page video hero', 'c1024-2026' ), @@ -39,9 +42,11 @@ function c1024_2026_customize_register( $wp_customize ) { $wp_customize->add_setting( 'c1024_2026_hero_text', array( 'sanitize_callback' => 'sanitize_textarea_field' ) ); $wp_customize->add_control( 'c1024_2026_hero_text', array( 'label' => __( 'Overlay text', 'c1024-2026' ), 'section' => 'c1024_2026_home_hero', 'type' => 'textarea' ) ); } +// Customize controls are registered only while the Customizer API is available. add_action( 'customize_register', 'c1024_2026_customize_register' ); function c1024_2026_excerpt_more( $more ) { return '…'; } +// Keep generated excerpts visually concise across all card-based archive loops. add_filter( 'excerpt_more', 'c1024_2026_excerpt_more' ); diff --git a/header.php b/header.php index 2106ee5..b9aeeee 100644 --- a/header.php +++ b/header.php @@ -3,10 +3,13 @@ - + > - + +