multiplane / mp-theme-base
Multiplane base theme
dev-main
2023-11-23 10:47 UTC
Requires
This package is auto-updated.
Last update: 2024-11-23 12:46:51 UTC
README
TODO: update README
Features
- basic css
- ...
mp.js
- simple cookie management
- handle privacy events
- simple video - display YouTube and Vimeo iframes with a thumbnail and don't load videos without user's privacy consent
- simple image lightbox
- simple image carousel
Image lightbox
MP.ready(function() { // document is ready
// init lightbox
MP.Lightbox.init({
group: '.gallery', // all elements with class 'gallery' are galleries
selector: 'a' // all a tags are detected as image links
});
});
Marginalia: The lightbox is compatible with WordPress Gutenberg galleries, but it might have unwanted side effects, if your theme doesn't fit exactly.
MP.ready(function() {
MP.Lightbox.init({group: '.wp-block-gallery', selector: 'a'});
}
Video
requires VideoLinkField addon and videolink field, that is named "video"
build
npm install
- install dev dependenciesnpm run build
to rebuild js+css filesnpm run watch
watch js+css changesnpm run update
to build js+css with regenerated copyright preamble