appscms-tools-theme 5.2.8 → 5.2.9

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: f32e7f6f40656add82a385f569a52b40dde3200aec11b1d323c1ecc3d58bd846
4
- data.tar.gz: e79274bb2de07ba817785e9ee3477f86abe1793b84b9596adec633dfbcd01f6b
3
+ metadata.gz: 172518566046f4fd7791d50dd2e7c26122eed58a3a0696ffddb700992ed289ce
4
+ data.tar.gz: bb4626c1cf6b9773621276c3de6d74782da35d12bada124fdaffa09ec224cf87
5
5
  SHA512:
6
- metadata.gz: 535b351149b9ae236ca894632fdf0350f296482e10b8127fb6aa707e020b6177f76a6fecc53a2de26cef683bfb2dc3d88f0fe7f1136c309d1b539a93324f0da6
7
- data.tar.gz: 647f9b77ac509a63a6a43696fd21c897966336ffc65ec30a37dc50eb188e92c2db22c5b62d2fa490d282d1125fb703256e09cebe9797a68fc62da62e8ecf0e47
6
+ metadata.gz: af21d39e08c528cf7978449a6967e95c2848cd9090dc47361e2ca41eb50d5ad1e24862c89d7ae1fba268844d4d5bdbab75f77226088504a839ea0274c5124c50
7
+ data.tar.gz: 5a9353662bc9d831c2cb0a5cdc9f02753f0d22a1be464b3ca1564a38eed798538d7a7ed01451af883bddf2b73edba20f45ca855489c71b93e54c3b5d17d9d9fe
data/_includes/.DS_Store CHANGED
Binary file
Binary file
@@ -1,64 +1,126 @@
1
1
  <style>
2
- .modal-arrow-btn {
2
+ .infographics-container {
3
+ padding: 40px 0;
4
+ }
5
+ .infographics-h2 {
6
+ font-size: 28px;
7
+ font-weight: 700;
8
+ text-align: center;
9
+ margin-bottom: 10px;
10
+ color: #333;
11
+ }
12
+ .infographics-description {
13
+ text-align: center;
14
+ color: #666;
15
+ margin-bottom: 30px;
16
+ }
17
+ .infographics-section {
18
+ position: relative;
19
+ }
20
+ .infographics-arrow {
21
+ position: absolute;
22
+ top: 50%;
23
+ transform: translateY(-50%);
24
+ width: 40px;
25
+ height: 40px;
26
+ border-radius: 50%;
27
+ background: #fff;
28
+ border: 1px solid #e0e0e0;
29
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
30
+ cursor: pointer;
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ z-index: 10;
35
+ transition: all 0.2s ease;
36
+ }
37
+ .infographics-arrow:hover {
38
+ background: #f5f5f5;
39
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
40
+ }
41
+ .infographics-arrow-left {
42
+ left: -50px;
43
+ }
44
+ .infographics-arrow-right {
45
+ right: -50px;
46
+ }
47
+ .infographics-carousel {
48
+ overflow: hidden;
49
+ }
50
+ .infographics-row {
51
+ display: flex;
52
+ flex-wrap: nowrap;
53
+ transition: transform 0.3s ease;
54
+ }
55
+ .infographic-card {
56
+ flex: 0 0 33.333%;
57
+ max-width: 33.333%;
58
+ padding: 0 12px;
59
+ }
60
+ .infographic-card-inner {
61
+ background: #fff;
62
+ border-radius: 12px;
63
+ overflow: hidden;
64
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
65
+ transition: all 0.3s ease;
66
+ height: 100%;
67
+ }
68
+ .infographic-card-inner:hover {
69
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
70
+ transform: translateY(-5px);
71
+ }
72
+ .infographic-img-wrapper {
73
+ width: 100%;
74
+ height: 200px;
75
+ overflow: hidden;
76
+ cursor: pointer;
77
+ position: relative;
78
+ }
79
+ .infographic-img-wrapper .magnify-icon {
3
80
  position: absolute;
4
81
  top: 50%;
82
+ left: 50%;
83
+ transform: translate(-50%, -50%);
5
84
  width: 50px;
6
85
  height: 50px;
7
- background: rgba(0, 0, 0, 0.5);
8
- color: #fff;
9
- border: none;
10
- cursor: pointer;
11
- font-size: 24px;
12
- text-align: center;
13
- line-height: 50px;
86
+ background: rgba(255, 255, 255, 0.95);
14
87
  border-radius: 50%;
15
- transform: translateY(-50%);
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ opacity: 0;
92
+ transition: all 0.3s ease;
93
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
16
94
  }
17
-
18
- .modal-arrow-btn.prev {
19
- left: 10px;
95
+ .infographic-img-wrapper .magnify-icon svg {
96
+ width: 24px;
97
+ height: 24px;
98
+ color: #333;
20
99
  }
21
-
22
- .modal-arrow-btn.next {
23
- right: 10px;
100
+ .infographic-img-wrapper:hover .magnify-icon {
101
+ opacity: 1;
24
102
  }
25
-
26
- @media (max-width: 768px) {
27
- .modal-arrow-btn {
28
- top: 30%;
29
- width: 40px;
30
- height: 40px;
31
- font-size: 20px;
32
- line-height: 40px;
33
- }
34
-
35
- .modal-arrow-btn.prev {
36
- left: 5px;
37
- }
38
-
39
- .modal-arrow-btn.next {
40
- right: 5px;
41
- }
103
+ .infographic-img-wrapper:hover .infographic-img {
104
+ transform: scale(1.05);
105
+ filter: brightness(0.8);
42
106
  }
43
-
44
- @media (max-width: 480px) {
45
- .modal-arrow-btn {
46
- width: 30px;
47
- height: 30px;
48
- font-size: 16px;
49
- line-height: 30px;
50
- }
51
-
52
- .modal-arrow-btn.prev {
53
- left: 3px;
54
- }
55
-
56
- .modal-arrow-btn.next {
57
- right: 3px;
58
- }
107
+ .infographic-img {
108
+ width: 100%;
109
+ height: 100%;
110
+ object-fit: cover;
111
+ transition: all 0.3s ease;
112
+ }
113
+ .infographic-desc {
114
+ padding: 15px;
115
+ font-size: 14px;
116
+ font-weight: 500;
117
+ color: #333;
118
+ text-align: center;
119
+ border-top: 1px solid #f0f0f0;
59
120
  }
60
121
 
61
- .modal1 {
122
+ /* Modal styles */
123
+ .infographic-modal {
62
124
  position: fixed;
63
125
  z-index: 1000;
64
126
  left: 0;
@@ -66,152 +128,258 @@
66
128
  width: 100%;
67
129
  height: 100%;
68
130
  overflow: auto;
69
- background-color: rgba(59, 58, 58, 0.9);
131
+ background-color: rgba(0, 0, 0, 0.9);
70
132
  opacity: 0;
71
133
  visibility: hidden;
72
- transform: scale(0.8);
73
- transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
134
+ transition: opacity 0.3s ease, visibility 0s linear 0.3s;
74
135
  }
75
-
76
- .modal1.show {
136
+ .infographic-modal.show {
77
137
  opacity: 1;
78
138
  visibility: visible;
79
- transform: scale(1);
80
- transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
139
+ transition: opacity 0.3s ease, visibility 0s;
81
140
  }
82
-
83
- .modal1-content1 {
84
- margin: auto;
85
- display: block;
86
- width: 80%;
87
- max-width: 800px;
88
- margin-top: 20px;
89
- opacity: 0;
90
- transform: translateY(-20px);
91
- transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
141
+ .infographic-modal-content {
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ height: 100%;
146
+ padding: 20px;
92
147
  }
93
-
94
- .modal1.show .modal1-content1 {
95
- opacity: 1;
96
- transform: translateY(0);
148
+ .infographic-modal-img {
149
+ max-width: 90%;
150
+ max-height: 90vh;
151
+ object-fit: contain;
152
+ border-radius: 8px;
97
153
  }
98
-
99
- .modal1-body img {
100
- width: 100%;
101
- height: auto;
154
+ .infographic-modal-close {
155
+ position: absolute;
156
+ top: 20px;
157
+ right: 30px;
158
+ font-size: 40px;
159
+ color: #fff;
160
+ cursor: pointer;
161
+ transition: color 0.2s ease;
162
+ z-index: 1001;
102
163
  }
103
-
104
- .close1 {
164
+ .infographic-modal-close:hover {
165
+ color: #ccc;
166
+ }
167
+ .infographic-modal-arrow {
105
168
  position: absolute;
106
- top: 10px;
107
- right: 10px;
108
- font-size: 24px;
169
+ top: 50%;
170
+ transform: translateY(-50%);
171
+ width: 50px;
172
+ height: 50px;
173
+ background: rgba(255, 255, 255, 0.2);
109
174
  color: #fff;
175
+ border: none;
110
176
  cursor: pointer;
177
+ font-size: 24px;
178
+ border-radius: 50%;
179
+ display: flex;
180
+ align-items: center;
181
+ justify-content: center;
182
+ transition: background 0.2s ease;
183
+ }
184
+ .infographic-modal-arrow:hover {
185
+ background: rgba(255, 255, 255, 0.4);
186
+ }
187
+ .infographic-modal-arrow.prev {
188
+ left: 20px;
189
+ }
190
+ .infographic-modal-arrow.next {
191
+ right: 20px;
111
192
  }
112
193
 
113
- .close1:hover {
114
- color: #ccc;
194
+ @media (max-width: 991px) {
195
+ .infographic-card {
196
+ flex: 0 0 50%;
197
+ max-width: 50%;
198
+ }
199
+ .infographics-arrow-left {
200
+ left: -25px;
201
+ }
202
+ .infographics-arrow-right {
203
+ right: -25px;
204
+ }
205
+ }
206
+ @media (max-width: 767px) {
207
+ .infographic-card {
208
+ flex: 0 0 100%;
209
+ max-width: 100%;
210
+ }
211
+ .infographics-arrow-left {
212
+ left: 10px;
213
+ }
214
+ .infographics-arrow-right {
215
+ right: 10px;
216
+ }
217
+ .infographics-arrow {
218
+ background: rgba(255, 255, 255, 0.9);
219
+ }
220
+ .infographic-modal-arrow {
221
+ width: 40px;
222
+ height: 40px;
223
+ font-size: 20px;
224
+ }
225
+ .infographic-modal-arrow.prev {
226
+ left: 10px;
227
+ }
228
+ .infographic-modal-arrow.next {
229
+ right: 10px;
230
+ }
115
231
  }
116
232
  </style>
117
- <div class="inforgraphics_section">
118
- <h3 class="text-center w-100 mb-5"><b>Other useful information</b></h3>
119
- <div class="wrapper">
120
- <i id="left" class="fas fa-angle-left"></i>
121
- <div class="carousel">
122
- <div class="carousel-inner">
123
- {%- if pageData.infographics -%} {% for item in pageData.infographics %}
124
- <div class="slide">
125
- <img loading="lazy" src="{{ item.image }}" alt="{{item.alt}}" draggable="false" class="infographic-img"
126
- onclick="openModal1('{{ item.image }}')" />
127
- <p class="infographic-desc">{{ item.description | capitalize }}</p>
233
+
234
+ {%- if pageData.infographics -%}
235
+ <div class="infographics-container">
236
+ <p class="infographics-h2">Other useful information</p>
237
+ <p class="infographics-description">Explore our visual guides and infographics</p>
238
+
239
+ <div class="container">
240
+ <div class="row">
241
+ <div class="col-md-10 mx-auto">
242
+ <div class="infographics-section">
243
+ <button class="infographics-arrow infographics-arrow-left" id="infographicsLeft">
244
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
245
+ <path d="m15 18-6-6 6-6"></path>
246
+ </svg>
247
+ </button>
248
+
249
+ <div class="infographics-carousel">
250
+ <div class="infographics-row" id="infographicsRow">
251
+ {% for item in pageData.infographics %}
252
+ <div class="infographic-card">
253
+ <div class="infographic-card-inner">
254
+ <div class="infographic-img-wrapper" data-index="{{ forloop.index0 }}">
255
+ <img loading="lazy" src="{{ item.image }}" alt="{{ item.alt }}" class="infographic-img" draggable="false" />
256
+ <div class="magnify-icon">
257
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
258
+ <circle cx="11" cy="11" r="8"></circle>
259
+ <path d="m21 21-4.35-4.35"></path>
260
+ <path d="M11 8v6"></path>
261
+ <path d="M8 11h6"></path>
262
+ </svg>
263
+ </div>
264
+ </div>
265
+ <p class="infographic-desc">{{ item.description | capitalize }}</p>
266
+ </div>
267
+ </div>
268
+ {% endfor %}
269
+ </div>
270
+ </div>
271
+
272
+ <button class="infographics-arrow infographics-arrow-right" id="infographicsRight">
273
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
274
+ <path d="m9 18 6-6-6-6"></path>
275
+ </svg>
276
+ </button>
128
277
  </div>
129
- {% endfor %} {%- endif -%}
130
278
  </div>
131
279
  </div>
132
- <i id="right" class="fas fa-angle-right"></i>
133
280
  </div>
134
281
  </div>
135
- <div id="imageModal1" class="modal1" onclick="closeModal1()">
136
- <span class="close1" onclick="closeModal1()">&times;</span>
137
- <button class="modal-arrow-btn prev">&#10094;</button>
138
- <button class="modal-arrow-btn next">&#10095;</button>
139
- <div class="modal1-content1">
140
- <div class="modal1-body">
141
- <img id="modal1Image" src="" alt="Image" />
142
- </div>
282
+
283
+ <!-- Full Preview Modal -->
284
+ <div id="infographicModal" class="infographic-modal">
285
+ <span class="infographic-modal-close" id="modalClose">&times;</span>
286
+ <button class="infographic-modal-arrow prev" id="modalPrev">&#10094;</button>
287
+ <button class="infographic-modal-arrow next" id="modalNext">&#10095;</button>
288
+ <div class="infographic-modal-content">
289
+ <img id="modalImage" class="infographic-modal-img" src="" alt="Infographic Preview" />
143
290
  </div>
144
291
  </div>
145
292
 
146
-
147
293
  <script>
148
- document.addEventListener("DOMContentLoaded", () => {
149
- let modal_array_of_images = [];
150
- let current_modal_img = 0;
151
-
152
- // Function to update the modal image
153
- function updateModalImage() {
154
- const modal1Img = document.getElementById("modal1Image");
155
- if (modal_array_of_images.length > 0) {
156
- modal1Img.src = modal_array_of_images[current_modal_img].src;
157
- }
158
- }
294
+ document.addEventListener("DOMContentLoaded", () => {
295
+ const infographicsRow = document.getElementById('infographicsRow');
296
+ const leftBtn = document.getElementById('infographicsLeft');
297
+ const rightBtn = document.getElementById('infographicsRight');
298
+ const cards = document.querySelectorAll('.infographic-card');
299
+ const modal = document.getElementById('infographicModal');
300
+ const modalImg = document.getElementById('modalImage');
301
+ const modalClose = document.getElementById('modalClose');
302
+ const modalPrev = document.getElementById('modalPrev');
303
+ const modalNext = document.getElementById('modalNext');
159
304
 
160
- // Function to prepare the array of images for the modal
161
- function readyallimages() {
162
- modal_array_of_images = Array.from(document.querySelectorAll('.infographic-img'));
163
- }
305
+ let currentModalIndex = 0;
306
+ const images = Array.from(document.querySelectorAll('.infographic-img'));
164
307
 
165
- // Function to open the modal and set the current image
166
- function openModal1(imageSrc) {
167
- const modal1 = document.getElementById("imageModal1");
168
- modal1.classList.add("show");
169
- modal_array_of_images = Array.from(document.querySelectorAll('.infographic-img'));
170
- current_modal_img = modal_array_of_images.findIndex(img => img.src === imageSrc);
171
- updateModalImage();
308
+ // Carousel navigation
309
+ rightBtn.addEventListener('click', () => {
310
+ const firstCard = infographicsRow.querySelector('.infographic-card:first-child');
311
+ if (firstCard) {
312
+ infographicsRow.appendChild(firstCard.cloneNode(true));
313
+ firstCard.remove();
314
+ attachCardListeners();
172
315
  }
316
+ });
173
317
 
174
- // Function to close the modal
175
- function closeModal1() {
176
- const modal1 = document.getElementById("imageModal1");
177
- modal1.classList.remove("show");
318
+ leftBtn.addEventListener('click', () => {
319
+ const lastCard = infographicsRow.querySelector('.infographic-card:last-child');
320
+ if (lastCard) {
321
+ infographicsRow.insertBefore(lastCard.cloneNode(true), infographicsRow.firstChild);
322
+ lastCard.remove();
323
+ attachCardListeners();
178
324
  }
325
+ });
179
326
 
180
- // Add click event listeners to each infographic image
181
- document.querySelectorAll('.infographic-img').forEach(img => {
182
- img.addEventListener('click', (event) => {
183
- openModal1(event.target.src);
184
- });
185
- });
327
+ // Modal functions
328
+ function openModal(index) {
329
+ currentModalIndex = index;
330
+ modalImg.src = images[currentModalIndex].src;
331
+ modal.classList.add('show');
332
+ document.body.style.overflow = 'hidden';
333
+ }
186
334
 
187
- // Event listeners for the modal arrow buttons
188
- const modal_btns = document.querySelectorAll('.modal-arrow-btn');
189
- modal_btns.forEach(modal_btn => {
190
- modal_btn.addEventListener('click', (e) => {
191
- e.stopPropagation();
192
- if (modal_btn.classList.contains('prev')) {
193
- current_modal_img = (current_modal_img > 0) ? current_modal_img - 1 : modal_array_of_images.length - 1;
194
- } else {
195
- current_modal_img = (current_modal_img < modal_array_of_images.length - 1) ? current_modal_img + 1 : 0;
196
- }
197
- updateModalImage();
198
- });
199
- });
335
+ function closeModal() {
336
+ modal.classList.remove('show');
337
+ document.body.style.overflow = '';
338
+ }
200
339
 
201
- // Event listener for the close button
202
- document.querySelectorAll(".close1").forEach(element => {
203
- element.addEventListener("click", closeModal1);
204
- });
340
+ function showPrev() {
341
+ currentModalIndex = (currentModalIndex > 0) ? currentModalIndex - 1 : images.length - 1;
342
+ modalImg.src = images[currentModalIndex].src;
343
+ }
344
+
345
+ function showNext() {
346
+ currentModalIndex = (currentModalIndex < images.length - 1) ? currentModalIndex + 1 : 0;
347
+ modalImg.src = images[currentModalIndex].src;
348
+ }
205
349
 
206
- // Event listener for closing the modal when clicking outside the image
207
- document.getElementById("imageModal1").addEventListener("click", (event) => {
208
- if (event.target === document.getElementById("imageModal1")) {
209
- closeModal1();
210
- }
350
+ // Attach click listeners to cards
351
+ function attachCardListeners() {
352
+ document.querySelectorAll('.infographic-img-wrapper').forEach((wrapper) => {
353
+ wrapper.onclick = function() {
354
+ const img = this.querySelector('.infographic-img');
355
+ const index = images.findIndex(i => i.src === img.src);
356
+ openModal(index >= 0 ? index : 0);
357
+ };
211
358
  });
359
+ }
212
360
 
213
- // Initialize modal images on page load
214
- readyallimages();
361
+ // Event listeners
362
+ modalClose.addEventListener('click', closeModal);
363
+ modalPrev.addEventListener('click', (e) => { e.stopPropagation(); showPrev(); });
364
+ modalNext.addEventListener('click', (e) => { e.stopPropagation(); showNext(); });
365
+
366
+ modal.addEventListener('click', (e) => {
367
+ if (e.target === modal || e.target === document.querySelector('.infographic-modal-content')) {
368
+ closeModal();
369
+ }
370
+ });
371
+
372
+ // Keyboard navigation
373
+ document.addEventListener('keydown', (e) => {
374
+ if (modal.classList.contains('show')) {
375
+ if (e.key === 'Escape') closeModal();
376
+ if (e.key === 'ArrowLeft') showPrev();
377
+ if (e.key === 'ArrowRight') showNext();
378
+ }
215
379
  });
216
380
 
217
- </script>
381
+ // Initialize
382
+ attachCardListeners();
383
+ });
384
+ </script>
385
+ {%- endif -%}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appscms-tools-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.8
4
+ version: 5.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - vivek-appscms