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:
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* OTS Theme — Main JS
|
||||
* OTS Theme - Main JS
|
||||
*/
|
||||
|
||||
/* ── Theme toggle (runs before DOMContentLoaded to prevent flash) ── */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* OTS Theme — Editor-specific overrides
|
||||
* OTS Theme - Editor-specific overrides
|
||||
* Loaded only inside the Gutenberg block editor.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* OTS Theme — Custom Block Editor Scripts (InnerBlocks Architecture)
|
||||
* OTS Theme - Custom Block Editor Scripts (InnerBlocks Architecture)
|
||||
*
|
||||
* 13 blocks: 5 standalone + 4 parent/child pairs.
|
||||
* Parent blocks use InnerBlocks for child items.
|
||||
@@ -231,8 +231,8 @@ function iconControls(a, s) {
|
||||
|
||||
/**
|
||||
* Return the element to render in the card preview for the current icon state.
|
||||
* cssClass — the wrapper class, e.g. 'feature-icon' or 'value-icon'
|
||||
* extraStyle — optional inline style object for the wrapper
|
||||
* cssClass - the wrapper class, e.g. 'feature-icon' or 'value-icon'
|
||||
* extraStyle - optional inline style object for the wrapper
|
||||
*/
|
||||
function iconPreview(a, cssClass, extraStyle) {
|
||||
var useFa = a.iconType === 'fontawesome';
|
||||
@@ -272,7 +272,7 @@ function cardImageControls(a, s) {
|
||||
a.imgUrl ? el(Frag, null,
|
||||
el(RC, { label: 'Width (px)', value: imgW, min: 20, max: 600, step: 4,
|
||||
onChange: function(v){ s({ imgWidth: v }); } }),
|
||||
el(RC, { label: 'Height (px) — 0 = auto', value: imgH, min: 0, max: 600, step: 4,
|
||||
el(RC, { label: 'Height (px) - 0 = auto', value: imgH, min: 0, max: 600, step: 4,
|
||||
onChange: function(v){ s({ imgHeight: v }); } }),
|
||||
el(TG, { label: 'Scale to fill (cover)', checked: imgFit === 'cover',
|
||||
onChange: function(v){ s({ imgFit: v ? 'cover' : 'contain' }); } }),
|
||||
@@ -1738,7 +1738,7 @@ reg('oribi/site-header', {
|
||||
supports: { html: false, multiple: false, reusable: false },
|
||||
edit: function () {
|
||||
return el('div', {
|
||||
style: { background: '#0D1321', color: '#fff', padding: '20px 24px', borderRadius: '8px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }
|
||||
style: { background: '#111111', color: '#fff', padding: '20px 24px', borderRadius: '8px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }
|
||||
},
|
||||
el('div', { style: { display: 'flex', alignItems: 'center', gap: '8px' } },
|
||||
el('strong', { style: { fontSize: '1.2rem' } }, 'Oribi'),
|
||||
@@ -1762,9 +1762,9 @@ reg('oribi/site-footer', {
|
||||
supports: { html: false, multiple: false, reusable: false },
|
||||
edit: function () {
|
||||
return el('div', {
|
||||
style: { background: '#0D1321', color: '#fff', padding: '24px', borderRadius: '8px', textAlign: 'center' }
|
||||
style: { background: '#111111', color: '#fff', padding: '24px', borderRadius: '8px', textAlign: 'center' }
|
||||
},
|
||||
el('strong', { style: { fontSize: '1.1rem' } }, 'OTS Theme — Site Footer'),
|
||||
el('strong', { style: { fontSize: '1.1rem' } }, 'OTS Theme - Site Footer'),
|
||||
el('p', { style: { opacity: 0.5, margin: '8px 0 0', fontSize: '.85rem' } }, 'Brand · Service Links · Company Links · Connect · Copyright')
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* OTS Theme — Custom Gutenberg Blocks (InnerBlocks Architecture)
|
||||
* OTS Theme - Custom Gutenberg Blocks (InnerBlocks Architecture)
|
||||
*
|
||||
* Blocks:
|
||||
* Standalone: hero, page-hero, cta-banner, intro-section, contact-section
|
||||
@@ -118,7 +118,7 @@ function oribi_card_icon_attributes() {
|
||||
*
|
||||
* Accepts either:
|
||||
* - iconType = 'fontawesome' + faIcon = 'fas fa-cloud' → <i class="fas fa-cloud"></i>
|
||||
* - iconType = 'emoji' + icon = '☁️' → ☁️ (escaped)
|
||||
* - iconType = 'emoji' + icon = 'text' -> text (escaped)
|
||||
*
|
||||
* Legacy: if $icon_or_attrs is a plain string it behaves like before.
|
||||
*
|
||||
@@ -233,7 +233,7 @@ add_action( 'enqueue_block_editor_assets', function () {
|
||||
/* ── Register all blocks ───────────────────────────────────────────────────── */
|
||||
add_action( 'init', function () {
|
||||
|
||||
/* Shared supports — exposes color pickers and font-size selector in the
|
||||
/* Shared supports - exposes color pickers and font-size selector in the
|
||||
block inspector for every Oribi block. Individual blocks can override
|
||||
these by merging their own array if needed. */
|
||||
$block_supports = [
|
||||
@@ -618,7 +618,7 @@ add_action( 'init', function () {
|
||||
|
||||
/* ── ANIMATED HERO BLOCKS (OTS Signs) ─────────────────────────────────── */
|
||||
|
||||
/* Animated Hero — full homepage hero with particle background */
|
||||
/* Animated Hero - full homepage hero with particle background */
|
||||
register_block_type( 'oribi/hero-animated', [
|
||||
'attributes' => [
|
||||
'label' => [ 'type' => 'string', 'default' => '' ],
|
||||
@@ -640,7 +640,7 @@ add_action( 'init', function () {
|
||||
'render_callback' => 'oribi_render_hero_animated',
|
||||
] );
|
||||
|
||||
/* Animated Page Hero — inner pages with particle background */
|
||||
/* Animated Page Hero - inner pages with particle background */
|
||||
register_block_type( 'oribi/page-hero-animated', [
|
||||
'attributes' => [
|
||||
'label' => [ 'type' => 'string', 'default' => '' ],
|
||||
@@ -935,10 +935,10 @@ function oribi_render_contact_section( $a ) {
|
||||
<div class="contact-info">
|
||||
<h2><?php echo wp_kses_post( $a['heading'] ); ?></h2>
|
||||
<p class="lead"><?php echo wp_kses_post( $a['lead'] ); ?></p>
|
||||
<div class="contact-method"><div class="contact-method-icon">📧</div><div><div class="contact-method-label">Email Us</div><div class="contact-method-value"><a href="mailto:<?php echo esc_attr( $a['email'] ); ?>"><?php echo esc_html( $a['email'] ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">🎫</div><div><div class="contact-method-label">Existing Customer Support</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['supportUrl'] ); ?>" target="_blank" rel="noopener">Open a Support Ticket</a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">🌎</div><div><div class="contact-method-label">Client Portal</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['portalUrl'] ); ?>" target="_blank" rel="noopener"><?php echo esc_html( wp_parse_url( $a['portalUrl'], PHP_URL_HOST ) ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon">📍</div><div><div class="contact-method-label">Location</div><div class="contact-method-value"><?php echo esc_html( $a['location'] ); ?></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-envelope" aria-hidden="true"></i></div><div><div class="contact-method-label">Email Us</div><div class="contact-method-value"><a href="mailto:<?php echo esc_attr( $a['email'] ); ?>"><?php echo esc_html( $a['email'] ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-headset" aria-hidden="true"></i></div><div><div class="contact-method-label">Existing Customer Support</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['supportUrl'] ); ?>" target="_blank" rel="noopener">Open a Support Ticket</a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-globe" aria-hidden="true"></i></div><div><div class="contact-method-label">Client Portal</div><div class="contact-method-value"><a href="<?php echo esc_url( $a['portalUrl'] ); ?>" target="_blank" rel="noopener"><?php echo esc_html( wp_parse_url( $a['portalUrl'], PHP_URL_HOST ) ); ?></a></div></div></div>
|
||||
<div class="contact-method"><div class="contact-method-icon"><i class="fas fa-map-marker-alt" aria-hidden="true"></i></div><div><div class="contact-method-label">Location</div><div class="contact-method-value"><?php echo esc_html( $a['location'] ); ?></div></div></div>
|
||||
</div>
|
||||
<div class="contact-form-wrap">
|
||||
<h3 style="margin-bottom:1.5rem;"><?php echo esc_html( $a['formHeading'] ); ?></h3>
|
||||
@@ -970,12 +970,12 @@ function oribi_render_contact_section( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Feature Section (parent — wraps child feature-card blocks) ────────────── */
|
||||
/* ── Feature Section (parent - wraps child feature-card blocks) ────────────── */
|
||||
function oribi_render_feature_section( $a, $content ) {
|
||||
return oribi_render_card_section( $a, $content, 'grid', 3 );
|
||||
}
|
||||
|
||||
/* ── Feature Card (child — renders one card) ───────────────────────────────── */
|
||||
/* ── Feature Card (child - renders one card) ───────────────────────────────── */
|
||||
function oribi_render_feature_card( $a ) {
|
||||
$tag = ! empty( $a['url'] ) ? 'a' : 'div';
|
||||
$href = ! empty( $a['url'] ) ? ' href="' . esc_url( $a['url'] ) . '"' : '';
|
||||
@@ -1241,7 +1241,7 @@ function oribi_render_link_card( $a ) {
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Pricing Section (parent — wraps child pricing-card blocks) ────────────── */
|
||||
/* ── Pricing Section (parent - wraps child pricing-card blocks) ────────────── */
|
||||
function oribi_render_pricing_section( $a, $content, $block ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
$count = count( $block->inner_blocks );
|
||||
@@ -1261,7 +1261,7 @@ function oribi_render_pricing_section( $a, $content, $block ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Pricing Card (child — renders one pricing tier) ───────────────────────── */
|
||||
/* ── Pricing Card (child - renders one pricing tier) ───────────────────────── */
|
||||
function oribi_render_pricing_card( $a ) {
|
||||
$featured = ! empty( $a['featured'] );
|
||||
$img_id = ! empty( $a['imgId'] ) ? intval( $a['imgId'] ) : 0;
|
||||
@@ -1304,7 +1304,7 @@ function oribi_render_pricing_card( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Platform Section (parent — wraps child platform-row blocks) ───────────── */
|
||||
/* ── Platform Section (parent - wraps child platform-row blocks) ───────────── */
|
||||
function oribi_render_platform_section( $a, $content ) {
|
||||
ob_start(); ?>
|
||||
<section class="section">
|
||||
@@ -1320,7 +1320,7 @@ function oribi_render_platform_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Platform Row (child — renders one service row) ────────────────────────── */
|
||||
/* ── Platform Row (child - renders one service row) ────────────────────────── */
|
||||
function oribi_render_platform_row( $a ) {
|
||||
$rev = ! empty( $a['reversed'] ) ? ' reverse' : '';
|
||||
$img_id = ! empty( $a['imgId'] ) ? intval( $a['imgId'] ) : 0;
|
||||
@@ -1355,7 +1355,7 @@ function oribi_render_platform_row( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Trust Section (parent — wraps child trust-item blocks) ────────────────── */
|
||||
/* ── Trust Section (parent - wraps child trust-item blocks) ────────────────── */
|
||||
function oribi_render_trust_section( $a, $content ) {
|
||||
ob_start(); ?>
|
||||
<section class="section">
|
||||
@@ -1379,7 +1379,7 @@ function oribi_render_trust_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Trust Item (child — renders one heading + description pair) ────────────── */
|
||||
/* ── Trust Item (child - renders one heading + description pair) ────────────── */
|
||||
function oribi_render_trust_item( $a ) {
|
||||
ob_start(); ?>
|
||||
<div class="trust-item">
|
||||
@@ -1389,7 +1389,7 @@ function oribi_render_trust_item( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── FAQ Section (parent — wraps child faq-item blocks) ────────────────────── */
|
||||
/* ── FAQ Section (parent - wraps child faq-item blocks) ────────────────────── */
|
||||
function oribi_render_faq_section( $a, $content ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
ob_start(); ?>
|
||||
@@ -1408,7 +1408,7 @@ function oribi_render_faq_section( $a, $content ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── FAQ Item (child — renders one accordion item) ─────────────────────────── */
|
||||
/* ── FAQ Item (child - renders one accordion item) ─────────────────────────── */
|
||||
function oribi_render_faq_item( $a ) {
|
||||
ob_start(); ?>
|
||||
<details class="faq-item">
|
||||
@@ -1418,7 +1418,7 @@ function oribi_render_faq_item( $a ) {
|
||||
<?php return ob_get_clean();
|
||||
}
|
||||
|
||||
/* ── Comparison Table (standalone — renders a feature matrix) ──────────────── */
|
||||
/* ── Comparison Table (standalone - renders a feature matrix) ──────────────── */
|
||||
function oribi_render_comparison_table( $a ) {
|
||||
$cls = $a['variant'] === 'alt' ? 'section section-alt' : 'section';
|
||||
$cols = $a['columns'] ?? [];
|
||||
@@ -1455,7 +1455,7 @@ function oribi_render_comparison_table( $a ) {
|
||||
<?php foreach ( ( $row['values'] ?? [] ) as $val ) : ?>
|
||||
<td class="comparison-cell"><?php
|
||||
if ( $val === true ) echo '<span class="comparison-yes">✓</span>';
|
||||
elseif ( $val === false ) echo '<span class="comparison-no">—</span>';
|
||||
elseif ( $val === false ) echo '<span class="comparison-no">✗</span>';
|
||||
else echo wp_kses_post( $val );
|
||||
?></td>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Oribi Tech — Theme Bootstrap
|
||||
* Oribi Tech - Theme Bootstrap
|
||||
*
|
||||
* @package OTS_Theme
|
||||
* @since 1.0.0
|
||||
|
||||
@@ -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' );
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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' ),
|
||||
] );
|
||||
} );
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
================================================================ */
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Fallback template — required by WordPress for all themes.
|
||||
* Fallback template - required by WordPress for all themes.
|
||||
*
|
||||
* In a Full Site Editing (block) theme the actual rendering is handled
|
||||
* by the HTML templates in /templates/ and /parts/. This file exists
|
||||
|
||||
@@ -3,7 +3,7 @@ Theme Name: Oribi Tech
|
||||
Theme URI: https://oribi-tech.com
|
||||
Author: Oribi Technology Services
|
||||
Author URI: https://oribi-tech.com
|
||||
Description: Custom marketing theme for Oribi Technology Services — Managed IT, 365Care, EndpointCare, NetCare, ServerCare.
|
||||
Description: Custom marketing theme for Oribi Technology Services - Managed IT, 365Care, EndpointCare, NetCare, ServerCare.
|
||||
Version: 1.0.0
|
||||
Requires at least: 6.4
|
||||
Tested up to: 6.7
|
||||
|
||||
@@ -32,19 +32,19 @@
|
||||
"customDuotone": false,
|
||||
"customGradient": false,
|
||||
"palette": [
|
||||
{ "slug": "primary", "color": "#D83302", "name": "Primary" },
|
||||
{ "slug": "primary-dk", "color": "#B52B02", "name": "Primary Dark" },
|
||||
{ "slug": "primary-lt", "color": "#FEF0EB", "name": "Primary Light" },
|
||||
{ "slug": "accent", "color": "#00757c", "name": "Accent" },
|
||||
{ "slug": "accent-dk", "color": "#005a60", "name": "Accent Dark" },
|
||||
{ "slug": "accent-lt", "color": "#E6F4F5", "name": "Accent Light" },
|
||||
{ "slug": "dark", "color": "#0D1321", "name": "Dark" },
|
||||
{ "slug": "dark-2", "color": "#1A2236", "name": "Dark 2" },
|
||||
{ "slug": "text", "color": "#2D3748", "name": "Text" },
|
||||
{ "slug": "text-muted", "color": "#718096", "name": "Text Muted" },
|
||||
{ "slug": "border", "color": "#E2E8F0", "name": "Border" },
|
||||
{ "slug": "primary", "color": "#004225", "name": "Primary" },
|
||||
{ "slug": "primary-dk", "color": "#002E1A", "name": "Primary Dark" },
|
||||
{ "slug": "primary-lt", "color": "#E8F5E9", "name": "Primary Light" },
|
||||
{ "slug": "accent", "color": "#4CAF50", "name": "Accent" },
|
||||
{ "slug": "accent-dk", "color": "#388E3C", "name": "Accent Dark" },
|
||||
{ "slug": "accent-lt", "color": "#E8F5E9", "name": "Accent Light" },
|
||||
{ "slug": "dark", "color": "#111111", "name": "Dark" },
|
||||
{ "slug": "dark-2", "color": "#1A1A1A", "name": "Dark 2" },
|
||||
{ "slug": "text", "color": "#333333", "name": "Text" },
|
||||
{ "slug": "text-muted", "color": "#666666", "name": "Text Muted" },
|
||||
{ "slug": "border", "color": "#E0E0E0", "name": "Border" },
|
||||
{ "slug": "bg", "color": "#FFFFFF", "name": "Background" },
|
||||
{ "slug": "bg-alt", "color": "#FFF8F5", "name": "Background Alt" }
|
||||
{ "slug": "bg-alt", "color": "#F5F5F5", "name": "Background Alt" }
|
||||
]
|
||||
},
|
||||
"typography": {
|
||||
@@ -70,37 +70,37 @@
|
||||
}
|
||||
],
|
||||
"fontSizes": [
|
||||
{ "slug": "xs", "size": "0.75rem", "name": "XS — 12px" },
|
||||
{ "slug": "sm", "size": "0.875rem", "name": "SM — 14px" },
|
||||
{ "slug": "base", "size": "1rem", "name": "Base — 16px" },
|
||||
{ "slug": "md", "size": "1.125rem", "name": "MD — 18px" },
|
||||
{ "slug": "lg", "size": "1.25rem", "name": "LG — 20px" },
|
||||
{ "slug": "xl", "size": "1.5rem", "name": "XL — 24px" },
|
||||
{ "slug": "2xl", "size": "1.875rem", "name": "2XL — 30px" },
|
||||
{ "slug": "3xl", "size": "2.25rem", "name": "3XL — 36px" },
|
||||
{ "slug": "4xl", "size": "3rem", "name": "4XL — 48px" },
|
||||
{ "slug": "5xl", "size": "3.75rem", "name": "5XL — 60px" },
|
||||
{ "slug": "6xl", "size": "4.5rem", "name": "6XL — 72px" }
|
||||
{ "slug": "xs", "size": "0.75rem", "name": "XS - 12px" },
|
||||
{ "slug": "sm", "size": "0.875rem", "name": "SM - 14px" },
|
||||
{ "slug": "base", "size": "1rem", "name": "Base - 16px" },
|
||||
{ "slug": "md", "size": "1.125rem", "name": "MD - 18px" },
|
||||
{ "slug": "lg", "size": "1.25rem", "name": "LG - 20px" },
|
||||
{ "slug": "xl", "size": "1.5rem", "name": "XL - 24px" },
|
||||
{ "slug": "2xl", "size": "1.875rem", "name": "2XL - 30px" },
|
||||
{ "slug": "3xl", "size": "2.25rem", "name": "3XL - 36px" },
|
||||
{ "slug": "4xl", "size": "3rem", "name": "4XL - 48px" },
|
||||
{ "slug": "5xl", "size": "3.75rem", "name": "5XL - 60px" },
|
||||
{ "slug": "6xl", "size": "4.5rem", "name": "6XL - 72px" }
|
||||
]
|
||||
},
|
||||
"custom": {
|
||||
"dark": {
|
||||
"primary": "#FF6B3D",
|
||||
"primary-dk": "#D83302",
|
||||
"primary-lt": "rgba(216,51,2,0.15)",
|
||||
"accent": "#00757c",
|
||||
"accent-dk": "#005a60",
|
||||
"accent-lt": "rgba(0,117,124,0.15)",
|
||||
"dark": "#E2E8F0",
|
||||
"dark-2": "#CBD5E0",
|
||||
"text": "#CBD5E0",
|
||||
"text-muted": "#A0AEC0",
|
||||
"border": "#2D3748",
|
||||
"bg": "#0F1724",
|
||||
"bg-alt": "#151F30",
|
||||
"bg-dark": "#0A0F1A",
|
||||
"heading": "#F7FAFC",
|
||||
"card-bg": "#151F30"
|
||||
"primary": "#4CAF50",
|
||||
"primary-dk": "#004225",
|
||||
"primary-lt": "rgba(0,66,37,0.15)",
|
||||
"accent": "#66BB6A",
|
||||
"accent-dk": "#388E3C",
|
||||
"accent-lt": "rgba(76,175,80,0.12)",
|
||||
"dark": "#E0E0E0",
|
||||
"dark-2": "#BDBDBD",
|
||||
"text": "#E0E0E0",
|
||||
"text-muted": "#9E9E9E",
|
||||
"border": "#333333",
|
||||
"bg": "#1A1A1A",
|
||||
"bg-alt": "#222222",
|
||||
"bg-dark": "#111111",
|
||||
"heading": "#F5F5F5",
|
||||
"card-bg": "#222222"
|
||||
},
|
||||
"radius": {
|
||||
"sm": "6px",
|
||||
|
||||
Reference in New Issue
Block a user