Skip to content

Releases: nicolas-t/Chocolat

1.0.0-beta.1

10 Nov 20:41
Compare
Choose a tag to compare
1.0.0-beta.1 Pre-release
Pre-release

We are getting closer to the jquery-free release.
Documentation here :
https://chocolat.gitbook.io/chocolat

Upgrade guide here :
https://chocolat.gitbook.io/chocolat/upgrading-from-v0.4

1.0.0-beta.0

16 Jan 08:50
Compare
Choose a tag to compare
1.0.0-beta.0 Pre-release
Pre-release

Pre-release of Chocolat v1.0.0-beta.0

What's new

Dependencies

Chocolat is not relying on jQuery anymore

Build

Modern build generating :

  • iife module is meant to be imported via script tags.
    <script src="dist/js/chocolat.iife.js"></script>
  • esm module is meant to be imported via import thank to bundlers like webpack.
import Chocolat from 'chocolat'

css import stays the same.

Breaking changes

Instanciation

// old
$('#example1').Chocolat({});

// new
Chocolat(document.querySelectorAll('#example1 .chocolat-image'), {});

imageSelector option has now been removed

Options

imageSelector has been removed
separator2 has been removed
setTitle is a function returning a string (the title of the set)
pagination is a function returning a string (the pagination)
description is a function returning a string (the description)

0.4.21

21 Nov 19:33
Compare
Choose a tag to compare

Can be imported as a module :

import $ from 'jquery'
import Chocolat from 'chocolat'

$.fn.Chocolat = Chocolat 

Also removed coffeescript, and added prettier.

0.4.20

25 Jul 09:10
Compare
Choose a tag to compare

use jquery 3

0.4.19

27 Sep 08:25
Compare
Choose a tag to compare

Fix #70 & fix #73 (small js error)
Fix #72 (Closing fullscreen on IE11 thanks @SilatPerisaiDiri )

0.4.18

28 Mar 11:24
Compare
Choose a tag to compare

Transition when opening for the first time:
Fix for issue #59 (Thanks to @willpaige)

0.4.17

22 Mar 23:34
Compare
Choose a tag to compare

One wrapper per instance :
Fix for issue #58 (Thanks to @willpaige)

0.4.16

21 Feb 09:47
Compare
Choose a tag to compare

Updated jquery dependency :
Use latest version of jquery 1 : see #57

0.4.15

22 Dec 17:26
Compare
Choose a tag to compare

New hooks :
Added a new hooks :

  • afterInitialize called after chocolat is initialized
  • afterImageLoad called each time an image is loaded (see #47)
$('#example').Chocolat({
    afterInitialize : function () {
        // your code here
    },
    afterImageLoad : function () {
        // your code here
    }
});

Fixed missing var declarations :
Missing var declarations made minifying and concatenating failing on some setups.
Thanks to @nicolasbinet (see #52)
Related issue : #49

0.4.14

14 Jun 18:33
Compare
Choose a tag to compare

afterMarkup:
Added a new setting afterMarkup used to manipulate the layout just after it's created.
This will move the caption to the top of the image for example

$('#example').Chocolat({
    afterMarkup: function () {
        this.elems.description.appendTo(this.elems.top)
    }
});

imageSource:
Added the setting imageSource. It specifies which attribute contains the image source.
So you can use chocolat on other tags like a div tag (doesn't support the href attribute) too.
Thanks to @Airfighter76 see #41