Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Bikossor/Photron

Repository files navigation

Photron

An easy-to-use lightbox.

Build Status Codacy Badge GitHub release (latest by date) GitHub file size in bytes GitHub file size in bytes GitHub issues GitHub closed issues GitHub

Features

  • Supports touch gestures for navigation
  • Completly vanilla and standalone

Getting started

  • Coming soon...

Installing

  • Just download the compressed javascript file from the dist/ folder
  • After that you'll also to reference the javascript file in your HTML file by using:
<script src="./[PATH]/[TO]/Photron.min.js"></script>
  • Last you add the .photron-item class to every item inside the gallery

Usage

<script type="text/javascript">
	Photron({
		//-- Custom settings
	});
</script>
Setting Datatype Default Description
showImageTitle boolean true Whether the data-title attribute of the img should be shown or not.
showGalleryTitle boolean true Whether the data-title attribute of the Photron container (e.g. .lightBox) should be shown or not.
roundRobin boolean true Whether the items in an Photron should begin at the start if the end was reached and vice versa.
labelPrevious string "Previous image" Set a custom text for the previous-button.
labelClose string "Close" Set a custom text for the close-button.
labelNext string "Next image" Set a custom text for the next-button.

Versioning

I am using Semantic Versioning 2.0.0 for versioning. For the versions available, see the tags on this repository.

Authors

  • André Lichtenthäler (Bikossor) - Initial work

License

This project is licensed under the MIT License. See the LICENSE.md file for more details.

Changelog

Version 1.0.0: (3rd February, 2018)

  • [Change] Photron is now completly vanilla and standalone
  • [Added] Opening and closing animations of the overlay

Version 0.2.1: (4th September, 2017)

Version 0.2.0: (20th August, 2017)

  • Renamed the CSS-IDs
  • Improved CSS compatibility
  • Every javascript function now returns false
  • Added support for navigation via touch

Version 0.1.1: (6th August, 2017)

  • Fixed issue #1 (This time for real...)
  • Changed some lines from ES6 to ES5 (For compatibility reasons)
  • The close-Function now resets the Photron content explicitly
  • Added a minified version of the stylesheet

Version 0.1.0: (2nd July, 2017)

  • First introduction