Implementation Examples - Before & After
This document shows concrete examples of how www.asisaga.com code would change when adopting the proposed responsive enhancements to the Genesis Ontological Design System.
Example 1: Contact Page Form (Proposal #2)
❌ Before (Current Implementation)
HTML (contact/index.html):
<div class="col-lg-7 mb-5 mb-lg-0">
<div class="contact-form-container">
<form id="contactForm" class="contact-form needs-validation">
<div class="row">
<div class="col-md-6 mb-3">
<input type="text" class="form-control" id="name">
</div>
<div class="col-md-6 mb-3">
<input type="email" class="form-control" id="email">
</div>
</div>
<button type="submit" class="btn btn-primary">Send</button>
</form>
</div>
</div>
Issues:
- Mixes Bootstrap utility classes (
col-lg-7,mb-5,mb-lg-0) - No Genesis ontological semantics
- Breaks zero-raw-CSS rule
SCSS (_sass/pages/_contact-page.scss):
.contact {
&-form {
&-container {
@include genesis-entity('primary');
}
}
}
// Bootstrap handles all responsive behavior
✅ After (With Proposal #2)
HTML (refactored):
<div class="contact-form-section">
<div class="contact-form-container">
<form id="contactForm" class="contact-form">
<div class="contact-form-fields">
<div class="form-field">
<input type="text" class="form-input" id="name">
</div>
<div class="form-field">
<input type="email" class="form-input" id="email">
</div>
</div>
<button type="submit" class="form-submit">Send</button>
</form>
</div>
</div>
SCSS (semantic):
.contact {
&-form {
&-container {
@include genesis-entity('primary');
}
&-fields {
@include genesis-environment('interaction-form'); // NEW: Responsive form layout
}
}
}
.form-input {
@include genesis-synapse('input-primary'); // NEW: Touch-optimized inputs
}
.form-submit {
@include genesis-synapse('execute'); // Already responsive with Proposal #6
}
Benefits:
- ✅ No Bootstrap dependencies
- ✅ Pure Genesis ontology
- ✅ Automatic responsive behavior (2-column desktop → 1-column mobile)
- ✅ Touch-optimized inputs (44px height on mobile)
- ✅ Semantic clarity: “this is a form requiring responsive input”
Example 2: Contact Page Map Embed (Proposal #5)
❌ Before (Current Implementation)
HTML:
<section class="contact-map-section">
<div class="map-container">
<iframe
src="https://www.google.com/maps/embed?..."
width="100%"
height="450"
style="border:0;" <!-- INLINE STYLE VIOLATION -->
allowfullscreen=""
loading="lazy">
</iframe>
</div>
</section>
SCSS:
.map-container {
@include genesis-entity('secondary');
iframe {
// No responsive behavior defined
// Relies on inline width/height attributes
}
}
Issues:
- ❌ Inline
styleattribute violates zero-raw-CSS rule - ❌ Fixed height (450px) doesn’t adapt to viewport
- ❌ No aspect ratio preservation
✅ After (With Proposal #5)
HTML (cleaned):
<section class="contact-map-section">
<div class="map-container">
<iframe
src="https://www.google.com/maps/embed?..."
allowfullscreen
loading="lazy">
</iframe>
</div>
</section>
SCSS (semantic):
.map-container {
@include genesis-entity('secondary');
@include genesis-media('embed-responsive'); // NEW: Responsive iframe wrapper
// Optional: customize aspect ratio
padding-top: calc(450 / 1200 * 100%); // 37.5% for map aspect ratio
}
Benefits:
- ✅ No inline styles
- ✅ Automatic aspect ratio preservation
- ✅ Responsive height (scales with viewport width)
- ✅ Semantic clarity: “this is an embedded media element”
Example 3: Homepage Hero Section (Proposal #8)
❌ Before (Current Implementation)
HTML (index.html):
<main class="genesis-home-container">
<!--
Transcendent Hero Component - Gateway to Genesis
A consciousness-merging hero section that embodies humanity's Transcendent Pathway to infinite possibilities
-->
<section
id="transcendent-hero"
class="transcendent-hero full cosmic-consciousness transcendent-gradient transcendent-hero--with-image"
>
<div class="transcendent-hero__image">
<img src="" alt="">
</div>
<!-- Transcendent Background Elements -->
<div class="consciousness-background" aria-hidden="true">
<div class="cosmic-particles"></div>
<div class="essence-streams"></div>
<div class="transcendent-glow"></div>
</div>
<!-- Hero Content Container -->
<div class="transcendent-hero-content">
<div class="transcendent-hero-wrapper">
<div class="transcendent-hero-row">
<div class="transcendent-hero-col">
<!-- Hero Title with Transcendent Typography -->
<h1 class="transcendent-hero-title">
Humanity's Transcendent Pathway...
</h1>
</div>
</div>
</div>
</div>
</section>
</main>
SCSS (_sass/pages/_index.scss):
.genesis-home-container {
@include genesis-environment('focused');
@include genesis-atmosphere('void');
}
// Hero component would need custom viewport sizing
.hero-section-full {
@include genesis-entity('primary');
@include genesis-atmosphere('vibrant');
// Custom viewport logic (not semantic)
min-height: 100vh; // MIGHT BE RAW CSS depending on component
}
Issues:
- Viewport sizing not semantically expressed
- No mobile browser chrome handling
- No scroll-triggered animation semantics
✅ After (With Proposal #8)
HTML (unchanged):
<main class="genesis-home-container">
<!--
Transcendent Hero Component - Gateway to Genesis
A consciousness-merging hero section that embodies humanity's Transcendent Pathway to infinite possibilities
-->
<section
id="transcendent-hero"
class="transcendent-hero full cosmic-consciousness transcendent-gradient transcendent-hero--with-image"
>
<div class="transcendent-hero__image">
<img src="" alt="">
</div>
<!-- Transcendent Background Elements -->
<div class="consciousness-background" aria-hidden="true">
<div class="cosmic-particles"></div>
<div class="essence-streams"></div>
<div class="transcendent-glow"></div>
</div>
<!-- Hero Content Container -->
<div class="transcendent-hero-content">
<div class="transcendent-hero-wrapper">
<div class="transcendent-hero-row">
<div class="transcendent-hero-col">
<!-- Hero Title with Transcendent Typography -->
<h1 class="transcendent-hero-title">
Humanity's Transcendent Pathway...
</h1>
</div>
</div>
</div>
</div>
</section>
</main>
SCSS (enhanced):
.genesis-home-container {
@include genesis-environment('focused');
@include genesis-atmosphere('void');
}
.hero-section-full {
@include genesis-entity('primary');
@include genesis-atmosphere('viewport-aware'); // NEW: Responsive viewport sizing
.hero-content {
@include genesis-state('scroll-triggered'); // NEW: Scroll animation semantics
.hero-title {
@include genesis-cognition('axiom'); // Now responsive by default (Proposal #4)
}
}
}
Benefits:
- ✅ Semantic viewport awareness
- ✅ Automatic mobile browser chrome handling (70vh on mobile)
- ✅ Built-in scroll animation support
- ✅ Reduced motion preference respected
- ✅ Better mobile performance
Example 4: About Page Team Grid (Proposal #7)
❌ Before (Current Implementation)
HTML (about/index.html):
<div class="about-team-grid">
</div>
SCSS (_sass/pages/_about.scss):
.about-team-grid {
@include genesis-environment('distributed');
// 'distributed' creates a grid but doesn't specify responsive behavior
// Developer would need to add custom media queries
}
.about-team-member {
@include genesis-entity('primary');
}
Current Behavior:
- Grid might be fixed columns (not responsive)
- Or uses auto-fit but without mobile optimization
- Spacing doesn’t adapt to viewport
✅ After (With Proposal #7)
HTML (unchanged):
<div class="about-team-grid">
</div>
SCSS (enhanced with responsive behavior):
.about-team-grid {
@include genesis-environment('distributed'); // Now responsive by default!
@include genesis-atmosphere('dense-desktop'); // NEW: Adapts density to viewport
// Automatic behavior:
// Mobile: 1 column
// Tablet: 2 columns
// Desktop: auto-fit 3-4 columns
// Ultrawide: capped at 4 columns
}
.about-team-member {
@include genesis-entity('primary');
.member-name {
@include genesis-cognition('motive'); // Now responsive (Proposal #4)
}
.member-role {
@include genesis-cognition('gloss'); // Now responsive
}
}
Benefits:
- ✅ No custom breakpoint logic needed
- ✅ Automatic 1 → 2 → 3-4 column progression
- ✅ Responsive gap spacing (1.5rem mobile → 2rem desktop)
- ✅ Content density adapts to viewport
- ✅ Typography scales automatically
Example 5: Navigation Header (Proposal #1)
❌ Before (Current Implementation)
HTML (hypothetical, in theme):
<header class="site-header">
<nav class="main-nav">
<ul class="nav-menu">
<li><a href="/">Home</a></li>
<li><a href="/about/">About</a></li>
<li><a href="/contact/">Contact</a></li>
</ul>
</nav>
</header>
SCSS (would require custom responsive logic):
.site-header {
@include genesis-entity('primary');
// Developer must add custom media queries for mobile menu
@media (max-width: 767px) {
// Hamburger menu logic
// Drawer positioning
// Touch target sizing
// etc. - lots of custom code
}
}
Issues:
- No semantic guidance for navigation patterns
- Each subdomain implements mobile menu differently
- Inconsistent UX across ASI Saga sites
✅ After (With Proposal #1)
HTML (unchanged):
<header class="site-header">
<nav class="main-nav">
<button class="nav-toggle" aria-label="Toggle menu">☰</button>
<ul class="nav-menu">
<li><a href="/">Home</a></li>
<li><a href="/about/">About</a></li>
<li><a href="/contact/">Contact</a></li>
</ul>
</nav>
</header>
SCSS (semantic):
.site-header {
@include genesis-entity('primary');
}
.main-nav {
@include genesis-environment('navigation-primary'); // NEW: Responsive nav pattern
// Automatic behavior:
// Desktop: horizontal layout, full menu visible
// Mobile: drawer pattern, hamburger toggle
// Touch-optimized spacing
}
.nav-toggle {
@include genesis-synapse('execute'); // Already touch-optimized (Proposal #6)
// Automatic behavior:
// Desktop: hidden
// Mobile: visible with 44x44px touch target
}
.nav-menu a {
@include genesis-synapse('navigate'); // Touch-optimized links
}
Benefits:
- ✅ Consistent navigation pattern across all subdomains
- ✅ Automatic mobile drawer behavior
- ✅ Touch-optimized toggle button
- ✅ Semantic clarity: “this is primary navigation”
- ✅ No custom responsive logic needed
Example 6: Typography Across All Pages (Proposal #4)
❌ Before (Current Implementation)
SCSS (any page):
.hero-title {
@include genesis-cognition('axiom');
// Same size on mobile and desktop
// Developer must add custom media queries if different scaling needed
}
.body-text {
@include genesis-cognition('discourse');
// Same size everywhere
// Might be too small on mobile or too large on ultrawide
}
Issues:
- Fixed font sizes regardless of viewport
- Mobile headlines might overflow
- Body text might be < 14px on mobile (poor readability)
✅ After (With Proposal #4 - Option A: Responsive by Default)
SCSS (no changes needed!):
.hero-title {
@include genesis-cognition('axiom'); // NOW RESPONSIVE
// Mobile: 32px (2rem)
// Tablet: 40px (2.5rem)
// Desktop: 56px (3.5rem)
// Uses fluid clamp() for smooth scaling
}
.body-text {
@include genesis-cognition('discourse'); // NOW RESPONSIVE
// Mobile: 16px (1rem) - ensures readability
// Desktop: 18px (1.125rem) - comfortable reading
// Line height also adapts (1.65 mobile, 1.6 desktop)
}
Benefits:
- ✅ Zero code changes - existing mixins become responsive
- ✅ Automatic viewport-appropriate sizing
- ✅ Fluid scaling (no jarring breakpoint jumps)
- ✅ Mobile readability ensured (16px minimum)
- ✅ All existing pages improve immediately
Example 7: Social Icons Touch Targets (Proposal #6)
❌ Before (Current Implementation)
HTML (contact/index.html):
<div class="social-icons">
<a href="#" class="social-icon"><i class="fab fa-twitter"></i></a>
<a href="#" class="social-icon"><i class="fab fa-linkedin-in"></i></a>
</div>
SCSS (_sass/pages/_contact-page.scss):
.social-icon {
@include genesis-synapse('social');
// Current implementation might be too small for touch (<44px)
}
Issue:
- Social icons might be 32x32px or 36x36px
- Difficult to tap on mobile
- Fails WCAG 2.1 touch target guidelines
✅ After (With Proposal #6)
HTML (unchanged):
<div class="social-icons">
<a href="#" class="social-icon"><i class="fab fa-twitter"></i></a>
<a href="#" class="social-icon"><i class="fab fa-linkedin-in"></i></a>
</div>
SCSS (automatic enhancement):
.social-icon {
@include genesis-synapse('social'); // NOW TOUCH-OPTIMIZED
// Mobile: 44x44px minimum (WCAG compliant)
// Desktop: 36x36px (space-efficient)
// Expanded tap area (invisible padding extends hit zone)
}
Benefits:
- ✅ WCAG 2.1 compliant touch targets
- ✅ Better mobile UX
- ✅ No visual change on desktop
- ✅ Works for all
genesis-synapsevariants
Example 8: Button Touch Targets (Proposal #6)
❌ Before (Current Implementation)
HTML:
<button class="cta-button">Join the Genesis</button>
SCSS:
.cta-button {
@include genesis-synapse('execute');
// Might be too small on mobile
}
✅ After (With Proposal #6)
HTML (unchanged):
<button class="cta-button">Join the Genesis</button>
SCSS (automatic enhancement):
.cta-button {
@include genesis-synapse('execute'); // NOW TOUCH-OPTIMIZED
// Mobile: 44px min height, 44px min width
// Tablet: 42px balanced sizing
// Desktop: 40px compact sizing
// All viewports: expanded tap zone via ::after pseudo-element
}
Benefits:
- ✅ All buttons become touch-friendly automatically
- ✅ No code changes needed
- ✅ WCAG compliant
- ✅ Better mobile conversion rates (easier to tap CTAs)
Migration Checklist
When theme PR is merged and www.asisaga.com adopts the enhancements:
Phase 1: Update Theme Dependency
- Update
_config.ymlto use new theme version - Run local Jekyll build to verify theme integration
- Test SCSS compilation:
npm run test:scss
Phase 2: Remove Bootstrap Dependencies
- Remove Bootstrap grid classes from HTML (
col-*,row,mb-*) - Refactor forms to use
genesis-environment('interaction-form') - Update form inputs to use
genesis-synapse('input-primary')
Phase 3: Remove Inline Styles
- Find all inline
style=""attributes:grep -r 'style="' . - Refactor map embed to use
genesis-media('embed-responsive') - Remove any other inline styles
Phase 4: Adopt New Responsive Variants
- Navigation: Add
genesis-environment('navigation-primary') - Hero sections: Add
genesis-atmosphere('viewport-aware') - Scroll effects: Add
genesis-state('scroll-triggered') - Content sections: Add
genesis-atmosphere('dense-desktop')or'spacious-mobile'
Phase 5: Remove Custom Media Queries
- Search for
@mediain SCSS files - Replace custom responsive logic with Genesis variants
- Verify no raw CSS properties remain
Phase 6: Testing
- Test on mobile (375px, 390px, 428px)
- Test on tablet (768px, 1024px)
- Test on desktop (1280px, 1440px, 1920px)
- Test on ultrawide (2560px)
- Validate touch targets (use browser DevTools mobile emulation)
- Run accessibility audit (Lighthouse, axe)
Phase 7: Documentation
- Update README with new Genesis variants used
- Document any subdomain-specific customizations
- Add screenshots of responsive behavior to PR
Performance Impact
These responsive enhancements should improve performance:
Before:
- Large images load at full resolution on mobile
- Fixed viewport-height sections waste mobile screen space
- Custom JavaScript for responsive menu behavior
- Bootstrap CSS adds unused utility classes (bloat)
After:
genesis-media('image-adaptive')enables responsive images (smaller payloads)genesis-atmosphere('viewport-aware')optimizes mobile viewport usagegenesis-environment('navigation-primary')handles responsive nav in CSS (less JS)- Pure Genesis CSS is smaller than Bootstrap + custom responsive code
Expected Improvements:
- 🔽 Page weight (smaller images on mobile)
- 🔼 Lighthouse score (better mobile UX)
- 🔼 First Contentful Paint (less CSS, optimized viewport)
- 🔼 Touch target accessibility score (44px minimum)
Conclusion
These examples demonstrate how the proposed Genesis Ontological Design System enhancements enable:
- Cleaner HTML - No utility classes, semantic class names only
- Simpler SCSS - No custom media queries, Genesis mixins handle responsiveness
- Better UX - Touch-optimized, viewport-aware, accessible by default
- Maintainability - Changes to responsive behavior happen in theme (single source of truth)
- Consistency - All ASI Saga subdomains get same responsive patterns
The migration path is clear and non-breaking, with most enhancements providing automatic improvements to existing code.
Next: Submit these examples to Theme Genome Agent along with the ontological propositions for review.