diff --git a/CHANGELOG.md b/CHANGELOG.md index ee8bdfa..47b03ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,25 @@ # Changelog -## [Unreleased] +## [3.0.0] - 2024- -- Pinch zoom gestures +### Added + +- Pinch zoom gestures 4a591e7 4a8355a @deoostfrees #42 +- Option to make the zoom indicator optional e65d5c7 @deoostfrees #62 + +### Changed + +- Use the native HTML `dialog` element e703293 @deoostfrees #60 +- Use the View Transitions API for the zoom in/ out animation 11e183f @deoostfrees +- Use pointer events instead of mouse and touch events b4941cf @deoostfrees + +### Removed + +- **Breaking:** The custom event `detail` property 4ea8e38 @deoostfrees +- The `transitionDuration` option. This option is now also set via the available CSS custom property 11e183f @deoostfrees +- The `transitionTimingFunction` option. This option is now also set via the available CSS custom property 11e183f @deoostfrees +- The `loadEmpty` option. The internal `add` function now creates the lightbox 98e41b5 @deoostfrees +- The custom `close` event. The native HTML `dialog` element has its own `close` event dba4678 @deoostfrees ## [2.6.0] - 2024-06-05 diff --git a/README.md b/README.md index 02ec6d3..2f02dd6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Parvus -Overlays suck, but if you need one, you might consider using Parvus. Parvus is an open source, dependency free image lightbox with the goal of being accessible. +Overlays suck, but if you need one, consider using Parvus. Parvus is an open source, dependency free image lightbox with the goal of being accessible. ![Screenshot of Parvus. It shows the first picture of a gallery.](https://rqrauhvmra.com/parvus/parvus.png) @@ -32,7 +32,7 @@ Overlays suck, but if you need one, you might consider using Parvus. Parvus is a - `dist/js/parvus.min.js` (minified) or - `dist/js/parvus.js` (un-minified) -Link the `.css` and `.js` files to your HTML file. Your HTML code should look like this: +Link the `.css` and `.js` files in your HTML: ```html @@ -56,29 +56,29 @@ Link the `.css` and `.js` files to your HTML file. Your HTML code should look li ### Package Managers -You can also install Parvus using npm or yarn, like any other dependency: +You can also install Parvus using npm or yarn: -``` +```sh npm install parvus ``` or -``` +```sh yarn add parvus ``` -After installation, you can import Parvus into your JavaScript codebase: +After installation, import Parvus into your JavaScript codebase: ```js import Parvus from 'parvus' ``` -Make sure to include the corresponding SCSS or CSS file. +Be sure to include the corresponding SCSS or CSS file. ## Usage -The standard way to use Parvus is by linking a thumbnail image with the class `lightbox` to a larger image. +Link a thumbnail image with the class `lightbox` to a larger image: ```html @@ -86,7 +86,7 @@ The standard way to use Parvus is by linking a thumbnail image with the class `l ``` -Initialize the script by running: +Initialize the script: ```js const prvs = new Parvus() @@ -94,7 +94,7 @@ const prvs = new Parvus() ### Captions -If you want to show a caption under the image, you can add a `data-caption` attribute. +To show a caption under the image, add a `data-caption` attribute: ```html @@ -102,7 +102,7 @@ If you want to show a caption under the image, you can add a `data-caption` attr ``` -Alternatively, you can set the option `captionsSelector` to select the captions from the innerHTML of an element. +Alternatively, set the option `captionsSelector` to select captions from an element's innerHTML: ```html @@ -124,7 +124,7 @@ const prvs = new Parvus({ ### Gallery -If you have a group of related images that you would like to combine into a set, you can add a `data-group` attribute: +To group related images into a set, add a `data-group` attribute: ```html @@ -142,7 +142,7 @@ If you have a group of related images that you would like to combine into a set, ``` -Alternatively, you can set the option `gallerySelector` to combine all images with a specific class within a selector into a group. +Alternatively, set the option `gallerySelector` to group all images with a specific class within a selector: ```html