dgw_gallery 0.2.4 → 0.2.5
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.
- checksums.yaml +4 -4
- data/README.md +34 -0
- data/app/assets/stylesheets/dgw_gallery/dgw_gallery_style.css +89 -36624
- data/app/views/gallery/_form.html.erb +1 -1
- data/app/views/gallery/index.html.erb +7 -3
- data/app/views/gallery/manage.html.erb +26 -8
- data/app/views/gallery/new.html.erb +3 -0
- data/lib/dgw_gallery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 535bdf862efea2355ce15b4fa8e0582e391cef4778312d2258932618ab804ca0
|
4
|
+
data.tar.gz: f93e073d41d30f8045a7ef346b2e79689c1461c1d66a8dae4d70b31086e207d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca32a15e8485a366139dbd8c7cce16663fcb3b5779fc69d6b431f3c0a37522d8696dc3ddc7b8b1dfad291693dd5536e4727c828db4e3362018af3ca7043edb90
|
7
|
+
data.tar.gz: ce1a4e40184586fdb98d6a81cdf960e9ec84b4997e0f541d09094b8ed5ebce39d46860c97dd5a284d919ff87ca4388cdb9e8ef22c54d4fbcd1a9b7e781f5e26d
|
data/README.md
CHANGED
@@ -36,6 +36,40 @@ $ rails app:dgw_gallery:install:views # Install Gallery Views
|
|
36
36
|
$ rails app:dgw_gallery:install:controller # Install Gallery Controller
|
37
37
|
```
|
38
38
|
|
39
|
+
## Usage
|
40
|
+
#### To embed the carousel on your page you will use code similar to this
|
41
|
+
```ruby
|
42
|
+
### in your action where you want to display gallery
|
43
|
+
### replace 'id' with the id of gallery you want
|
44
|
+
@gallery = Gallery.find(id)
|
45
|
+
```
|
46
|
+
|
47
|
+
```erb
|
48
|
+
<!-- Code in view.html.erb -->
|
49
|
+
<!-- Start Embeded Gallery Area -->
|
50
|
+
<% if !@gallery.gallery_images.blank? %>
|
51
|
+
<div id="dgwGalleryIndicators" class="carousel slide" data-bs-ride="carousel" data-bs-interval="5000">
|
52
|
+
<div class="carousel-inner">
|
53
|
+
<% @gallery.gallery_images.each_with_index do |gi, idx| %>
|
54
|
+
<div data-bs-interval="5000" class="carousel-item <%= (idx == 0)? "active" : nil %>">
|
55
|
+
<figure>
|
56
|
+
<%= image_tag gi.image.variant(resize_to_fill: [900, 500]), class: "img-fluid border-radius-xl" %>
|
57
|
+
</figure>
|
58
|
+
<figcaption class="blockquote-footer text-center">
|
59
|
+
<%= gi.caption %>
|
60
|
+
</figcaption>
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<% else %>
|
66
|
+
<div class="col-12 text-center">
|
67
|
+
There Are No Slides to Display. Please add some.
|
68
|
+
</div>
|
69
|
+
<% end %>
|
70
|
+
<!-- End Embeded Gallery Area -->
|
71
|
+
```
|
72
|
+
|
39
73
|
## Contributing
|
40
74
|
If you wish to contribute submit a pull request and detail your changes and comment them in the code as well.
|
41
75
|
|