Skip to content

Omeka S module for responsive iframe embeds with consistent theming support

License

Notifications You must be signed in to change notification settings

fmadore/IframeEmbed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iframe Embed

An Omeka S module that provides a responsive iframe page block for embedding external content.

Features

  • Responsive aspect ratios: 16:9, 4:3, 1:1, 21:9, 3:2, or auto
  • Accessibility: Required title attribute for screen readers
  • Performance: Optional lazy loading
  • Security: URL sanitization (https/http only)
  • Customizable: Max width constraint, optional caption
  • Theme-friendly: Uses CSS custom properties for easy theming

Requirements

  • Omeka S 4.0.0 or higher

Installation

  1. Download and unzip in your modules directory
  2. Rename the folder to IframeEmbed (if needed)
  3. Enable the module in Admin > Modules

Usage

  1. Edit a site page
  2. Add a new block and select "Iframe Embed"
  3. Enter the embed URL and configure options
  4. Save the page

Configuration Options

Option Description
Embed URL The URL to embed (required)
Iframe Title Accessibility title for screen readers
Aspect Ratio Container aspect ratio (default: 16:9)
Max Width Optional maximum width (e.g., 800px)
Caption Optional caption below the embed
Lazy Load Load iframe only when visible (default: on)

Theming

The module includes minimal base styles. For custom theming, override these CSS custom properties in your theme:

:root {
    --iframe-embed-bg: #f5f5f5;
    --iframe-embed-border: #e0e0e0;
    --iframe-embed-radius: 8px;
    --iframe-embed-caption-color: #666;
}

Or override the .iframe-embed classes directly in your theme's stylesheet.

IWAC-theme Integration

This module is designed to work seamlessly with IWAC-theme, which provides enhanced styling using the theme's design system.

License

MIT License. See LICENSE for details.

Author

Frédérick Madore

About

Omeka S module for responsive iframe embeds with consistent theming support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •