appscms-tools-theme 4.6.9 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,90 @@
1
1
 
2
+ <style>
3
+ .mobile-search-bar{
4
+ position: relative;
5
+ height: 100px;
6
+ width: 100%;
7
+ display: none;
8
+ }
9
+ .mobile-search-container {
10
+ display: flex;
11
+ border: 1px solid #ccc;
12
+ border-radius: 5px;
13
+ overflow: hidden;
14
+ height: 38px;
15
+ margin:20px 0px 20px 0px;
16
+ background-color: white;
17
+ position: relative;
18
+ }
19
+
20
+ .mobile-search-input {
21
+ flex: 1;
22
+ border: none;
23
+ padding: 12px 16px;
24
+ font-size: 16px;
25
+ outline: none;
26
+ }
27
+
28
+ .mobile-search-input::placeholder {
29
+ color: #888;
30
+ }
31
+
32
+ .mobile-search-button {
33
+ background-color: #000;
34
+ border: none;
35
+ padding: 0 16px;
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ cursor: pointer;
40
+ outline: none;
41
+ }
42
+
43
+ .mobile-search-button svg {
44
+ /* fill: #fff; */
45
+ height: 20px;
46
+ }
47
+
48
+ .mobile-search-button:active {
49
+ background-color: #555;
50
+ }
51
+ .mobile-nav-search{
52
+ position: relative;
53
+ }
54
+ .mobile-result-item{
55
+ padding: 9px 12px;
56
+ }
57
+ .mobile-result-item a{
58
+ color: #222325;
59
+ }
60
+ .mobile-searchbarResults{
61
+ background-color: #fff;
62
+ border: 1px solid #e4e5e7;
63
+ border-radius: 6px;
64
+ -webkit-box-shadow: 0 17px 58px rgba(0, 0, 0, .08);
65
+ box-shadow: 0 17px 58px rgba(0, 0, 0, .08);
66
+ -webkit-box-sizing: border-box;
67
+ box-sizing: border-box;
68
+ color: #74767e;
69
+ cursor: default;
70
+ margin-top: 8px;
71
+ padding: 12px;
72
+ position: fixed;
73
+ margin-top: 42px;
74
+ width: 244px;
75
+ height: 400px;
76
+ overflow-y: scroll;
77
+ z-index: 101;
78
+ display: none;
79
+ }
80
+ </style>
2
81
  {%- if site.newToolBar -%}
3
82
  <div class="appscms-toolbar">
4
83
  <div class="row">
5
84
  <div class="col-11 mx-auto">
85
+
6
86
  <div class="appscms-toolbar-list">
87
+ <button class="scroll-left">&#10094;</button>
7
88
  <div id="close-nav-ham" data-open="1" class="close-nav-ham">
8
89
  <img
9
90
  class="mt-3"
@@ -14,6 +95,22 @@
14
95
  alt="close-button"
15
96
  />
16
97
  </div>
98
+ {%- if site.navigationSearch -%}
99
+ <div class="mobile-search-bar">
100
+
101
+ <div class="mobile-search-container">
102
+ <input type="text" class="mobile-search-input" placeholder="Search Tools">
103
+
104
+ <button class="mobile-search-button">
105
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M16.6725 16.6412L21 21M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </g></svg>
106
+ </button>
107
+
108
+
109
+ <div id="mobile-results" class="mobile-searchbarResults"></div>
110
+ </div>
111
+ </div>
112
+ {%- endif -%}
113
+
17
114
  {%- if Data.megaMenu -%} {%- for item in Data.megaMenu.dropdown -%}
18
115
  <li class="appscms-toolbar-list-item">
19
116
  <span
@@ -44,41 +141,39 @@
44
141
  <div class="col-md-8">
45
142
  <div class="appscms-other-tools">
46
143
  <div class="expand_menu-name-categiry">OTHER TOOLS</div>
47
- {% assign link_count = item.links | size %} {% if link_count >
48
- 0 %} {% assign half = link_count | divided_by: 2 %} {% assign
49
- remainder = link_count | modulo: 2 %}
144
+
145
+ {% assign array_size = item.links | size %}
146
+ {% assign half_size = array_size | divided_by: 2 %}
147
+
148
+ {% assign first_half = item.links | slice: 0, half_size %}
149
+ {% assign second_half = item.links | slice: half_size, array_size %}
150
+
50
151
 
51
152
  <div class="row">
52
153
  <div class="col-md-6">
53
154
  <ul class="mega_menu">
54
- {%- for i in item.links | slice: 0, half -%}
155
+ {%- for i in second_half -%}
55
156
  <li>
56
157
  <a href="{{ i.url }}">{{ i.name }}</a>
57
- <ul class=""></ul>
158
+
58
159
  </li>
59
- {%- endfor -%} {%- if remainder != 0 -%}
60
- <li>
61
- <a href="{{ item.links[half].url }}"
62
- >{{ item.links[half].name }}</a
63
- >
64
- <ul class=""></ul>
65
- </li>
66
- {%- endif -%}
160
+ {%- endfor -%}
67
161
  </ul>
68
162
  </div>
69
163
  <div class="col-md-6">
70
164
  <ul class="mega_menu">
71
- {%- for i in item.links | slice: half | plus: remainder,
72
- link_count - half - remainder -%}
165
+ {%- for i in first_half | slice: 0, half -%}
73
166
  <li>
74
167
  <a href="{{ i.url }}">{{ i.name }}</a>
75
- <ul class=""></ul>
168
+
76
169
  </li>
77
- {%- endfor -%}
170
+ {%- endfor -%}
78
171
  </ul>
79
172
  </div>
173
+
174
+
80
175
  </div>
81
- {% endif %}
176
+
82
177
  </div>
83
178
  </div>
84
179
  </div>
@@ -115,48 +210,39 @@
115
210
  <div class="col-lg-6">
116
211
  <div class="appscms-other-tools">
117
212
  <div class="expand_menu-name-categiry">OTHER TOOLS</div>
118
- {% assign link_count = item.links | size %} {% if link_count >
119
- 0 %} {% assign half = link_count | divided_by: 2 %} {% assign
120
- remainder = link_count | modulo: 2 %}
121
-
122
213
  <div class="row">
123
- <div class="col-lg-6">
214
+ <div class="col-md-6">
124
215
  <ul class="mega_menu">
125
- {%- for i in item.links | slice: 0, half -%}
216
+ {%- for i in second_half -%}
126
217
  <li>
127
218
  <a href="{{ i.url }}">{{ i.name }}</a>
128
- <ul class=""></ul>
219
+
129
220
  </li>
130
- {%- endfor -%} {%- if remainder != 0 -%}
131
- <li>
132
- <a href="{{ item.links[half].url }}"
133
- >{{ item.links[half].name }}</a
134
- >
135
- <ul class=""></ul>
136
- </li>
137
- {%- endif -%}
221
+ {%- endfor -%}
138
222
  </ul>
139
223
  </div>
140
- <div class="col-lg-6">
224
+ <div class="col-md-6">
141
225
  <ul class="mega_menu">
142
- {%- for i in item.links | slice: half | plus: remainder,
143
- link_count - half - remainder -%}
226
+ {%- for i in first_half | slice: 0, half -%}
144
227
  <li>
145
228
  <a href="{{ i.url }}">{{ i.name }}</a>
146
- <ul class=""></ul>
229
+
147
230
  </li>
148
- {%- endfor -%}
231
+ {%- endfor -%}
149
232
  </ul>
150
233
  </div>
234
+
235
+
151
236
  </div>
152
- {% endif %}
153
237
  </div>
154
238
  </div>
155
239
  </div>
156
240
  </div>
157
241
  </li>
158
242
  {%- endfor -%}
243
+ <button class="scroll-right">&#10095;</button>
159
244
  </div>
245
+
160
246
  </div>
161
247
  </div>
162
248
  </div>
@@ -243,3 +329,101 @@
243
329
  {%- endif -%}
244
330
 
245
331
 
332
+
333
+
334
+ <script>
335
+ document.addEventListener("DOMContentLoaded", function () {
336
+ const scrollContainer = document.querySelector(".appscms-toolbar-list");
337
+ const scrollLeft = document.querySelector(".scroll-left");
338
+ const scrollRight = document.querySelector(".scroll-right");
339
+
340
+ function updateScrollButtons() {
341
+ scrollLeft.style.display =
342
+ scrollContainer.scrollLeft > 0 ? "block" : "none";
343
+ scrollRight.style.display =
344
+ scrollContainer.scrollWidth >
345
+ scrollContainer.clientWidth + scrollContainer.scrollLeft
346
+ ? "block"
347
+ : "none";
348
+ }
349
+
350
+ scrollLeft.addEventListener("click", function () {
351
+ scrollContainer.scrollLeft -= 120; // Adjust this value as needed
352
+ updateScrollButtons();
353
+ });
354
+
355
+ scrollRight.addEventListener("click", function () {
356
+ scrollContainer.scrollLeft += 120; // Adjust this value as needed
357
+ updateScrollButtons();
358
+ });
359
+
360
+ scrollContainer.addEventListener("scroll", updateScrollButtons);
361
+
362
+ // Initial check to hide buttons if necessary
363
+ updateScrollButtons();
364
+ });
365
+
366
+ </script>
367
+
368
+ <style>
369
+
370
+
371
+ .scroll-container {
372
+ display: flex;
373
+ align-items: center;
374
+ background-color: #333;
375
+ position: relative;
376
+ }
377
+
378
+ .scroll-left,
379
+ .scroll-right {
380
+ background-color: #4456f6f7;
381
+ color: white;
382
+ border: none;
383
+ height: 40px;
384
+ cursor: pointer;
385
+ position: absolute;
386
+ width: 40px;
387
+ top: 50%;
388
+ z-index: 100;
389
+ transform: translateY(-50%);
390
+ }
391
+
392
+ .scroll-left {
393
+ left: 0;
394
+ }
395
+
396
+ .scroll-right {
397
+ right: 0;
398
+ }
399
+
400
+ .scroll-left:hover,
401
+ .scroll-right:hover {
402
+ background-color:#8691f6f7 ;
403
+ }
404
+
405
+ .navbar {
406
+ overflow-x: auto;
407
+ white-space: nowrap;
408
+ flex-grow: 1;
409
+ scroll-behavior: smooth;
410
+ display: flex;
411
+ }
412
+
413
+ .navbar ul {
414
+ padding: 0;
415
+ margin: 0;
416
+ display: flex;
417
+ list-style-type: none;
418
+ }
419
+
420
+ .navbar li {
421
+ display: inline;
422
+ }
423
+
424
+
425
+
426
+
427
+
428
+
429
+ </style>