Skip to content

Commit a7592b2

Browse files
committed
initial commit
1 parent 6a9554d commit a7592b2

16 files changed

+9482
-2
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Anant Negi
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.

README.md

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,81 @@
1-
# vue-lightbox-advanced
2-
Vue Lightbox Advanced Photo Grid component for Vue.js
1+
# Vue Lightbox Advanced
2+
3+
> Vue Lightbox Advanced Photo Grid component for Vue.js
4+
5+
[![npm](https://img.shields.io/badge/npm-1.0.0-blue)](https://www.npmjs.com/package/vue-lightbox-advanced)
6+
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/codeeshop-oc/vue-lightbox-advanced/blob/main/LICENSE)
7+
[![bit](https://img.shields.io/badge/components-1-yellowgreen)](https://github.com/codeeshop-oc/vue-lightbox-advanced/blob/main/src/VueLightboxAdvanced.vue)
8+
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/codeeshop-oc/vue-lightbox-advanced/issues?&q=is%3Aissue+is%3Aopen)
9+
10+
Vue Lightbox Advanced provides flexibility of displaying first x (1-5) images of your gallery in a grid view as you seen on Facebook timeline. Click on the thumbnail will return an event with the index or file url (src) as per passed props that can be used to show the image or can be used to redirect to that specific file url (src).
11+
It provides the shuffling images according to given options in docs.
12+
13+
14+
## 🎨 Features
15+
16+
Find out all available features on [settings props](https://github.com/codeeshop-oc/vue-lightbox-advanced/blob/main/docs/API.md#props) and see how that works on [examples](https://codeeshop-oc.github.io/vue-lightbox-advanced/).
17+
18+
19+
## 🚚 Installation
20+
21+
### yarn/npm
22+
23+
```bash
24+
# npm
25+
npm i vue-lightbox-advanced
26+
# yarn
27+
yarn add vue-lightbox-advanced
28+
```
29+
30+
### cdn
31+
32+
```bash
33+
# latest
34+
https://unpkg.com/vue-lightbox-advanced
35+
```
36+
37+
<br/>
38+
39+
## 🚀 Quick Start
40+
41+
```html
42+
<template>
43+
<div>
44+
<VueLightboxAdvanced :items="images" />
45+
</div>
46+
</template>
47+
48+
<script>
49+
import VueLightboxAdvanced from 'vue-lightbox-advanced'
50+
51+
export default {
52+
name: 'MyComponent',
53+
components: { VueLightboxAdvanced },
54+
data() {
55+
return {
56+
images: [
57+
"https://i.wifegeek.com/200426/f9459c52.jpg",
58+
"https://i.wifegeek.com/200426/5ce1e1c7.jpg",
59+
"https://i.wifegeek.com/200426/5fa51df3.jpg",
60+
"https://i.wifegeek.com/200426/663181fe.jpg",
61+
"https://i.wifegeek.com/200426/2d110780.jpg",
62+
"https://i.wifegeek.com/200426/e73cd3fa.jpg",
63+
"https://i.wifegeek.com/200426/15160d6e.jpg",
64+
"https://i.wifegeek.com/200426/81e24a47.jpg",
65+
"https://i.wifegeek.com/200426/43e2e8bb.jpg"
66+
]
67+
}
68+
},
69+
}
70+
</script>
71+
```
72+
73+
<br/>
74+
75+
## 🔖 License
76+
77+
This software is licensed under the [MIT](https://github.com/codeeshop-oc/vue-lightbox-advanced/blob/main/LICENSE).
78+
79+
## Reference From
80+
81+
[Morioh-Lab/v-lightbox](https://github.com/Morioh-Lab/v-lightbox)

babel.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const devPresets = ['@vue/babel-preset-app'];
2+
const buildPresets = [
3+
[
4+
'@babel/preset-env',
5+
// Config for @babel/preset-env
6+
{
7+
// Example: Always transpile optional chaining/nullish coalescing
8+
// include: [
9+
// /(optional-chaining|nullish-coalescing)/
10+
// ],
11+
},
12+
],
13+
];
14+
module.exports = {
15+
presets: (process.env.NODE_ENV === 'development' ? devPresets : buildPresets),
16+
};

dev/serve.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from 'vue';
2+
import Dev from './serve.vue';
3+
4+
Vue.config.productionTip = false;
5+
6+
new Vue({
7+
render: (h) => h(Dev),
8+
}).$mount('#app');

dev/serve.vue

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<script>
2+
import Vue from 'vue';
3+
import VueLightboxAdvanced from '@/VueLightboxAdvanced.vue';
4+
import '@/VueLightboxAdvanced.css';
5+
6+
export default Vue.extend({
7+
name: 'ServeDev',
8+
data() {
9+
return {
10+
images: [
11+
"https://i.wifegeek.com/200426/f9459c52.jpg",
12+
"https://i.wifegeek.com/200426/5ce1e1c7.jpg",
13+
"https://i.wifegeek.com/200426/5fa51df3.jpg",
14+
"https://i.wifegeek.com/200426/663181fe.jpg",
15+
"https://i.wifegeek.com/200426/2d110780.jpg",
16+
"https://i.wifegeek.com/200426/e73cd3fa.jpg",
17+
"https://i.wifegeek.com/200426/15160d6e.jpg",
18+
"https://i.wifegeek.com/200426/d0c881ae.jpg",
19+
"https://i.wifegeek.com/200426/a154fc3d.jpg",
20+
"https://i.wifegeek.com/200426/71d3aa60.jpg",
21+
"https://i.wifegeek.com/200426/d17ce9a0.jpg",
22+
"https://i.wifegeek.com/200426/7c4deca9.jpg",
23+
"https://i.wifegeek.com/200426/64672676.jpg",
24+
"https://i.wifegeek.com/200426/de6ab9c6.jpg",
25+
"https://i.wifegeek.com/200426/d8bcb6a7.jpg",
26+
"https://i.wifegeek.com/200426/4085d03b.jpg",
27+
"https://i.wifegeek.com/200426/177ef44c.jpg",
28+
"https://i.wifegeek.com/200426/d74d9040.jpg",
29+
"https://i.wifegeek.com/200426/81e24a47.jpg",
30+
"https://i.wifegeek.com/200426/43e2e8bb.jpg"
31+
]
32+
}
33+
},
34+
components: {
35+
VueLightboxAdvanced
36+
},
37+
methods: {
38+
eventEmitted(index) {
39+
console.log(`Event Emmited....`)
40+
console.log(`Return Value: ${index}`)
41+
}
42+
}
43+
});
44+
</script>
45+
46+
<template>
47+
<div id="app">
48+
<div style="height: 250px; width: 400px;">
49+
<VueLightboxAdvanced :returnSrc="true" :items="images" @clicked:index="eventEmitted" />
50+
</div>
51+
</div>
52+
</template>

dist/VueLightboxAdvanced.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueLightboxAdvanced.esm.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueLightboxAdvanced.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)