Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
/ juxtapose-block Public archive

A block for WordPress that enables drop in side-by-side image comparison

Notifications You must be signed in to change notification settings

mkaz/juxtapose-block

Repository files navigation

NOTE:

The Juxtapose block was integrated into the Jetpack plugin as the Image Compare block. If you want to use on your site please use the Jetpack plugin for a supported version.

This repository was archived and will be kept around to learn from, but likely the plugin will slowly bit rot.

Juxtapose Block

A WordPress plugin which adds a block that enables you to create a side-by-side comparison of two images. The block is built off the JuxtaposeJS library by Knight Lab.

Example:

Screenshot

Usage

Install juxtapose-block plugin to your WordPress plugins directory and activate. You can download a zip from the releases page and upload to install.

  • Add block to your post using the (+) block inspector
  • Select before and after images, works best if they are the same size
  • Select Orientation (Above/Below, Side-by-side) in Block settings

Development

The juxtapose-block uses a standard npm build process.

Development build w/ watch:

npm install
npm run dev

Production build:

npm install
npm run build

TODO: add linting, tests, and other "real" things.

Colophon

License

Licensed under GPL 2.0 or later .

About

A block for WordPress that enables drop in side-by-side image comparison

Resources

Stars

Watchers

Forks

Packages

No packages published