dgw_gallery 0.2.6 → 0.2.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d688daa5b376cf3feea8c2596dbf2a3e812ada41d8751a0c2f28c103fe6a92ca
4
- data.tar.gz: fbae17acdc077743da55dc1c86260f08b4f3a1f8e0fc68e0131297d8c0a9c0f1
3
+ metadata.gz: 397c88e72908ae2a71b0433fd0e8aaacfedd3961f84030d5003d05b852cf5198
4
+ data.tar.gz: 30dcc858eed28478e575f23c6c8e1aaa75c27e8b2176b94f9810175a13fe14bd
5
5
  SHA512:
6
- metadata.gz: a19c36c5e55942df498cd4383c9c78fed04a78ca4712ef6a313a8a8e02e29e9ac4c8566ae73103eda5591076fb671ecc457378d83317fbdae44c66199fca65ee
7
- data.tar.gz: 33bb846a9e3815c18cd51732ba17999e04b36464116d09b5cd361187f13eb0aef3d70d19bf01af218ec163e87016b86e64850befa46a10cf91fba1746fc6b8f0
6
+ metadata.gz: 2c743a6565ea9ac2eecc067a3a47a07818af8dcce645008b1776e06bd87447c66c5bc49aa37dcab35d969b6219f0bc23ee34ca08f761622c286b08b96bcda8cb
7
+ data.tar.gz: 687ac7ebe6e1592e3d3db309c4f7988df0f061d19c8fe5e3546c4400f77b2680cd41a3dd3bcde479adbc1788b9e64c2499b6c58569bb05c16baf4d886ffe0913
data/README.md CHANGED
@@ -37,6 +37,15 @@ $ rails dgw_gallery:install:controller # Install Gallery Controller
37
37
  $ rails dgw_gallery:install:css # Install Gallery CSS
38
38
  ```
39
39
 
40
+ If you are using turbolinks and experiencing issues with the carousel not starting on initial page load, try adding the following line at the end of your head section either for your main app or for that specific page.
41
+ ```html
42
+ <head>
43
+ ...
44
+ ...
45
+ <meta name="turbolinks-visit-control" content="reload">
46
+ </head>
47
+ ```
48
+
40
49
  ## Usage
41
50
  #### To embed the carousel on your page you will use code similar to this
42
51
  ```ruby
@@ -47,30 +56,22 @@ $ rails dgw_gallery:install:css # Install Gallery CSS
47
56
 
48
57
  ```erb
49
58
  <!-- Code in view.html.erb -->
50
- <!-- Start Embeded Gallery Area -->
51
- <% if !@gallery.gallery_images.blank? %>
52
- <div id="dgwGalleryIndicators" class="carousel slide" data-bs-ride="carousel" data-bs-interval="5000">
53
- <div class="carousel-inner">
54
- <% @gallery.gallery_images.each_with_index do |gi, idx| %>
55
- <div data-bs-interval="5000" class="carousel-item <%= (idx == 0)? "active" : nil %>">
56
- <figure>
57
- <%= image_tag gi.image.variant(resize_to_fill: [900, 500]), class: "img-fluid border-radius-xl" %>
58
- </figure>
59
- <figcaption class="blockquote-footer text-center">
60
- <%= gi.caption %>
61
- </figcaption>
59
+ <div class="row mt-2">
60
+ <div class="card card-body border-radius-xl col-12 text-black shadow-lg" id="galleryCodeSection">
61
+ <div class="row justify-content-center align-items-evenly">
62
+ <div class="col-5 bg-light rounded mx-5 h-100">
63
+ <div class="card-header mt-3 border-radius-xl bg-transparent position-relative z-index-2 blur-shadow-image dark-shadow">
64
+ <%= render 'gallery/carousel' %>
62
65
  </div>
63
- <% end %>
66
+ </div>
64
67
  </div>
65
68
  </div>
66
- <% else %>
67
- <div class="col-12 text-center">
68
- There Are No Slides to Display. Please add some.
69
- </div>
70
- <% end %>
71
- <!-- End Embeded Gallery Area -->
69
+ </div>
72
70
  ```
73
71
 
72
+ Customizations can be made in the galler/_carousel.html.erb view if necessary
73
+
74
+
74
75
  ## Contributing
75
76
  If you wish to contribute submit a pull request and detail your changes and comment them in the code as well.
76
77
 
@@ -0,0 +1,22 @@
1
+ <!-- Start Embeded Gallery Area -->
2
+ <% if !@gallery.gallery_images.blank? %>
3
+ <div id="dgwGalleryIndicators" class="carousel slide" data-bs-ride="carousel" data-bs-interval="5000">
4
+ <div class="carousel-inner">
5
+ <% @gallery.gallery_images.each_with_index do |gi, idx| %>
6
+ <div data-bs-interval="5000" class="carousel-item <%= (idx == 0)? "active" : nil %>">
7
+ <figure>
8
+ <%= image_tag gi.image.variant(resize_to_fill: [900, 500]), class: "img-fluid border-radius-xl" %>
9
+ </figure>
10
+ <figcaption class="blockquote-footer text-center">
11
+ <%= gi.caption %>
12
+ </figcaption>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+ </div>
17
+ <% else %>
18
+ <div class="col-12 text-center">
19
+ There Are No Slides to Display. Please add some.
20
+ </div>
21
+ <% end %>
22
+ <!-- End Embeded Gallery Area -->
@@ -1,3 +1,3 @@
1
1
  module DgwGallery
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dgw_gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dev Ghost Writers
@@ -65,6 +65,7 @@ files:
65
65
  - app/helpers/gallery_helper.rb
66
66
  - app/models/gallery.rb
67
67
  - app/models/gallery_image.rb
68
+ - app/views/gallery/_carousel.html.erb
68
69
  - app/views/gallery/_form.html.erb
69
70
  - app/views/gallery/index.html.erb
70
71
  - app/views/gallery/manage.html.erb