WP Manifestindependent plugin directory
manifest / ecommerce / pluginbeautyshopriowordpress

Beauty Shop Rio Design

Custom shortcodes for Beauty Shop Rio website design with WooCommerce integration

by Your Name · github.com/aronmeszaros/pluginbeautyshopriowordpress

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/aronmeszaros/pluginbeautyshopriowordpress/archive/refs/heads/main.zip

Readme

Beauty Shop Rio - Modular CSS Structure

📁 New CSS File Organization

assets/css/
├── style.css                    (Core styles, variables, common elements)
└── sections/
    ├── hero.css                (Hero section styles)
    ├── values.css              (Values section styles)
    ├── categories.css          (Categories section styles)
    ├── newsletter.css          (Newsletter section styles)
    └── footer.css              (Footer section styles)

🎯 Benefits of Modular Structure

Performance Optimization

  • Selective Loading: Only loads CSS for sections actually used on the page
  • Smaller File Sizes: Each section file is focused and lightweight
  • Better Caching: Individual sections can be cached separately
  • Faster Load Times: Reduces CSS bloat on pages that don't use all sections

Development Benefits

  • Easier Maintenance: Each section is self-contained
  • Better Organization: Clear separation of concerns
  • Reduced Conflicts: Less chance of CSS rule interference
  • Team Collaboration: Multiple developers can work on different sections

Customization Flexibility

  • Override Individual Sections: Customize specific sections without affecting others
  • Theme Integration: Easier to integrate with existing themes
  • Plugin Compatibility: Reduced conflicts with other plugins

🔧 How It Works

Assets Manager Intelligence

The updated BSR_Assets_Manager automatically detects which shortcodes are present on a page and loads only the necessary CSS files:

// Example: Page with only hero and newsletter
[bsr_hero] content here [bsr_newsletter]

// Only loads:
// - style.css (core)
// - sections/hero.css
// - sections/newsletter.css

Loading Priority

  1. Core styles (style.css) - Always loaded first
  2. Section styles - Loaded based on shortcode detection
  3. Custom variables - Injected via admin settings

📝 File Contents Breakdown

style.css (Core)

  • CSS variables (colors, spacing, etc.)
  • Base container and typography
  • Common button and form styles
  • Shared price and link styles
  • Base responsive breakpoints

sections/hero.css

  • Desktop hero layout (2-column grid)
  • Mobile hero layout (different DOM)
  • Navigation arrows and dots
  • Product showcase styles
  • Brand title and CTA button
  • Background decorations

sections/values.css

  • Values section 2-column layout
  • Value items with icons
  • Model image container
  • Botanical frame decorations
  • Mobile responsive adjustments

sections/categories.css

  • Categories grid layout
  • Sidebar with brand list
  • Category cards with hover effects
  • Brand-specific color schemes
  • Mobile stack layout

sections/newsletter.css

  • Newsletter 2-column layout
  • Form styles and validation
  • Loading states and animations
  • Success/error message styling
  • Mobile responsive form

sections/footer.css

  • Footer grid layout
  • Company information styling
  • Social links and navigation
  • Bottom border and copyright
  • Mobile center alignment

🚀 Usage Examples

Individual Section Loading

// Only hero section
[bsr_hero product_image="..." product_title="..."]
// Loads: style.css + sections/hero.css

// Only newsletter
[bsr_newsletter title="Subscribe"]
// Loads: style.css + sections/newsletter.css

Multiple Sections

[bsr_hero]
[bsr_categories]
[bsr_newsletter]
// Loads: style.css + hero.css + categories.css + newsletter.css

Full Page Layout

[bsr_full_page]
// Loads: style.css + all section CSS files

🔧 Migration from Old Structure

Backward Compatibility

  • All existing shortcodes continue to work
  • Legacy hero styles maintained in hero.css
  • No breaking changes to existing implementations

Gradual Migration

  • Can migrate section by section
  • Old monolithic CSS still works
  • Smooth transition path

🎨 Customization Guide

Override Individual Sections

/* In your theme's style.css */
/* Override only hero section */
.bsr-main-title {
    font-size: 4rem !important;
    color: #your-color !important;
}

Disable Specific Sections

// In functions.php - prevent loading specific section
add_action('wp_enqueue_scripts', function() {
    wp_dequeue_style('beauty-shop-rio-hero');
}, 20);

Add Custom Section Styles

// Load additional styles for specific sections
add_action('wp_enqueue_scripts', function() {
    if (has_shortcode(get_post()->post_content, 'bsr_hero')) {
        wp_enqueue_style('my-custom-hero', 'path/to/custom-hero.css', array('beauty-shop-rio-hero'));
    }
});

🛠 Developer Tools

Debug Loaded Sections

// Check which sections are loaded
$assets_manager = BSR_Assets_Manager::get_instance();
$loaded_sections = $assets_manager->get_loaded_sections();
var_dump($loaded_sections); // Array of loaded section names

Force Load Sections

// For AJAX or dynamic content
$assets_manager = BSR_Assets_Manager::get_instance();
$assets_manager->force_load_section('hero');
$assets_manager->force_load_section('newsletter');

Load All Sections

// For pages that need everything
$assets_manager = BSR_Assets_Manager::get_instance();
$assets_manager->load_all_sections();

📊 Performance Metrics

Before (Monolithic)

  • Single CSS file: ~15KB (all sections)
  • Loaded on every page with any shortcode
  • Potential unused CSS on most pages

After (Modular)

  • Core CSS: ~3KB (essentials only)
  • Individual sections: ~2-4KB each
  • Average page: ~7-10KB (only what's needed)
  • 40-50% reduction in CSS size per page

🔄 Future Extensibility

Easy to Add New Sections

  1. Create new section CSS file
  2. Add detection logic to Assets Manager
  3. Register new shortcode
  4. Automatic loading based on usage

Plugin Ecosystem Ready

  • Other plugins can extend individual sections
  • Clean separation allows for addon development
  • Theme developers can customize specific parts

🎯 Best Practices

For Developers

  • Always test section combinations
  • Check mobile responsiveness for each section
  • Validate CSS specificity doesn't conflict
  • Use browser dev tools to verify only needed CSS loads

For Site Owners

  • Use only the sections you need on each page
  • Test page load speeds after implementation
  • Monitor for any styling conflicts
  • Keep custom overrides minimal and specific

This modular structure provides the foundation for scalable, maintainable, and performant Beauty Shop Rio implementations while maintaining full backward compatibility.# PluginBeautyShopRioWordPress

Read the full README on GitHub →