@tomasvn/glightbox 0.0.0-stage → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.json +94 -0
  4. package/.github/FUNDING.yml +3 -0
  5. package/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  6. package/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  7. package/.github/stale.yml +21 -0
  8. package/.github/workflows/greetings.yml +13 -0
  9. package/.husky/pre-commit +3 -0
  10. package/.lando.yml +10 -0
  11. package/.prettierignore +3 -0
  12. package/.prettierrc.json +30 -0
  13. package/CHANGELOG.md +259 -0
  14. package/CONTRIBUTING.md +29 -0
  15. package/LICENSE.md +21 -0
  16. package/README.md +714 -2
  17. package/bower.json +29 -0
  18. package/development/build.js +44 -0
  19. package/development/jscompiler.js +90 -0
  20. package/development/notifications.js +15 -0
  21. package/development/package.js +116 -0
  22. package/development/postcss.js +63 -0
  23. package/development/watcher.js +105 -0
  24. package/dist/css/glightbox.css +939 -0
  25. package/dist/css/glightbox.min.css +1 -0
  26. package/dist/js/glightbox.js +3109 -0
  27. package/dist/js/glightbox.min.js +1 -0
  28. package/index.d.ts +586 -0
  29. package/package.json +60 -4
  30. package/src/js/.jshintrc +6 -0
  31. package/src/js/core/drag.js +203 -0
  32. package/src/js/core/keyboard-navigation.js +101 -0
  33. package/src/js/core/slide-parser.js +236 -0
  34. package/src/js/core/slide.js +251 -0
  35. package/src/js/core/touch-events.js +378 -0
  36. package/src/js/core/touch-navigation.js +291 -0
  37. package/src/js/core/zoom.js +156 -0
  38. package/src/js/glightbox.js +1351 -0
  39. package/src/js/slides/iframe.js +24 -0
  40. package/src/js/slides/image.js +56 -0
  41. package/src/js/slides/inline.js +71 -0
  42. package/src/js/slides/video.js +108 -0
  43. package/src/js/utils/helpers.js +541 -0
  44. package/src/postcss/glightbox.css +725 -0
  45. package/tests/slide.test.mjs +130 -0
  46. package/tests/touch-navigation.test.mjs +13 -0
package/.editorconfig ADDED
@@ -0,0 +1,16 @@
1
+ # editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_size = 4
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+
12
+ [*.{json,yml}]
13
+ indent_size = 2
14
+
15
+ [*.md]
16
+ trim_trailing_whitespace = false
package/.eslintignore ADDED
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ dist/js/*.js
3
+ dist/css/*.css
package/.eslintrc.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "parserOptions": {
3
+ "ecmaVersion": 12,
4
+ "sourceType": "module",
5
+ "ecmaFeatures": {
6
+ "jsx": true
7
+ }
8
+ },
9
+ "rules": {
10
+ "semi": ["warn", "always"],
11
+ "no-extra-semi": "error",
12
+ "brace-style": "error",
13
+ "curly": "error",
14
+ "eqeqeq": "off",
15
+ "block-spacing": "error",
16
+ "camelcase": "error",
17
+ "new-cap": "error",
18
+ "no-const-assign": "error",
19
+ "no-dupe-args": "error",
20
+ "no-dupe-class-members": "error",
21
+ "no-dupe-keys": "error",
22
+ "no-duplicate-imports": "error",
23
+ "no-empty-character-class": "error",
24
+ "no-empty": "off",
25
+ "no-eval": "error",
26
+ "no-ex-assign": "error",
27
+ "no-extend-native": "error",
28
+ "no-extra-boolean-cast": "error",
29
+ "no-extra-parens": ["warn", "functions"],
30
+ "no-fallthrough": "error",
31
+ "no-floating-decimal": "error",
32
+ "no-implied-eval": "error",
33
+ "no-inner-declarations": "error",
34
+ "no-lone-blocks": "error",
35
+ "no-mixed-spaces-and-tabs": "error",
36
+ "no-multi-spaces": "error",
37
+ "no-new-func": "error",
38
+ "no-new-object": "error",
39
+ "no-new-require": "error",
40
+ "no-new-symbol": "error",
41
+ "no-new-wrappers": "error",
42
+ "no-redeclare": "error",
43
+ "no-self-assign": "error",
44
+ "no-self-compare": "error",
45
+ "no-sequences": "error",
46
+ "no-shadow-restricted-names": "error",
47
+ "no-sparse-arrays": "error",
48
+ "no-template-curly-in-string": "error",
49
+ "no-this-before-super": "error",
50
+ "no-throw-literal": "error",
51
+ "no-undef-init": "error",
52
+ "no-unsafe-finally": "error",
53
+ "no-useless-constructor": "error",
54
+ "no-useless-rename": "error",
55
+ "no-unexpected-multiline": "error",
56
+ "no-whitespace-before-property": "error",
57
+ "space-before-blocks": "warn",
58
+ "new-parens": "error",
59
+ "space-in-parens": "error",
60
+ "space-unary-ops": "error",
61
+ "keyword-spacing": "warn",
62
+ "template-curly-spacing": "warn",
63
+ "use-isnan": "warn",
64
+ "constructor-super": "error",
65
+ "no-array-constructor": "error",
66
+ "quotes": ["error", "single"],
67
+ "comma-style": ["error", "last"],
68
+ "comma-dangle": [
69
+ "warn",
70
+ {
71
+ "arrays": "never",
72
+ "objects": "never",
73
+ "imports": "never",
74
+ "exports": "never",
75
+ "functions": "never"
76
+ }
77
+ ],
78
+ "space-before-function-paren": [
79
+ "off",
80
+ {
81
+ "anonymous": "always",
82
+ "named": "always",
83
+ "asyncArrow": "always"
84
+ }
85
+ ],
86
+ "func-call-spacing": ["error", "never"],
87
+ "key-spacing": ["error", { "beforeColon": false }],
88
+ "one-var": ["off"],
89
+ "operator-linebreak": "off",
90
+ "space-infix-ops": ["error"],
91
+ "comma-spacing": ["error", { "before": false, "after": true }],
92
+ "no-unused-vars": ["warn", { "vars": "local", "args": "none", "ignoreRestSiblings": false }]
93
+ }
94
+ }
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ custom: ['https://buy.stripe.com/9AQbK2gPC5o73Fm7sz']
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **Are you able to reproduce the bug in the demo site**
14
+ Yes|No.
15
+
16
+ **To Reproduce**
17
+ Steps to reproduce the behavior:
18
+ 1. Go to '...'
19
+ 2. Click on '....'
20
+ 3. Scroll down to '....'
21
+ 4. See error
22
+
23
+ **Expected behavior**
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Post the code you are using**
27
+ Help me solve issues faster, if I can copy paste your code I can try to reproduce and fix the bug faster.
28
+
29
+ **Screenshots**
30
+ If applicable, add screenshots to help explain your problem.
31
+
32
+ **Desktop:**
33
+ - OS: [e.g. iOS]
34
+ - Browser [e.g. chrome, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Smartphone:**
38
+ - Device: [e.g. iPhone6]
39
+ - OS: [e.g. iOS8.1]
40
+ - Browser [e.g. stock browser, safari]
41
+ - Version [e.g. 22]
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Important.**
11
+ Before posting a feature request please make sure to search the closed issues, maybe the feature you want to implement has already been asked and denied for not providing a valid explanation or simply because it was something the user wanted for him or his project.
12
+
13
+ **Please describe the feature you want to be implemented.**
14
+ Please note: features should be something that everyone can use and not just something you need for your project.
15
+
16
+ **Explain why the feature is useful**
17
+ Describe some usage cases.
18
+
19
+ **Have you seen it somewhere else?**
20
+ If so please provide live examples, images, videos, etc. anything that help us understand the feature request
21
+
22
+ **Additional context**
23
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,21 @@
1
+ # Number of days of inactivity before an issue becomes stale
2
+ daysUntilStale: 280
3
+ # Number of days of inactivity before a stale issue is closed
4
+ daysUntilClose: 200
5
+ # Issues with these labels will never be considered stale
6
+ exemptLabels:
7
+ - pinned
8
+ - security
9
+ - enhancement
10
+ - bug
11
+ - wontfix
12
+ - feature-request
13
+ - feature request
14
+ # Label to use when marking an issue as stale
15
+ staleLabel: wontfix
16
+ # Comment to post when marking an issue as stale. Set to `false` to disable
17
+ markComment: >
18
+ This issue has been automatically marked as stale because it has not had
19
+ recent activity. It will be closed if no further activity occurs.
20
+ # Comment to post when closing a stale issue. Set to `false` to disable
21
+ closeComment: false
@@ -0,0 +1,13 @@
1
+ name: Greetings
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ greeting:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/first-interaction@v1
10
+ with:
11
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
12
+ issue-message: ''
13
+ pr-message: 'Thank you for your contribution to this project, please make sure that you have read the CONTRIBUTING.md file and that your PR follows the guidelines mentioned there, if everything is ok we will review it as soon as posible'
@@ -0,0 +1,3 @@
1
+ prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown
2
+ npm test
3
+ git update-index --again
package/.lando.yml ADDED
@@ -0,0 +1,10 @@
1
+ name: glightbox
2
+ recipe: lemp
3
+ config:
4
+ webroot: .
5
+ services:
6
+ node:
7
+ type: node:14
8
+ tooling:
9
+ npm:
10
+ service: node
@@ -0,0 +1,3 @@
1
+ node_modules
2
+ dist/js/*.js
3
+ dist/css/*.css
@@ -0,0 +1,30 @@
1
+ {
2
+ "trailingComma": "none",
3
+ "tabWidth": 4,
4
+ "printWidth": 220,
5
+ "proseWrap": "never",
6
+ "semi": true,
7
+ "singleQuote": true,
8
+ "arrowParens": "always",
9
+ "htmlWhitespaceSensitivity": "ignore",
10
+ "overrides": [
11
+ {
12
+ "files": "*.json",
13
+ "options": {
14
+ "tabWidth": 2
15
+ }
16
+ },
17
+ {
18
+ "files": "*.md",
19
+ "options": {
20
+ "tabWidth": 2
21
+ }
22
+ },
23
+ {
24
+ "files": "*.yml",
25
+ "options": {
26
+ "tabWidth": 2
27
+ }
28
+ }
29
+ ]
30
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,259 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ### 3.3.4
6
+
7
+ - Feat: customizable aria-labels for navigation buttons. Closes [#566](https://github.com/biati-digital/glightbox/issues/566)
8
+ - Fix: add null guard `resetSlideMove` method. Closes [#587](https://github.com/biati-digital/glightbox/issues/587)
9
+ - Fix: `see more link` in description is closing before revealing text. Closes [#435](https://github.com/biati-digital/glightbox/issues/435)
10
+ - Feat: add new setting value for `see more` for description link via setting `lessText` defaults to `See less`
11
+ - Fix: local build command, test, husky, linter, formatter
12
+
13
+ ### 3.3.3
14
+
15
+ - Bumped version
16
+
17
+ ### 3.3.2
18
+
19
+ - Fixed: elements array type
20
+ - Fixed: `open` / `close` type correction, resolve local TS error
21
+ - Feat: release patched version under `@tomasvn/glightbox`
22
+
23
+ ## 3.3.1
24
+
25
+ - Fixed: handle optional slide trigger node for max height calculation
26
+ - Improved: types.d.ts mark some params as optional
27
+
28
+ ## 3.3.0
29
+
30
+ - New: glightbox types #411
31
+ - New: extend provider regex for ytb shorts #404
32
+ - Fixed: Fix height calculation for lightbox with description and height set #426
33
+ - Fixed: Don't set any font-family #424
34
+
35
+ ## 3.2.0
36
+
37
+ - New: Support for videos without extension
38
+ - Updated: Plyr to 3.6.12
39
+ - Fixed: Inline content not centered on tablets #295
40
+ - Fixed: Duplicated CSS properties #293
41
+ - Fixed: YouTube video button not clickable on iOS #298
42
+
43
+ ## 3.1.0
44
+
45
+ - New: Added Avif image support [@dramspro](https://github.com/biati-digital/glightbox/pull/266)
46
+ - New: Add support for responsive images [@gaborbsd](https://github.com/biati-digital/glightbox/pull/264)
47
+ - Updated: playsinline video attribute
48
+ - Updated: url check to allow query parameters in video and images
49
+ - Fixed: Image description/shadow off on mobile device #268
50
+ - Fixed: You can zoom next slide image if current slide is not full height #261
51
+ - Fixed: Draggable option not working with "setElements" #257
52
+
53
+ ## 3.0.9
54
+
55
+ - Updated: Plyr to 3.6.8
56
+ - Improved: JS error when the description attribute is an invalid selector
57
+ - Fixed: Media Buttons Not responding on Android #233
58
+ - Fixed: When touch is activated images swipe independently of their descriptions #238
59
+ - Fixed: Width / Height data attributes do not work for image types #234
60
+ - Fixed: Adds missing size unit of video description on resize #229
61
+
62
+ ## 3.0.8
63
+
64
+ - New: Added Aria-hidden on all root elements except the glightbox-container
65
+ - Fixed: Video in portrait mode is cropped
66
+ - Fixed: Video always has maxWidth 900px because of hardcoded setting
67
+ - Fixed: Removed explicit tabindex from navigation buttons
68
+
69
+ ## 3.0.7
70
+
71
+ - Fixed: Lightbox playing incorrect video with multiple videos in gallery #187
72
+ - Fixed: Draggable: false option not working #192
73
+ - Fixed: Links not working inside inline content in mobile devices
74
+ - Fixed: moreLength not working correctly on mobile if description has HTML
75
+ - Added: Added plugins option for a future release that will allow extending GLightbox with plugins
76
+ - Changed: Plyr fullscreen set to iosNative
77
+ - Changed: Renamed skin option to theme for a future release that will allow creating themes like plugins, skin still works but will be replaced in a future relase
78
+
79
+ ## 3.0.6
80
+
81
+ - Fixed: Events cleanup on `destroy()` method causes exception #175
82
+ - Fixed: "data-title" Getting Overwritten when "title" is present #178
83
+ - Fixed: IE 11 "Multiple definitions of a property not allowed in strict mode when bundling and minifying glightbox #155
84
+ - Fixed: Cannot add new slides #166
85
+ - Fixed: Video not playing on mobile #160
86
+ - Improved: Plyr will only be loaded if it's already used in the site
87
+ - New: Updated PLYR version to 3.6.3
88
+ - New: Added new option "autofocusVideos" to enable all Plyr shortcuts for the video player
89
+ - New: Improved events to use a generic way to access data
90
+ - New: Improved code
91
+
92
+ ## 3.0.5
93
+
94
+ - Fixed: IE11 does not support ".includes()"
95
+ - Fixed: Clicking outside the content to close only works in specific areas
96
+ - Fixed: openEffect / closeEffect no longer accepting "none"
97
+
98
+ ## 3.0.4
99
+
100
+ - New: New way to listen for events, the old events will still work but will be removed in a future update. See the Events section in the README
101
+ - New: Added new methods "slidePlayerPause" and "slidePlayerPlay" so in the future they will replace "playSlideVideo" and "stopSlideVideo" to provide support for audio slides in a future update
102
+ - New: Add preventDefault via touchstart on lightbox to prevent navigation swipe
103
+ - Fixed: e.getAttribute is not a function when there are no nodes in the gallery
104
+
105
+ ## 3.0.3
106
+
107
+ - New: Option "dragAutoSnap" to control the mouse drag auto close or change slide
108
+ - Fixed: Multiple galleries not working
109
+ - Fixed: Setting the elements directly using an object triggered error
110
+
111
+ ## 3.0.2
112
+
113
+ - New: Option "zoomable" to enable or disable zoomable images
114
+ - New: Option "preload" to enable or disable preloading
115
+ - New: Option "draggable" to go to prev/next slide by mouse dragging. Thanks to @Hirbod for the donation to make this happen
116
+ - New: Option "dragToleranceX" Used with draggable. Number of pixels the user has to drag to go to prev or next slide
117
+ - New: Option "dragToleranceY" Used with draggable. Number of pixels the user has to drag up or down to close the lightbox (Set 0 to disable vertical drag)
118
+ - New: The code was refactored to make it easier to maintain
119
+ - Fixed: data gallery stopped working
120
+ - Fixed: iOS bug with Vimeo iframe when fullscreen button pressed
121
+ - Fixed: "See more" link in the description throws an JS error when clicked
122
+ - Fixed: Videos not resized vertically when window height was smaller than the window width
123
+
124
+ ## 3.0.1
125
+
126
+ - Fixed: vertical scrolling of descriptions [@zothynine](https://github.com/biati-digital/glightbox/pull/134)
127
+ - Fixed: CSS properties bug
128
+ - Fixed: Passing null as selector throws an exception
129
+
130
+ ## 3.0.0
131
+
132
+ - New: New methods to access player instances "getSlidePlayerInstance(index or node) and getAllPlayers"
133
+ - New: Access player instance from afterSlideChange and beforeSlideChange"
134
+ - New: New Method removeSlide(1) remove slide at the specified index, it works even when the lightbox is open
135
+ - New: insertSlide now works even when the lightbox is open
136
+ - New: Added Accesibility features to slides
137
+ - New: Enabled touchNavigation for all devices that support touch events and not only mobile devices
138
+ - Changed: afterSlideLoad and beforeSlideLoad methods to follow the same variables as afterSlideChange, beforeSlideChange
139
+ - Fixed: Calling `destroy()` throws an error when modal is not open
140
+ - Fixed: Navigation not disabled correctly when only one slide
141
+
142
+ ## 2.0.6
143
+
144
+ - New: Now you can define width and height as 900px, 95%, 100vw, 100vh so you can have full screen content
145
+ - New: Now you can define custom html or a node in the slide data to append it to the slide (view the API section)
146
+ - New: Now you can use any attribute as selector for example '.glightbox' or 'data-glightbox' or '\*[data-glightbox]'
147
+ - New: Method "openAt" you can open the lightbox at specific index eg: lightbox.openAt(2);
148
+ - New: Method "insertSlide" that allows you to append a slide at specified index
149
+ - Fixed Tab Key Doesn't Work on Form Within GLightbox Inline Content
150
+ - Fixed Scrolling Description triggers closing the lightbox on touch devices
151
+ - Fixed Page jumps depending on page scrollbar
152
+ - Fixed Overriding default plyr settings does not merge correctly
153
+ - Fixed fullscreen video button on ios
154
+ - Moved plyr.ratio to plyr.config.ratio
155
+
156
+ ## 2.0.5
157
+
158
+ - New: Loop, renamed loopAtEnd to loop and now works in both directions
159
+ - New: added touchFollowAxis, for mobile when dragging the media will follow the same axis, set to false to move media as you wish
160
+ - New: added jpe format
161
+ - Fixed .mov videos not recognized as videos
162
+
163
+ ## 2.0.4
164
+
165
+ - Fixed some errors when zooming and dragging images
166
+ - Fixed description position not respected when configured globally
167
+ - Fixed local videos not resized correctly when entered fullscreen
168
+
169
+ ## 2.0.3
170
+
171
+ - New: Zooming images. Now you can zoom images on desktop if image is too large
172
+ - New: Now you can also define the slide description using the content of any div you want.
173
+ - New: Replaced png icons with svg and added options to customize them.
174
+ - Fixed responsive videos not resizing correctly when resizing the window vertically
175
+ - Fixed responsive images not resizing correctly if they have description and the window height is lower that the slide height
176
+ - Fixed youtube video not detected correctly for urls like youtube(-nocookie).com/embed/...
177
+
178
+ ## 2.0.2
179
+
180
+ - New: [Plyr player](https://plyr.io/), we have changed to this player so that way only one api is managed instead of 3
181
+ - New: Added tabindex accesibility to loop the controls with the tab key
182
+ - New: Inside inline content you can close the lightbox by adding the class **gtrigger-close** to any element
183
+ - Fixed StartAt not taking specified index
184
+ - Removed JWPlayer because that player implemented some restrictions unless you pay for a license
185
+ - Improved mobile touch events, swipe, move, zoom, etc.
186
+ - Changed: Youtube now by default uses youtube-nocookie.com, you can enable cookies in the config with youtube.nocookie to false
187
+ - Removed option videosHeight. The height is automatic depending the video width and ratio.
188
+ - Removed Gulp and replaced for pure nodejs scripts
189
+ - Improved documentation
190
+
191
+ ## 2.0.1
192
+
193
+ - Fixed Mobile navigation
194
+ - Fixed slide width for external sources
195
+
196
+ ## 2.0.0
197
+
198
+ - New: Delegated permissions to cross-origin iframes (for the new browsers autoplay restrictions)
199
+ - Fixed youtube, vimeo autoplay when changing slides
200
+ - Fixed lightbox won't fit screen with description
201
+ - Fixed Removed global body variable that was causing some problems
202
+
203
+ ## 1.0.9
204
+
205
+ - Added svg to source types so it can be displayed as an image [@tuomassalo](https://github.com/mcstudios/glightbox/pull/40)
206
+ - Added contributing file
207
+ - Updated dependencies [@tuomassalo](https://github.com/mcstudios/glightbox/pull/40).
208
+ - Removed demo folder from npm
209
+
210
+ ## 1.0.8
211
+
212
+ - New: You can define each slide option in a different data attribute (data-title="example" data-description="...")
213
+ - Fixed youtube and vimeo autoplay when opened for the first time
214
+ - Fixed global slide params not working
215
+ - Fixed some issues on IE11
216
+ - Fixed using characters : or ; in slide description
217
+
218
+ ## 1.0.7
219
+
220
+ - New: Added reload method, useful when injecting content with ajax, cloning nodes, etc.
221
+ - Fixed closeButton setting not removing the element
222
+ - Fixed video not displayed on mobile devices
223
+
224
+ ## 1.0.6
225
+
226
+ - New: Now you can set individual width and height for each slide with inlines or iframes.
227
+ - New: Now you can set individual source types for each slide ('type': 'image' | 'iframe' | 'video' | 'inline' | 'external).
228
+ - New: Published on npm
229
+ - New: Published on bower
230
+ - Fixed afterSlideLoad only triggered one time for all the slides
231
+ - Fixed a small space between the image and description when is set to top or bottom
232
+
233
+ ## 1.0.5
234
+
235
+ - New: Added none as a new option to disable open, close and slide animations
236
+ - New: Added new options (touchNavigation, keyboardNavigation, closeOnOutsideClick) to enable or disable user interaction
237
+ - Fixed open and close effect not taking a custom animation
238
+ - Fixed an error when calling the destroy method and no videos were present in the slider
239
+
240
+ ## 1.0.4
241
+
242
+ - Improved the open method so it can be called without duplicating the structure and events
243
+ - New: The original node is passed to events like beforeSlideChange, afterSlideChange, etc.
244
+
245
+ ## 1.0.3
246
+
247
+ - New: Added option moreLength to control the number of characters in the description for mobile devices
248
+
249
+ ## 1.0.2
250
+
251
+ - Fixed instance not returned and unable to call public methods
252
+
253
+ ## 1.0.1
254
+
255
+ - Fixed large images not displayed correctly
256
+
257
+ ## 1.0.0
258
+
259
+ - Initial release
@@ -0,0 +1,29 @@
1
+ # Contributing to GLightbox.js
2
+
3
+ Please read these guidelines before contributing code.
4
+
5
+ ## :nut_and_bolt: Setting up the development environment
6
+
7
+ - Fork and clone the repository
8
+ - `npm install`
9
+ - `npm run watch`
10
+ - To update js and css files, use the `src` folder: src/js/glightbox.js and src/postcss/glightbox.css These files will be compiled automatically with every change to the `dist` folder (do not modify the dist files directly)
11
+
12
+ ## :bug: Fixing a Bug
13
+
14
+ When fixing a bug please make sure to test it in several browsers including ie11. If you are not able to do so, mention that in a PR comment, so other contributors can do it. once your code is working please run the following command "eslint src/js" to verify that your code is following the same coding standards
15
+
16
+ ## :tada: Proposing a Change
17
+
18
+ When implementing a feature please create an issue first explaining your idea and asking whether there's need for such a feature. Remember the script's core philosophy is to stay simple and minimal, doing one thing and doing it right.
19
+
20
+ ## :pencil: Before you open a Pull Request
21
+
22
+ - Follow the same coding style.
23
+ - Run eslint to verify your code, run the following command "eslint src/js" and fix any error you find in your code
24
+ - **DO NOT** commit changes in the dist directory, this files are created automatically.
25
+ - Follow Git best practices (especially use meaningful commit messages).
26
+ - Describe thoroughly you work in a PR comment.
27
+ - Be patient and understanding. It's a side project, done in free time.
28
+
29
+ Thank you to everyone who has contributed to GLightbox.js!
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Biati Digital https://www.biati.digital
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.