appscms-tools-theme 4.8.7 → 4.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aabc9c46eb1411355e71b373f27b608db11551dbe65ad297a57648c85d9b57df
4
- data.tar.gz: a91a0f5f1d3c5ab15d10afa58198a56a75d3a493e379d0125d125f386f833082
3
+ metadata.gz: 48bc92c7ce7ec3beab1dc7d1ffe850b8faad27713e3f3daca23a545093d90826
4
+ data.tar.gz: 8c24fe8f0cf6a300606598c5f1260364aee72f39c6e21634b31589224b47d742
5
5
  SHA512:
6
- metadata.gz: e0836961e45a5be5322af0f45ba2cf10607edfcd95df25a11f189912e82a385a3d3da0fccc43905d1fbba4784b64644c9a19e281ee90fca31ec329d7dd09a388
7
- data.tar.gz: 8eb5122ba27c67c525380175470bc4dda2644f4e13773249130df63cec32cfe8375b3f77b87d8261b8248a43be8be6560f50fb2c4cf91187c613a3120976967b
6
+ metadata.gz: e052c817906a54b2a29c2c633e819bed85db06b21e9cd693194781e271ddc73420c62c4e3512b279a15b92285c1ab304259c2e541ca28c37c350253be505b6c1
7
+ data.tar.gz: 1b422eb9dfb8d1e94860c6fddd1547b7eed0f91f0bb17c677ca40fcdeec94eac1fb6758493379691e4045490db512b9cc1dbf031b092b6c7caa194b3ec6607b7
data/_data/.DS_Store CHANGED
Binary file
@@ -100,15 +100,19 @@
100
100
  "infographics": [
101
101
  {
102
102
  "image": "/uploads/8_5_2024_1722847835453_template.webp",
103
- "description": "How to set alarm on wake me up at 4:45 am tool"
103
+ "description": "How to set alarm on wake me up at 4:45 am tool",
104
+ "alt": "infographics 1"
105
+
104
106
  },
105
107
  {
106
108
  "image": "/uploads/info.png",
107
- "description": "How to set alarm on wake me up at 4:45 am tool"
109
+ "description": "How to set alarm on wake me up at 4:45 am tool",
110
+ "alt": "infographics 2"
108
111
  },
109
112
  {
110
113
  "image": "/uploads/8_5_2024_1722848984955_template.webp",
111
- "description": "Additional features of wake me up at 4:45 am tool"
114
+ "description": "Additional features of wake me up at 4:45 am tool",
115
+ "alt": "infographics 3"
112
116
  }
113
117
  ],
114
118
  "posts": [
data/_includes/.DS_Store CHANGED
Binary file
@@ -1,6 +1,63 @@
1
1
  <style>
2
+
3
+ .modal-arrow-btn {
4
+ position: absolute;
5
+ top: 50%;
6
+ width: 50px;
7
+ height: 50px;
8
+ background: rgba(0, 0, 0, 0.5);
9
+ color: #fff;
10
+ border: none;
11
+ cursor: pointer;
12
+ font-size: 24px;
13
+ text-align: center;
14
+ line-height: 50px;
15
+ border-radius: 50%;
16
+ transform: translateY(-50%);
17
+ }
18
+
19
+ .modal-arrow-btn.prev {
20
+ left: 10px;
21
+ }
22
+
23
+ .modal-arrow-btn.next {
24
+ right: 10px;
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
+ }
42
+ }
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
+ }
59
+ }
2
60
  .modal1 {
3
- display: none;
4
61
  position: fixed;
5
62
  z-index: 1000;
6
63
  left: 0;
@@ -9,120 +66,153 @@
9
66
  height: 100%;
10
67
  overflow: auto;
11
68
  background-color: rgba(59, 58, 58, 0.9);
69
+ opacity: 0;
70
+ visibility: hidden;
71
+ transform: scale(0.8);
72
+ transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
73
+ }
74
+
75
+ .modal1.show {
76
+ opacity: 1;
77
+ visibility: visible;
78
+ transform: scale(1);
79
+ transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
12
80
  }
81
+
13
82
  .modal1-content1 {
14
83
  margin: auto;
15
84
  display: block;
16
85
  width: 80%;
17
86
  max-width: 800px;
18
87
  margin-top: 20px;
88
+ opacity: 0;
89
+ transform: translateY(-20px);
90
+ transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
19
91
  }
20
- .modal1-body img {
21
- width: 100%;
22
- height: auto;
23
- }
24
- .close1 {
25
- position: absolute;
26
- top: 10px;
27
- right: 10px;
28
- font-size: 24px;
29
- color: #fff;
30
- cursor: pointer;
31
- }
32
- .close1:hover {
33
- color: #ccc;
92
+
93
+ .modal1.show .modal1-content1 {
94
+ opacity: 1;
95
+ transform: translateY(0);
34
96
  }
35
- </style>
36
- <div class="inforgraphics_section">
37
- <h3 class="text-center w-100 mb-5"><b>Other useful information</b></h3>
38
- <div class="wrapper">
39
- <img
40
- class="infographics-arrow"
41
- id="left"
42
- src="/assets/images/arrow-left.svg"
43
- alt=""
44
- />
45
- <div class="carousel">
46
- <div class="carousel-inner">
47
- {%- if pageData.infographics -%} {% for item in pageData.infographics %}
48
- <div class="slide">
49
- <img
50
- loading="lazy"
51
- src="{{ item.image }}"
52
- alt="img"
53
- draggable="false"
54
- class="infographic-img"
55
- onclick="openModal1('{{ item.image }}')"
56
- />
57
- <p class="infographic-desc">{{ item.description | capitalize }}</p>
97
+ .modal1-body img {
98
+ width: 100%;
99
+ height: auto;
100
+ }
101
+ .close1 {
102
+ position: absolute;
103
+ top: 10px;
104
+ right: 10px;
105
+ font-size: 24px;
106
+ color: #fff;
107
+ cursor: pointer;
108
+ }
109
+ .close1:hover {
110
+ color: #ccc;
111
+ }
112
+ </style>
113
+ <div class="inforgraphics_section">
114
+ <h3 class="text-center w-100 mb-5"><b>Other useful information</b></h3>
115
+ <div class="wrapper">
116
+ <i id="left" class="fas fa-angle-left"></i>
117
+ <div class="carousel">
118
+ <div class="carousel-inner">
119
+ {%- if pageData.infographics -%} {% for item in pageData.infographics %}
120
+ <div class="slide">
121
+ <img
122
+ loading="lazy"
123
+ src="{{ item.image }}"
124
+ alt="{{item.alt}}"
125
+ draggable="false"
126
+ class="infographic-img"
127
+ onclick="openModal1('{{ item.image }}')"
128
+ />
129
+ <p class="infographic-desc">{{ item.description | capitalize }}</p>
130
+ </div>
131
+ {% endfor %} {%- endif -%}
58
132
  </div>
59
- {% endfor %} {%- endif -%}
60
133
  </div>
134
+ <i id="right" class="fas fa-angle-right"></i>
61
135
  </div>
62
- <img
63
- class="infographics-arrow"
64
- id="right"
65
- src="/assets/images/arrow-right.svg"
66
- alt=""
67
- />
68
136
  </div>
69
- </div>
70
- <div id="imageModal1" class="modal1" onclick="closeModal1()">
71
- <span class="close1" onclick="closeModal1()">&times;</span>
72
- <div class="modal1-content1">
73
- <div class="modal1-body">
74
- <img id="modal1Image" src="" alt="Image" />
137
+ <div id="imageModal1" class="modal1" onclick="closeModal1()">
138
+ <span class="close1" onclick="closeModal1()">&times;</span>
139
+ <button class="modal-arrow-btn prev">&#10094;</button>
140
+ <button class="modal-arrow-btn next">&#10095;</button>
141
+ <div class="modal1-content1">
142
+ <div class="modal1-body">
143
+ <img id="modal1Image" src="" alt="Image" />
144
+ </div>
75
145
  </div>
76
146
  </div>
77
- </div>
78
- <script>
79
- function openModal1(imageSrc) {
80
- var modal1 = document.getElementById("imageModal1");
81
- var modal1Img = document.getElementById("modal1Image");
82
- modal1.style.display = "block";
83
- modal1Img.src = imageSrc;
84
- }
85
- function closeModal1() {
86
- var modal1 = document.getElementById("imageModal1");
87
- modal1.style.display = "none";
88
- }
89
- document.addEventListener("click", function (event) {
90
- var modal1 = document.getElementById("imageModal1");
91
- if (event.target === modal1) {
92
- closeModal1();
147
+ <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
+ }
93
158
  }
94
- });
95
- const carousel = document.querySelector(".carousel-inner"),
96
- firstImg = carousel.querySelectorAll("img")[0],
97
- arrowIcons = document.querySelectorAll(".infographics-arrow");
98
- const numImages = carousel.querySelectorAll("img").length;
99
- const isMobile = window.matchMedia("(max-width: 767px)").matches; // Check if screen width is less than or equal to 767px
100
- if (numImages > 3) {
101
- arrowIcons[1].style.display = "block";
102
- } else {
103
- arrowIcons[0].style.display = "none";
104
- arrowIcons[1].style.display = "none";
105
- }
106
- let isDragStart = false,
107
- isDragging = false,
108
- prevPageX,
109
- prevScrollLeft,
110
- positionDiff;
111
- const showHideIcons = () => {
112
- let scrollWidth = carousel.scrollWidth - carousel.clientWidth; // getting max scrollable width
113
- arrowIcons[0].style.display = carousel.scrollLeft == 0 ? "none" : "block";
114
- arrowIcons[1].style.display =
115
- carousel.scrollLeft == scrollWidth ? "none" : "block";
116
- };
117
- arrowIcons.forEach((icon) => {
118
- icon.addEventListener("click", () => {
119
- let firstImgWidth = firstImg.clientWidth + 40;
120
- const scrollAmount = icon.id === "left" ? -firstImgWidth : firstImgWidth;
121
- carousel.scrollBy({
122
- left: scrollAmount,
123
- behavior: "smooth",
159
+
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
+ }
164
+
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();
172
+ }
173
+
174
+ // Function to close the modal
175
+ function closeModal1() {
176
+ const modal1 = document.getElementById("imageModal1");
177
+ modal1.classList.remove("show");
178
+ }
179
+
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
+ });
186
+
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();
124
198
  });
125
- setTimeout(() => showHideIcons(), 60); // calling showHideIcons after 60ms
126
199
  });
200
+
201
+ // Event listener for the close button
202
+ document.querySelectorAll(".close1").forEach(element => {
203
+ element.addEventListener("click", closeModal1);
204
+ });
205
+
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
+ }
211
+ });
212
+
213
+ // Initialize modal images on page load
214
+ readyallimages();
127
215
  });
128
- </script>
216
+
217
+ </script>
218
+
@@ -5,11 +5,7 @@ layout: appscms-feature
5
5
  <div class="container-fluid mt-4">
6
6
  {%- assign boxColor =
7
7
  site.data[page.folderName][page.lang][page.fileName].color -%}
8
- <div
9
- class="custom-box"
10
- style=" padding-top: 0px"
11
- data-color="{{boxColor}}"
12
- >
8
+ <div class="custom-box" style="padding-top: 0px" data-color="{{boxColor}}">
13
9
  <div style="display: none" id="file-loader">
14
10
  <img
15
11
  src="/assets/images/spinner.gif"
@@ -44,7 +40,6 @@ layout: appscms-feature
44
40
  />
45
41
  <span class="ml-1">CHOOSE FILES</span>
46
42
  </div>
47
-
48
43
  </div>
49
44
  <p id="dropfile" class="text-dark">or drop your image here</p>
50
45
  </div>
@@ -2,85 +2,104 @@
2
2
  layout: appscms-feature
3
3
  ---
4
4
 
5
+ <style>
6
+ .calculator-workspace {
7
+ outline: none;
8
+ overflow: auto;
9
+ border-top-right-radius: 20px;
10
+ border-top-left-radius: 20px;
11
+ border-bottom-right-radius: 16px;
12
+ border-bottom-left-radius: 16px;
13
+ box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.16);
14
+ position: relative;
15
+ }
16
+ .calculator-container {
17
+ background-color: #d9dcf7;
18
+ padding: 20px 12px;
19
+ border-radius: 7px;
20
+ }
21
+ </style>
5
22
  {% assign file = page.fileName %} {% assign lang = page.lang %} {% assign folder
6
23
  = page.folderName %} {% assign calculatorData=
7
24
  site.data[folder][lang][file].calculatorData %}
8
25
 
9
26
  <div class="container">
10
27
  <div class="calculator-workspace">
11
- <div class="row w-100 mx-auto">
12
- <form id="calculator-form" class="w-100">
13
- {%- for item in calculatorData.calculatorRow -%}
14
- <div class="row" id="calculator-row-{{forloop.index}}">
15
- {%- if item.labelName -%}
16
- <div class="col-md-12">
17
- <div class="d-flex">
18
- <label for="{{item.labelId}}">{{item.labelName}}</label>
19
- {%- if item.toolTip -%}
20
- <span
21
- class="calculator-tooltip"
22
- data-toggle="tooltip"
23
- data-placement="top"
24
- title="{{item.toolTip}}"
25
- ><i class="fas fa-info-circle"></i></span
26
- >{%- endif -%}
28
+ <div class="calculator-container">
29
+ <div class="row w-100 mx-auto">
30
+ <form id="calculator-form" class="w-100">
31
+ {%- for item in calculatorData.calculatorRow -%}
32
+ <div class="row" id="calculator-row-{{forloop.index}}">
33
+ {%- if item.labelName -%}
34
+ <div class="col-md-12">
35
+ <div class="d-flex">
36
+ <label for="{{item.labelId}}">{{item.labelName}}</label>
37
+ {%- if item.toolTip -%}
38
+ <span
39
+ class="calculator-tooltip"
40
+ data-toggle="tooltip"
41
+ data-placement="top"
42
+ title="{{item.toolTip}}"
43
+ ><i class="fas fa-info-circle"></i></span
44
+ >{%- endif -%}
45
+ </div>
27
46
  </div>
28
- </div>
29
- {%- endif -%} {%- if item.dropDown or item.inputBox or
30
- item.dateTimePicker -%}
31
- <div class="col-md-12">
32
- <div class="d-flex calculator-inputs">
33
- {%- if item.inputBox -%} {%- assign inputBoxType = "number" -%}
34
- {%- if item.inputType -%} {%- assign inputBoxType = item.inputType
35
- -%} {%- endif -%}
36
- <input
37
- class="form-control"
38
- type="{{inputBoxType}}"
39
- name="{{item.inputName}}"
40
- id="{{item.inputId}}"
41
- />
42
- {%- endif -%} {%- if item.dropDown -%}
43
- <select
44
- class="form-control"
45
- name="{{item.dropDownName}}"
46
- id="{{item.dropDownId}}"
47
- ></select>
48
- {%- endif -%} {%- if item.dateTimePicker -%}
49
- <input
50
- class="form-control"
51
- type="date"
52
- name="{{item.dateTimePicker}}"
53
- id="{{item.dateTimePickerId}}"
54
- />
55
- {%- endif -%} {%- if item.unit -%}
56
- <div class="unit">{{item.unit}}</div>
57
- {%- endif -%}
47
+ {%- endif -%} {%- if item.dropDown or item.inputBox or
48
+ item.dateTimePicker -%}
49
+ <div class="col-md-12">
50
+ <div class="d-flex calculator-inputs">
51
+ {%- if item.inputBox -%} {%- assign inputBoxType = "number" -%}
52
+ {%- if item.inputType -%} {%- assign inputBoxType =
53
+ item.inputType -%} {%- endif -%}
54
+ <input
55
+ class="form-control"
56
+ type="{{inputBoxType}}"
57
+ name="{{item.inputName}}"
58
+ id="{{item.inputId}}"
59
+ />
60
+ {%- endif -%} {%- if item.dropDown -%}
61
+ <select
62
+ class="form-control"
63
+ name="{{item.dropDownName}}"
64
+ id="{{item.dropDownId}}"
65
+ ></select>
66
+ {%- endif -%} {%- if item.dateTimePicker -%}
67
+ <input
68
+ class="form-control"
69
+ type="date"
70
+ name="{{item.dateTimePicker}}"
71
+ id="{{item.dateTimePickerId}}"
72
+ />
73
+ {%- endif -%} {%- if item.unit -%}
74
+ <div class="unit">{{item.unit}}</div>
75
+ {%- endif -%}
76
+ </div>
58
77
  </div>
78
+ {%- endif -%}
79
+ </div>
80
+ {%- endfor -%}
81
+ <div id="dynamic-section"></div>
82
+ </form>
83
+ </div>
84
+ <div class="row w-100 mx-auto">
85
+ {%- if calculatorData.ButtonValue -%}
86
+ <div class="col-12 mt-4 px-0">
87
+ <div class="d-flex justify-content-end">
88
+ <button
89
+ class="submit-button"
90
+ type="{{calculatorData.ButtonType}}"
91
+ id="{{calculatorData.ButtonId}}"
92
+ >
93
+ {{calculatorData.ButtonValue}}
94
+ </button>
59
95
  </div>
60
- {%- endif -%}
61
96
  </div>
62
- {%- endfor -%}
63
- <div id="dynamic-section"></div>
64
- </form>
65
- </div>
66
- <div class="row w-100 mx-auto">
67
- {%- if calculatorData.ButtonValue -%}
68
- <div class="col-12 mt-4 px-0">
69
- <div class="d-flex justify-content-end">
70
- <button
71
- class="submit-button"
72
- type="{{calculatorData.ButtonType}}"
73
- id="{{calculatorData.ButtonId}}"
74
- >
75
- {{calculatorData.ButtonValue}}
76
- </button>
97
+ {%- endif -%} {%- if calculatorData.resultDiv -%}
98
+ <div class="col-12 mt-3">
99
+ <div class="result-section" id="result-section"></div>
77
100
  </div>
101
+ {%- endif -%}
78
102
  </div>
79
- {%- endif -%} {%- if calculatorData.resultDiv -%}
80
- <div class="col-12 mt-3">
81
- <div class="result-section" id="result-section"></div>
82
- </div>
83
- {%- endif -%}
84
103
  </div>
85
104
  </div>
86
105
  {%- if calculatorData.calculatorWarning-%}
data/assets/.DS_Store CHANGED
Binary file