diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist
index ace4a71..3c2a37e 100644
--- a/.phpcs.xml.dist
+++ b/.phpcs.xml.dist
@@ -26,4 +26,9 @@
+
+
+
+
+
diff --git a/404.php b/404.php
index ba29ea2..e9d32f5 100644
--- a/404.php
+++ b/404.php
@@ -1,36 +1,36 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/archive-peptide.php b/archive-peptide.php
index 34cf42c..d6f8d6d 100644
--- a/archive-peptide.php
+++ b/archive-peptide.php
@@ -70,4 +70,5 @@ get_header();
- {
- link.addEventListener('click', closeMenu);
- });
-
- // Close menu on Escape key
- document.addEventListener('keydown', (e) => {
- if (e.key === 'Escape') {
- closeMenu();
- }
- });
-
- // Set initial aria-expanded state
- menuToggle.setAttribute('aria-expanded', 'false');
-
- // Close menu when window is resized above mobile breakpoint
- const mediaQuery = window.matchMedia('(min-width: 768px)');
- mediaQuery.addEventListener('change', (e) => {
- if (e.matches) {
- closeMenu();
- }
- });
-})();
+/**
+ * Navigation and Mobile Menu Toggle
+ * Peptide Starter Theme
+ *
+ * Handles:
+ * - Mobile hamburger menu toggle
+ * - Navigation overlay click handling
+ * - Menu state persistence
+ */
+
+(function() {
+ 'use strict';
+
+ const menuToggle = document.querySelector('.menu-toggle');
+ const primaryNav = document.querySelector('.primary-navigation');
+ const navOverlay = document.querySelector('.nav-overlay');
+
+ if (!menuToggle || !primaryNav || !navOverlay) {
+ return;
+ }
+
+ /**
+ * Toggle mobile menu visibility
+ */
+ function toggleMenu() {
+ const isActive = primaryNav.classList.contains('active');
+
+ if (isActive) {
+ closeMenu();
+ } else {
+ openMenu();
+ }
+ }
+
+ /**
+ * Open mobile menu
+ */
+ function openMenu() {
+ primaryNav.classList.add('active');
+ navOverlay.classList.add('active');
+ document.body.style.overflow = 'hidden';
+ menuToggle.setAttribute('aria-expanded', 'true');
+ }
+
+ /**
+ * Close mobile menu
+ */
+ function closeMenu() {
+ primaryNav.classList.remove('active');
+ navOverlay.classList.remove('active');
+ document.body.style.overflow = '';
+ menuToggle.setAttribute('aria-expanded', 'false');
+ }
+
+ // Menu toggle button click
+ menuToggle.addEventListener('click', toggleMenu);
+
+ // Overlay click
+ navOverlay.addEventListener('click', closeMenu);
+
+ // Close menu when a nav link is clicked
+ const navLinks = primaryNav.querySelectorAll('a');
+ navLinks.forEach(link => {
+ link.addEventListener('click', closeMenu);
+ });
+
+ // Close menu on Escape key
+ document.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape') {
+ closeMenu();
+ }
+ });
+
+ // Set initial aria-expanded state
+ menuToggle.setAttribute('aria-expanded', 'false');
+
+ // Close menu when window is resized above mobile breakpoint
+ const mediaQuery = window.matchMedia('(min-width: 768px)');
+ mediaQuery.addEventListener('change', (e) => {
+ if (e.matches) {
+ closeMenu();
+ }
+ });
+})();
diff --git a/assets/js/theme.js b/assets/js/theme.js
index 2db7774..cd57e02 100644
--- a/assets/js/theme.js
+++ b/assets/js/theme.js
@@ -1,210 +1,210 @@
-/**
- * Theme Utilities
- * Peptide Starter Theme
- *
- * Handles:
- * - Dark mode toggle functionality
- * - Dark mode preference persistence
- * - Plugin dark mode coordination
- * - Smooth transitions
- */
-
-(function() {
- 'use strict';
-
- const html = document.documentElement;
- const darkModeToggle = document.querySelector('.dark-mode-toggle');
- const sunIcon = document.querySelector('.sun-icon');
- const moonIcon = document.querySelector('.moon-icon');
-
- if (!darkModeToggle) {
- return;
- }
-
- /**
- * Get current theme preference
- * @returns {string} 'dark' or 'light'
- */
- function getCurrentTheme() {
- const stored = localStorage.getItem('peptide-starter-theme');
- if (stored) {
- return stored;
- }
-
- const currentAttr = html.getAttribute('data-theme');
- if (currentAttr) {
- return currentAttr;
- }
-
- const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
- return systemDark ? 'dark' : 'light';
- }
-
- /**
- * Set theme preference
- * @param {string} theme - 'dark' or 'light'
- */
- function setTheme(theme) {
- html.setAttribute('data-theme', theme);
- localStorage.setItem('peptide-starter-theme', theme);
-
- // Update icon visibility
- updateIcons(theme);
-
- // Notify plugins about theme change via custom event
- const event = new CustomEvent('themechange', {
- detail: { theme: theme }
- });
- document.dispatchEvent(event);
-
- // Also update body class for CSS hooks
- document.body.classList.remove('dark-mode', 'light-mode');
- document.body.classList.add(theme === 'dark' ? 'dark-mode' : 'light-mode');
- }
-
- /**
- * Update icon visibility based on theme
- * @param {string} theme - 'dark' or 'light'
- */
- function updateIcons(theme) {
- if (theme === 'dark') {
- sunIcon.style.display = 'block';
- moonIcon.style.display = 'none';
- } else {
- sunIcon.style.display = 'none';
- moonIcon.style.display = 'block';
- }
- }
-
- /**
- * Toggle between dark and light mode
- */
- function toggleDarkMode() {
- const currentTheme = getCurrentTheme();
- const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
- setTheme(newTheme);
- }
-
- // Initialize theme on page load
- const initialTheme = getCurrentTheme();
- setTheme(initialTheme);
-
- // Dark mode toggle button click
- darkModeToggle.addEventListener('click', toggleDarkMode);
-
- // Listen for system preference changes
- const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
- mediaQuery.addEventListener('change', (e) => {
- const stored = localStorage.getItem('peptide-starter-theme');
- if (!stored) {
- setTheme(e.matches ? 'dark' : 'light');
- }
- });
-
- // Expose API for plugins to read/listen to theme changes
- window.peptideStarterTheme = {
- getCurrentTheme: getCurrentTheme,
- setTheme: setTheme,
- toggleDarkMode: toggleDarkMode,
- };
-
- /**
- * Plugin Integration Example:
- * Plugins can listen to theme changes via:
- *
- * 1. Custom event listener:
- * document.addEventListener('themechange', function(e) {
- * console.log('Theme changed to:', e.detail.theme);
- * });
- *
- * 2. MutationObserver on data-theme:
- * const observer = new MutationObserver((mutations) => {
- * const theme = html.getAttribute('data-theme');
- * console.log('Theme is now:', theme);
- * });
- * observer.observe(html, { attributes: true });
- *
- * 3. Direct access to CSS custom properties which theme controls
- */
-
- /**
- * Smooth scroll behavior
- */
- function initSmoothScroll() {
- const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
- if (!prefersReducedMotion) {
- document.documentElement.style.scrollBehavior = 'smooth';
- }
- }
-
- initSmoothScroll();
-
- /**
- * Add focus-visible polyfill for older browsers
- */
- function initFocusVisible() {
- const isKeyboardEvent = (e) => {
- return e.mozInputSource === MOZ_SOURCE_KEYBOARD ||
- e.detail === 0 ||
- (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents === false);
- };
-
- document.addEventListener('mousedown', (e) => {
- document.body.classList.remove('keyboard-focus');
- }, true);
-
- document.addEventListener('keydown', () => {
- document.body.classList.add('keyboard-focus');
- }, true);
- }
-
- // Search overlay functionality (Peptide Search AI integration)
- const searchToggle = document.querySelector('.search-toggle');
- const searchOverlay = document.getElementById('search-overlay');
- const searchOverlayClose = document.querySelector('.search-overlay-close');
-
- function openSearchOverlay() {
- if (!searchOverlay) return;
- searchOverlay.classList.add('active');
- searchOverlay.setAttribute('aria-hidden', 'false');
- document.body.style.overflow = 'hidden';
- // Focus the search input inside the overlay
- const input = searchOverlay.querySelector('.psa-search-input, .ps-search-input, input[type="search"], input[type="text"]');
- if (input) {
- setTimeout(() => input.focus(), 100);
- }
- }
-
- function closeSearchOverlay() {
- if (!searchOverlay) return;
- searchOverlay.classList.remove('active');
- searchOverlay.setAttribute('aria-hidden', 'true');
- document.body.style.overflow = '';
- // Return focus to search toggle
- if (searchToggle) searchToggle.focus();
- }
-
- if (searchToggle) {
- searchToggle.addEventListener('click', openSearchOverlay);
- }
-
- if (searchOverlayClose) {
- searchOverlayClose.addEventListener('click', closeSearchOverlay);
- }
-
- if (searchOverlay) {
- // Close overlay when clicking the backdrop
- searchOverlay.addEventListener('click', (e) => {
- if (e.target === searchOverlay) {
- closeSearchOverlay();
- }
- });
-
- // Close on Escape key
- document.addEventListener('keydown', (e) => {
- if (e.key === 'Escape' && searchOverlay.classList.contains('active')) {
- closeSearchOverlay();
- }
- });
- }
-})();
+/**
+ * Theme Utilities
+ * Peptide Starter Theme
+ *
+ * Handles:
+ * - Dark mode toggle functionality
+ * - Dark mode preference persistence
+ * - Plugin dark mode coordination
+ * - Smooth transitions
+ */
+
+(function() {
+ 'use strict';
+
+ const html = document.documentElement;
+ const darkModeToggle = document.querySelector('.dark-mode-toggle');
+ const sunIcon = document.querySelector('.sun-icon');
+ const moonIcon = document.querySelector('.moon-icon');
+
+ if (!darkModeToggle) {
+ return;
+ }
+
+ /**
+ * Get current theme preference
+ * @returns {string} 'dark' or 'light'
+ */
+ function getCurrentTheme() {
+ const stored = localStorage.getItem('peptide-starter-theme');
+ if (stored) {
+ return stored;
+ }
+
+ const currentAttr = html.getAttribute('data-theme');
+ if (currentAttr) {
+ return currentAttr;
+ }
+
+ const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
+ return systemDark ? 'dark' : 'light';
+ }
+
+ /**
+ * Set theme preference
+ * @param {string} theme - 'dark' or 'light'
+ */
+ function setTheme(theme) {
+ html.setAttribute('data-theme', theme);
+ localStorage.setItem('peptide-starter-theme', theme);
+
+ // Update icon visibility
+ updateIcons(theme);
+
+ // Notify plugins about theme change via custom event
+ const event = new CustomEvent('themechange', {
+ detail: { theme: theme }
+ });
+ document.dispatchEvent(event);
+
+ // Also update body class for CSS hooks
+ document.body.classList.remove('dark-mode', 'light-mode');
+ document.body.classList.add(theme === 'dark' ? 'dark-mode' : 'light-mode');
+ }
+
+ /**
+ * Update icon visibility based on theme
+ * @param {string} theme - 'dark' or 'light'
+ */
+ function updateIcons(theme) {
+ if (theme === 'dark') {
+ sunIcon.style.display = 'block';
+ moonIcon.style.display = 'none';
+ } else {
+ sunIcon.style.display = 'none';
+ moonIcon.style.display = 'block';
+ }
+ }
+
+ /**
+ * Toggle between dark and light mode
+ */
+ function toggleDarkMode() {
+ const currentTheme = getCurrentTheme();
+ const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
+ setTheme(newTheme);
+ }
+
+ // Initialize theme on page load
+ const initialTheme = getCurrentTheme();
+ setTheme(initialTheme);
+
+ // Dark mode toggle button click
+ darkModeToggle.addEventListener('click', toggleDarkMode);
+
+ // Listen for system preference changes
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
+ mediaQuery.addEventListener('change', (e) => {
+ const stored = localStorage.getItem('peptide-starter-theme');
+ if (!stored) {
+ setTheme(e.matches ? 'dark' : 'light');
+ }
+ });
+
+ // Expose API for plugins to read/listen to theme changes
+ window.peptideStarterTheme = {
+ getCurrentTheme: getCurrentTheme,
+ setTheme: setTheme,
+ toggleDarkMode: toggleDarkMode,
+ };
+
+ /**
+ * Plugin Integration Example:
+ * Plugins can listen to theme changes via:
+ *
+ * 1. Custom event listener:
+ * document.addEventListener('themechange', function(e) {
+ * console.log('Theme changed to:', e.detail.theme);
+ * });
+ *
+ * 2. MutationObserver on data-theme:
+ * const observer = new MutationObserver((mutations) => {
+ * const theme = html.getAttribute('data-theme');
+ * console.log('Theme is now:', theme);
+ * });
+ * observer.observe(html, { attributes: true });
+ *
+ * 3. Direct access to CSS custom properties which theme controls
+ */
+
+ /**
+ * Smooth scroll behavior
+ */
+ function initSmoothScroll() {
+ const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
+ if (!prefersReducedMotion) {
+ document.documentElement.style.scrollBehavior = 'smooth';
+ }
+ }
+
+ initSmoothScroll();
+
+ /**
+ * Add focus-visible polyfill for older browsers
+ */
+ function initFocusVisible() {
+ const isKeyboardEvent = (e) => {
+ return e.mozInputSource === MOZ_SOURCE_KEYBOARD ||
+ e.detail === 0 ||
+ (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents === false);
+ };
+
+ document.addEventListener('mousedown', (e) => {
+ document.body.classList.remove('keyboard-focus');
+ }, true);
+
+ document.addEventListener('keydown', () => {
+ document.body.classList.add('keyboard-focus');
+ }, true);
+ }
+
+ // Search overlay functionality (Peptide Search AI integration)
+ const searchToggle = document.querySelector('.search-toggle');
+ const searchOverlay = document.getElementById('search-overlay');
+ const searchOverlayClose = document.querySelector('.search-overlay-close');
+
+ function openSearchOverlay() {
+ if (!searchOverlay) return;
+ searchOverlay.classList.add('active');
+ searchOverlay.setAttribute('aria-hidden', 'false');
+ document.body.style.overflow = 'hidden';
+ // Focus the search input inside the overlay
+ const input = searchOverlay.querySelector('.psa-search-input, .ps-search-input, input[type="search"], input[type="text"]');
+ if (input) {
+ setTimeout(() => input.focus(), 100);
+ }
+ }
+
+ function closeSearchOverlay() {
+ if (!searchOverlay) return;
+ searchOverlay.classList.remove('active');
+ searchOverlay.setAttribute('aria-hidden', 'true');
+ document.body.style.overflow = '';
+ // Return focus to search toggle
+ if (searchToggle) searchToggle.focus();
+ }
+
+ if (searchToggle) {
+ searchToggle.addEventListener('click', openSearchOverlay);
+ }
+
+ if (searchOverlayClose) {
+ searchOverlayClose.addEventListener('click', closeSearchOverlay);
+ }
+
+ if (searchOverlay) {
+ // Close overlay when clicking the backdrop
+ searchOverlay.addEventListener('click', (e) => {
+ if (e.target === searchOverlay) {
+ closeSearchOverlay();
+ }
+ });
+
+ // Close on Escape key
+ document.addEventListener('keydown', (e) => {
+ if (e.key === 'Escape' && searchOverlay.classList.contains('active')) {
+ closeSearchOverlay();
+ }
+ });
+ }
+})();
diff --git a/footer.php b/footer.php
index 0abe429..87ce9cf 100644
--- a/footer.php
+++ b/footer.php
@@ -1,82 +1,82 @@
-
-
-
-
-
-
-