Parallax Sections Plugin

Parallax Sections Plugin

Overview

The Parallax Sections plugin creates engaging parallax scrolling effects for website sections using shortcodes. It applies background images to content blocks and moves them at different speeds than the foreground content, creating a 3D depth illusion.

Features

Reliable Image Coverage - Background images maintain full coverage during all scroll positions
Smooth Performance - Hardware-accelerated animations with optimized JavaScript
Responsive Design - Works seamlessly across all device sizes
Theme Integration - Automatically adapts to light/dark themes
Content Separation - Content stays in markdown files, not hardcoded in templates

Usage

Basic Shortcode Structure

<div class="parallax-section parallax-effect-scroll" id="your-unique-id" data-parallax-speed="0.5" data-parallax-effect="scroll""><div class="parallax-background" style="background-image: url('/path/to/your/image.jpg');"></div><div class="parallax-overlay" style="background-color: rgba(0,0,0,0.4); opacity: 0.4;"></div><div class="parallax-content"><!-- Your content goes here -->
    <p>This is the content that will scroll over the parallax background.</p></div></div>

Required Attributes

Optional Attributes

Examples

Hero Section with Dark Overlay

<div class="parallax-section parallax-effect-scroll" id="hero" data-parallax-speed="0.3" data-parallax-effect="scroll""><div class="parallax-background" style="background-image: url('/uploads/hero-bg.jpg');"></div><div class="parallax-overlay" style="background-color: rgba(0,0,0,0.5); opacity: 0.5;"></div><div class="parallax-content"># Welcome to Our Site
<span style="color:white;">Experience stunning parallax effects that bring your content to life</span>
[Get Started](/about)</div></div>

About Section with Blue Overlay

<div class="parallax-section parallax-effect-scroll" id="about" data-parallax-speed="0.4" data-parallax-effect="scroll""><div class="parallax-background" style="background-image: url('/uploads/about-bg.jpg');"></div><div class="parallax-overlay" style="background-color: #0066cc; opacity: 0.6;"></div><div class="parallax-content">## About Our Company
Our story with a blue overlay for better readability</div></div>

Services Section with Red Overlay

<div class="parallax-section parallax-effect-scroll" id="services" data-parallax-speed="0.5" data-parallax-effect="scroll""><div class="parallax-background" style="background-image: url('/uploads/services-bg.jpg');"></div><div class="parallax-overlay" style="background-color: red; opacity: 0.7;"></div><div class="parallax-content">## Our Services
Professional services with red overlay for emphasis</div></div>

Contact Section with Custom Styling

<div class="parallax-section parallax-effect-scroll" id="contact" data-parallax-speed="0.4" data-parallax-effect="scroll""><div class="parallax-background" style="background-image: url('/uploads/contact-bg.jpg');"></div><div class="parallax-overlay" style="background-color: rgba(0,0,0,0.6); opacity: 0.6;"></div><div class="parallax-content"><div style="text-align: center; padding: 120px 0; color: white;">
    <h2>Get In Touch</h2>
    <p>Ready to start your next project? Let's talk!</p>
    <div style="margin-top: 30px;">
        <a href="mailto:hello@example.com" style="color: white; border: 1px solid white; padding: 12px 25px; text-decoration: none; margin: 0 10px; border-radius: 5px;">Email Us</a>
        <a href="tel:+1234567890" style="color: white; border: 1px solid white; padding: 12px 25px; text-decoration: none; margin: 0 10px; border-radius: 5px;">Call Us</a>
    </div>
</div></div></div>

Best Practices

Image Selection

Content Styling

Performance Tips

Troubleshooting

Common Issues

Images not covering sections completely

Performance issues

Text not readable

Debug Mode

Enable debug logging by setting the environment variable:

export FCMS_DEBUG=true

This will log detailed information about parallax processing to help troubleshoot issues.

Content Management

Template Integration

File Organization

content/
├── home.md          # Contains parallax shortcodes
├── about.md         # Other content files
└── blog/
    └── post-1.md    # Blog posts with parallax sections

themes/
└── default/         # Theme templates (no parallax code needed)

Recent Improvements

v2.0 - Enhanced Coverage & Performance

Technical Fixes

Future Enhancements


The Parallax Sections plugin is designed to be reliable, performant, and easy to use. It automatically handles the complexities of image coverage, scroll performance, and responsive design while maintaining clean, maintainable code.