nanostudio-org / nanogallery2

a modern photo / video gallery and lightbox [JS library]
https://nanogallery2.nanostudio.org
761 stars 112 forks source link

Support for array of tags (instead string split) #374

Open mczachurski opened 2 years ago

mczachurski commented 2 years ago

After change we can use array in JavaScript code (which allow us to use spece in tag names), for example:

jQuery("#nanogallery2").nanogallery2( {
    // ### gallery settings ### 
    thumbnailHeight:  150,
    thumbnailWidth:   150,
    itemsBaseURL:     'https://nanogallery2.nanostudio.org/samples/',

    // ### gallery content ### 
    items: [
        { src: 'berlin1.jpg', srct: 'berlin1_t.jpg', title: 'Berlin 1', tags: ['Berlin', 'Black & White'] },
        { src: 'berlin2.jpg', srct: 'berlin2_t.jpg', title: 'Berlin 2', tags: ['Berlin', 'Color'] },
        { src: 'berlin3.jpg', srct: 'berlin3_t.jpg', title: 'Berlin 3', tags: ['Berlin', 'Black & White'] }
      ]
  });
});