Refactor theme comments and descriptions to use a consistent hyphen format instead of an em dash. Update color palette values in theme settings and JSON configuration for improved aesthetics. Enhance contact section icons with Font Awesome for better visual representation. Add GitHub Copilot and contributor instructions for improved collaboration and development practices.

This commit is contained in:
Matt Batchelder
2026-02-20 22:06:53 -05:00
parent 19ee98c68d
commit 025df5fd24
24 changed files with 726 additions and 324 deletions

View File

@@ -1,6 +1,6 @@
<?php
/**
* Asset Enqueuing frontend styles, scripts, and editor additions.
* Asset Enqueuing - frontend styles, scripts, and editor additions.
*
* @package OTS_Theme
*/
@@ -20,7 +20,7 @@ add_action( 'wp_enqueue_scripts', function () {
ORIBI_VERSION
);
// Main JS dark mode, sticky header, mobile nav, scroll animations
// Main JS - dark mode, sticky header, mobile nav, scroll animations
wp_enqueue_script(
'oribi-main',
ORIBI_URI . '/assets/js/main.js',
@@ -60,7 +60,7 @@ add_action( 'enqueue_block_editor_assets', function () {
);
} );
/* ── Google Fonts dynamic based on theme settings ────────── */
/* ── Google Fonts - dynamic based on theme settings ────────── */
add_action( 'wp_enqueue_scripts', 'oribi_enqueue_selected_fonts' );
add_action( 'enqueue_block_editor_assets', 'oribi_enqueue_selected_fonts' );

View File

@@ -1,6 +1,6 @@
<?php
/**
* Font Manager Bridges the WordPress Font Library with theme settings.
* Font Manager - Bridges the WordPress Font Library with theme settings.
*
* Uses the built-in Font Library (WP 6.5+) for registration, discovery,
* and @font-face generation. The admin settings page uses the helpers

View File

@@ -1,6 +1,6 @@
<?php
/**
* Theme Setup registers supports, menus, patterns, and editor styles.
* Theme Setup - registers supports, menus, patterns, and editor styles.
*
* @package OTS_Theme
*/
@@ -50,10 +50,10 @@ add_action( 'after_setup_theme', function () {
/* ── Block pattern categories ──────────────────────────────── */
add_action( 'init', function () {
register_block_pattern_category( 'oribi-pages', [
'label' => __( 'Oribi Tech Pages', 'ots-theme' ),
'label' => __( 'Oribi Tech - Pages', 'ots-theme' ),
] );
register_block_pattern_category( 'oribi-sections', [
'label' => __( 'Oribi Tech Sections', 'ots-theme' ),
'label' => __( 'Oribi Tech - Sections', 'ots-theme' ),
] );
} );

View File

@@ -1,6 +1,6 @@
<?php
/**
* Theme Defaults Provides default values for all customizable design tokens.
* Theme Defaults - Provides default values for all customizable design tokens.
*
* These defaults match the original hardcoded values so existing sites
* see no visual change when upgrading.
@@ -24,37 +24,37 @@ function oribi_get_theme_defaults() {
return [
/* ── Light-mode colour palette ──────────────────────── */
'color_primary' => '#D83302',
'color_primary_dk' => '#B52B02',
'color_primary_lt' => '#FEF0EB',
'color_accent' => '#00757c',
'color_accent_dk' => '#005a60',
'color_accent_lt' => '#E6F4F5',
'color_dark' => '#0D1321',
'color_dark_2' => '#1A2236',
'color_text' => '#2D3748',
'color_text_muted' => '#718096',
'color_border' => '#E2E8F0',
'color_primary' => '#004225',
'color_primary_dk' => '#002E1A',
'color_primary_lt' => '#E8F5E9',
'color_accent' => '#4CAF50',
'color_accent_dk' => '#388E3C',
'color_accent_lt' => '#E8F5E9',
'color_dark' => '#111111',
'color_dark_2' => '#1A1A1A',
'color_text' => '#333333',
'color_text_muted' => '#666666',
'color_border' => '#E0E0E0',
'color_bg' => '#FFFFFF',
'color_bg_alt' => '#FFF8F5',
'color_bg_alt' => '#F5F5F5',
/* ── Dark-mode colour palette ───────────────────────── */
'dark_primary' => '#FF6B3D',
'dark_primary_dk' => '#D83302',
'dark_primary_lt' => 'rgba(216,51,2,0.15)',
'dark_accent' => '#00757c',
'dark_accent_dk' => '#005a60',
'dark_accent_lt' => 'rgba(0,117,124,0.15)',
'dark_dark' => '#E2E8F0',
'dark_dark_2' => '#CBD5E0',
'dark_text' => '#CBD5E0',
'dark_text_muted' => '#A0AEC0',
'dark_border' => '#2D3748',
'dark_bg' => '#0F1724',
'dark_bg_alt' => '#151F30',
'dark_bg_dark' => '#0A0F1A',
'dark_heading' => '#F7FAFC',
'dark_card_bg' => '#151F30',
'dark_primary' => '#4CAF50',
'dark_primary_dk' => '#004225',
'dark_primary_lt' => 'rgba(0,66,37,0.15)',
'dark_accent' => '#66BB6A',
'dark_accent_dk' => '#4CAF50',
'dark_accent_lt' => 'rgba(76,175,80,0.15)',
'dark_dark' => '#E0E0E0',
'dark_dark_2' => '#BDBDBD',
'dark_text' => '#E0E0E0',
'dark_text_muted' => '#9E9E9E',
'dark_border' => '#333333',
'dark_bg' => '#1A1A1A',
'dark_bg_alt' => '#222222',
'dark_bg_dark' => '#111111',
'dark_heading' => '#F5F5F5',
'dark_card_bg' => '#222222',
/* ── Typography ─────────────────────────────────────── */
'font_family' => 'inter', // slug from WP Font Library

View File

@@ -1,6 +1,6 @@
<?php
/**
* Theme Generator Builds and caches a CSS file from saved design tokens.
* Theme Generator - Builds and caches a CSS file from saved design tokens.
*
* Reads theme-mods written by the admin settings page and produces a
* static CSS file in the uploads directory. The file is enqueued after
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* Return the absolute filesystem path of the generated CSS file.
*
* Multi-site aware each site gets its own file.
* Multi-site aware - each site gets its own file.
*
* @return string
*/
@@ -38,10 +38,10 @@ function oribi_generated_css_url() {
}
/**
* Helper: convert a hex colour like #D83302 to its "r,g,b" string.
* Helper: convert a hex colour like #004225 to its "r,g,b" string.
*
* @param string $hex Hex colour with or without leading #.
* @return string e.g. "216,51,2"
* @return string e.g. "0,66,37"
*/
function oribi_hex_to_rgb( $hex ) {
$hex = ltrim( $hex, '#' );
@@ -124,7 +124,7 @@ function oribi_build_css() {
// Build CSS.
$css = <<<CSS
/* ================================================================
OTS Theme Generated Theme Overrides
OTS Theme - Generated Theme Overrides
Generated: %s
================================================================ */

View File

@@ -1,6 +1,6 @@
<?php
/**
* Theme Settings Custom admin page for configuring colours, fonts,
* Theme Settings - Custom admin page for configuring colours, fonts,
* spacing, and border-radius design tokens.
*
* Appearance → Theme Design Settings
@@ -63,7 +63,7 @@ add_action( 'admin_init', function () {
$defaults = oribi_get_theme_defaults();
// Determine action save or reset.
// Determine action - save or reset.
$action = isset( $_POST['oribi_action'] ) ? sanitize_text_field( wp_unslash( $_POST['oribi_action'] ) ) : 'save';
if ( 'reset' === $action ) {
@@ -314,7 +314,7 @@ function oribi_render_settings_page() {
</th>
<td>
<select id="oribi_font_heading" name="oribi_font_heading" class="oribi-font-select">
<option value=""><?php esc_html_e( ' Same as body font ', 'ots-theme' ); ?></option>
<option value=""><?php esc_html_e( '- Same as body font -', 'ots-theme' ); ?></option>
<?php foreach ( $fonts as $f ) : ?>
<option
value="<?php echo esc_attr( $f['slug'] ); ?>"
@@ -631,31 +631,31 @@ document.addEventListener('DOMContentLoaded', function() {
var heroText = document.getElementById('preview-hero-text');
if (hero) {
hero.style.backgroundColor = get('oribi_color_dark') || '#0D1321';
hero.style.backgroundColor = get('oribi_color_dark') || '#111111';
if (heroTitle) heroTitle.style.color = '#fff';
if (heroText) heroText.style.color = 'rgba(255,255,255,.8)';
}
if (btnP) {
btnP.style.backgroundColor = get('oribi_color_primary') || '#D83302';
btnP.style.backgroundColor = get('oribi_color_primary') || '#004225';
btnP.style.borderRadius = (get('oribi_radius_sm') || '6') + 'px';
}
if (btnA) {
btnA.style.backgroundColor = get('oribi_color_accent') || '#00757c';
btnA.style.backgroundColor = get('oribi_color_accent') || '#4CAF50';
btnA.style.borderRadius = (get('oribi_radius_sm') || '6') + 'px';
}
if (section) {
section.style.backgroundColor = get('oribi_color_bg_alt') || '#FFF8F5';
section.style.backgroundColor = get('oribi_color_bg_alt') || '#F5F5F5';
}
if (card) {
card.style.backgroundColor = get('oribi_color_bg') || '#fff';
card.style.borderColor = get('oribi_color_border') || '#E2E8F0';
card.style.borderRadius = (get('oribi_radius_md') || '12') + 'px';
card.style.borderColor = get('oribi_color_border') || '#E0E0E0';
card.style.borderRadius = (get('oribi_radius_md') || '10') + 'px';
var h4 = card.querySelector('h4');
if (h4) h4.style.color = get('oribi_color_dark') || '#0D1321';
if (h4) h4.style.color = get('oribi_color_dark') || '#111111';
var p = card.querySelector('p');
if (p) p.style.color = get('oribi_color_text') || '#2D3748';
if (p) p.style.color = get('oribi_color_text') || '#333333';
var sm = card.querySelector('small');
if (sm) sm.style.color = get('oribi_color_text_muted') || '#718096';
if (sm) sm.style.color = get('oribi_color_text_muted') || '#666666';
}
// Radius previews.