appscms-tools-theme 4.7.0 → 4.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_data/home/en/en.json +79 -57
- data/_includes/alternates/alternates.html +134 -47
- data/_includes/appscms/category-tabs/category-tabs.html +111 -10
- data/_includes/appscms/head/head.html +18 -2
- data/_includes/appscms/home/feature-boxes.html +11 -4
- data/_includes/appscms/navbars/navbar.html +24 -20
- data/_includes/appscms/navbars/toolbar.html +18 -8
- data/_layouts/appscms-home.html +9 -14
- data/_layouts/home.html +336 -243
- data/assets/css/appscms-theme.css +3 -3
- data/assets/images/menu.svg +1 -0
- data/assets/js/appscms-theme.js +91 -65
- metadata +3 -3
- data/_includes/appscms/navbars/new-toolbar.html +0 -160
data/_layouts/home.html
CHANGED
@@ -2,281 +2,374 @@
|
|
2
2
|
= page.folderName %} {% assign homeData= site.data[folder][lang][file] %}
|
3
3
|
<!DOCTYPE html>
|
4
4
|
<html lang="{{page.lang}}">
|
5
|
-
{% include head/index.html %}
|
5
|
+
{% include head/index.html %}
|
6
6
|
|
7
|
-
<body>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
<body>
|
8
|
+
{% include header/index.html %} {%- if homeData.nofileupload -%}
|
9
|
+
<div
|
10
|
+
id="safeui-alert"
|
11
|
+
class="alert alert-{{homeData.variant | default: 'info'}} fade show text-center"
|
12
|
+
role="alert"
|
13
|
+
>
|
14
|
+
<div class="container">
|
15
|
+
{%- if homeData.alertmsg -%} {{homeData.alertmsg}} {%- else -%} We do
|
16
|
+
not upload any files to server, hence your data is 100% secure. {%-
|
17
|
+
endif -%}
|
18
|
+
</div>
|
14
19
|
</div>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
{%- endif -%} {%- if homeData.h1 or homeData.h2 -%}
|
21
|
+
<div class="flex-container mb-1">
|
22
|
+
<div class="flex-class py-5">
|
23
|
+
<div class="d-flex justify-content-center align-items-center">
|
24
|
+
<span class="fHhdVc">
|
25
|
+
<div class="div-cont feature-img mr-2">
|
26
|
+
{%- if homeData.img -%}
|
27
|
+
<img
|
28
|
+
loading="lazy"
|
29
|
+
style="width:{{homeData.imgwidth}};height:{{homeData.imgheight}};"
|
30
|
+
src="{{homeData.img}}"
|
31
|
+
alt="{{homeData.imgalt}}"
|
32
|
+
{%-
|
33
|
+
if
|
34
|
+
site.crossorigin
|
35
|
+
-%}
|
36
|
+
crossorigin
|
37
|
+
{%-
|
38
|
+
endif
|
39
|
+
-%}
|
40
|
+
/>
|
41
|
+
{%- endif -%}
|
42
|
+
</div>
|
43
|
+
</span>
|
44
|
+
<h1 class="home-top-h1">
|
45
|
+
{%- for word in homeData.h1 -%} {%- if forloop.first == true -%}
|
46
|
+
{{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%-
|
47
|
+
endfor -%}
|
48
|
+
</h1>
|
49
|
+
</div>
|
50
|
+
<h2 class="home-top-h2">
|
51
|
+
{%- for word in homeData.h2 -%} {%- if forloop.first == true -%}
|
52
|
+
{{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor
|
53
|
+
-%}
|
54
|
+
</h2>
|
33
55
|
</div>
|
34
|
-
<h2 class="home-top-h2">
|
35
|
-
{%- for word in homeData.h2 -%} {%- if forloop.first == true -%}
|
36
|
-
{{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor
|
37
|
-
-%}
|
38
|
-
</h2>
|
39
56
|
</div>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
57
|
+
{%- endif -%} {%- if homeData.features -%} {%- if site.monumetricId and
|
58
|
+
page.url != '/' and page.lang == "en" -%}
|
59
|
+
<div class="container">
|
60
|
+
<div class="row">
|
61
|
+
<div class="col-md-9 mx-auto">
|
62
|
+
{%- endif -%}
|
63
|
+
<div class="flex-container">
|
64
|
+
<div class="flex-class">
|
65
|
+
<ul class="home-features">
|
66
|
+
{% for product in homeData.features %}
|
67
|
+
<li
|
68
|
+
style="background:{{product.color}}"
|
69
|
+
class="home-feature-box"
|
70
|
+
>
|
71
|
+
<div class="home-inner-box">
|
72
|
+
<div
|
73
|
+
class="div-cont feature-img"
|
74
|
+
height="36px"
|
75
|
+
width="36px"
|
76
|
+
>
|
77
|
+
<img
|
78
|
+
loading="lazy"
|
79
|
+
src="{{product.icon}}"
|
80
|
+
height="36px"
|
81
|
+
width="36px"
|
82
|
+
alt="star icon"
|
83
|
+
{%-
|
84
|
+
if
|
85
|
+
site.crossorigin
|
86
|
+
-%}
|
87
|
+
crossorigin
|
88
|
+
{%-
|
89
|
+
endif
|
90
|
+
-%}
|
91
|
+
/>
|
92
|
+
</div>
|
56
93
|
</div>
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
94
|
+
<div class="home-feature-desc">{{product.description}}</div>
|
95
|
+
<a class="home-feature-name" href="{{product.url}}"
|
96
|
+
>{{product.name}}</a
|
97
|
+
>
|
98
|
+
</li>
|
99
|
+
{% endfor %}
|
100
|
+
</ul>
|
101
|
+
</div>
|
63
102
|
</div>
|
103
|
+
{%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
|
64
104
|
</div>
|
65
|
-
{%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
|
66
105
|
</div>
|
67
106
|
</div>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
107
|
+
{%- endif -%} {%- endif -%}
|
108
|
+
<div class="home-content-box" id="theme-content-box">{{content}}</div>
|
109
|
+
{%- if homeData.TEXTUAL_CONTENT -%}
|
110
|
+
<div class="container mt-4 mb-4">
|
111
|
+
<div class="row px-0">
|
112
|
+
{%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
|
113
|
+
<div class="col-md-9 mx-auto">
|
114
|
+
<div class="row">
|
115
|
+
{%- endif -%} {% assign totalHeaderCount = 0 %} {% for data in
|
116
|
+
homeData.TEXTUAL_CONTENT %} {% assign words = data.header | split: "
|
117
|
+
" %} {% assign word_count = words | size %} {% assign
|
118
|
+
totalHeaderCount = totalHeaderCount | plus: word_count %} {% endfor
|
119
|
+
%} {% for data in homeData.TEXTUAL_CONTENT %}
|
120
|
+
<div
|
121
|
+
class="{%- if site.monumetricId and page.url != '/' and page.lang == 'en' -%} col-md-6 my-4 {%- else -%} col-md-4 my-4 {%- endif -%}"
|
122
|
+
>
|
123
|
+
<div>
|
124
|
+
<img
|
125
|
+
class="feature-card-img"
|
126
|
+
height="48px"
|
127
|
+
width="48px"
|
128
|
+
loading="lazy"
|
129
|
+
src="{{data.logoUrl}}"
|
130
|
+
alt="{{data.header}}"
|
131
|
+
{%-
|
132
|
+
if
|
133
|
+
site.crossorigin
|
134
|
+
-%}
|
135
|
+
crossorigin
|
136
|
+
{%-
|
137
|
+
endif
|
138
|
+
-%}
|
139
|
+
/>
|
87
140
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
141
|
+
{%- if totalHeaderCount > site.count_of_words_in_headings -%}
|
142
|
+
<h2 class="feature-card-title">
|
143
|
+
{{data.header | replace: "$variable", page.value}}
|
144
|
+
</h2>
|
145
|
+
{%- else -%}
|
146
|
+
<div class="feature-card-title">
|
147
|
+
{{data.header | replace: "$variable", page.value}}
|
148
|
+
</div>
|
149
|
+
{%- endif -%}
|
150
|
+
<div class="feature-card-desc">
|
151
|
+
{{data.content | replace: "$variable", page.value}}
|
152
|
+
</div>
|
99
153
|
</div>
|
100
154
|
</div>
|
155
|
+
{% endfor %} {%- if site.monumetricId and page.url != '/' and
|
156
|
+
page.lang == "en" -%}
|
101
157
|
</div>
|
102
|
-
{% endfor %} {%- if site.monumetricId and page.url != '/' and
|
103
|
-
page.lang == "en" -%}
|
104
158
|
</div>
|
159
|
+
{%- endif -%}
|
105
160
|
</div>
|
106
|
-
{%- endif -%}
|
107
161
|
</div>
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
162
|
+
{%- endif -%} {%- if homeData.HOW_TO_CONTENT -%}
|
163
|
+
<section class="how-to-section">
|
164
|
+
<div class="container">
|
165
|
+
<div class="row">
|
166
|
+
{%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
|
167
|
+
<div class="col-md-9 mx-auto">
|
168
|
+
<div class="row">
|
169
|
+
{%- endif -%}
|
170
|
+
<div class="col-md-6 order-0">
|
171
|
+
{%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
|
172
|
+
<div class="how-to-video-wrapper">
|
173
|
+
{% assign video_url = homeData.HOW_TO_CONTENT.YoutubeVideoUrl
|
174
|
+
%} {% assign video_id = "" %} {% if video_url contains
|
175
|
+
"youtu.be/" %} {% assign parts = video_url | split: "/" %} {%
|
176
|
+
assign video_id = parts[3] %} {% elsif video_url contains
|
177
|
+
"youtube.com/watch" %} {% assign params = video_url | split:
|
178
|
+
"?" | last | split: "&" %} {% for param in params %} {% if
|
179
|
+
param contains "v=" %} {% assign video_id = param | split: "="
|
180
|
+
| last %} {% endif %} {% endfor %} {% endif %} {%- if
|
181
|
+
site.monumetricId -%}
|
182
|
+
<div
|
183
|
+
class="how-to-video h-100 w-100"
|
184
|
+
data-videoid="{{video_id}}"
|
185
|
+
>
|
186
|
+
<img
|
187
|
+
class="youtubeVideoPlayer"
|
188
|
+
width="100%"
|
189
|
+
height="100%"
|
190
|
+
id="thumbnail-img"
|
191
|
+
alt="thumbnail-img"
|
192
|
+
/>
|
193
|
+
<div class="youtube-play-btn-wrapper">
|
194
|
+
<button
|
195
|
+
class="play-btn btn btn-primary"
|
196
|
+
onClick="loadVideo()"
|
197
|
+
>
|
198
|
+
►
|
199
|
+
</button>
|
200
|
+
</div>
|
201
|
+
</div>
|
202
|
+
{%- else -%}
|
203
|
+
<div
|
204
|
+
class="how-to-video h-100 w-100"
|
205
|
+
data-videoid="{{video_id}}"
|
206
|
+
>
|
207
|
+
<img
|
208
|
+
class="youtubeVideoPlayer"
|
209
|
+
width="100%"
|
210
|
+
height="100%"
|
211
|
+
id="thumbnail-img"
|
212
|
+
alt="thumbnail-img"
|
213
|
+
/>
|
214
|
+
<div class="youtube-play-btn-wrapper">
|
215
|
+
<button
|
216
|
+
class="play-btn btn btn-primary"
|
217
|
+
onClick="loadVideo()"
|
218
|
+
>
|
219
|
+
►
|
220
|
+
</button>
|
221
|
+
</div>
|
139
222
|
</div>
|
223
|
+
{%- endif -%}
|
140
224
|
</div>
|
141
225
|
{%- else -%}
|
142
|
-
<div class="how-to-
|
143
|
-
<img
|
144
|
-
|
145
|
-
|
146
|
-
|
226
|
+
<div class="how-to-img-wrapper">
|
227
|
+
<img
|
228
|
+
class="how-to-leftimg"
|
229
|
+
height="180px"
|
230
|
+
width="300px"
|
231
|
+
src="{{homeData.HOW_TO_CONTENT.logoImageUrl}}"
|
232
|
+
loading="lazy"
|
233
|
+
alt="{{homeData.HOW_TO_CONTENT.logoImageAlt | default: 'how to image' }}"
|
234
|
+
{%-
|
235
|
+
if
|
236
|
+
site.crossorigin
|
237
|
+
-%}
|
238
|
+
crossorigin
|
239
|
+
{%-
|
240
|
+
endif
|
241
|
+
-%}
|
242
|
+
/>
|
147
243
|
</div>
|
148
244
|
{%- endif -%}
|
149
245
|
</div>
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
<div class="col-md-6 order-1">
|
159
|
-
<div class="how-to-right">
|
160
|
-
<h3 class="how-to-title text-left">
|
161
|
-
{{homeData.HOW_TO_CONTENT.heading | replace: "$variable",
|
162
|
-
page.value}}
|
163
|
-
</h3>
|
164
|
-
<ol class="how-to-list">
|
165
|
-
{% for data in homeData.HOW_TO_CONTENT.steps %}
|
246
|
+
<div class="col-md-6 order-1">
|
247
|
+
<div class="how-to-right">
|
248
|
+
<h3 class="how-to-title text-left">
|
249
|
+
{{homeData.HOW_TO_CONTENT.heading | replace: "$variable",
|
250
|
+
page.value}}
|
251
|
+
</h3>
|
252
|
+
<ol class="how-to-list">
|
253
|
+
{% for data in homeData.HOW_TO_CONTENT.steps %}
|
166
254
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
255
|
+
<li id="step{{forloop.index}}" class="how-to-list-item">
|
256
|
+
<span>{{forloop.index}}.</span>{{data | replace:
|
257
|
+
"$variable", page.value}}
|
258
|
+
</li>
|
259
|
+
{% endfor %}
|
260
|
+
</ol>
|
261
|
+
</div>
|
173
262
|
</div>
|
263
|
+
{%- if site.monumetricId and page.url != '/' and page.lang == 'en'
|
264
|
+
-%}
|
174
265
|
</div>
|
175
|
-
{%- if site.monumetricId and page.url != '/' and page.lang == 'en'
|
176
|
-
-%}
|
177
266
|
</div>
|
267
|
+
{%- endif -%}
|
178
268
|
</div>
|
179
|
-
{%- endif -%}
|
180
269
|
</div>
|
181
|
-
</
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
270
|
+
</section>
|
271
|
+
{%- endif -%} {%- assign showFaqs = true -%} {%- for item in site.noFaqsList
|
272
|
+
-%} {%- if item == page.lang -%} {%- assign showFaqs = false -%} {%- break
|
273
|
+
-%} {%- else -%} {%- assign showFaqs = true -%} {%- endif -%} {%- endfor -%}
|
274
|
+
{%- if showFaqs == true -%} {%- if homeData.FAQ -%}
|
275
|
+
<section class="faq-section">
|
276
|
+
<div class="container">
|
277
|
+
<div class="row">
|
278
|
+
<div class="col-md-8 mx-auto">
|
279
|
+
<div class="faq">
|
280
|
+
{%- if homeData.FAQ.size>0 -%}
|
281
|
+
<h3 class="feature-h1 text-center mb-4">
|
282
|
+
{{homeData.faqheading | default: 'Frequently Asked Questions'}}
|
283
|
+
</h3>
|
284
|
+
{%- endif -%}
|
285
|
+
<ul class="list-unstyled">
|
286
|
+
{% for data in homeData.FAQ %}
|
287
|
+
<li>
|
288
|
+
<h3 class="faq-question" itemprop="name">
|
289
|
+
{{data.question | replace: "$variable", page.value}}<em
|
290
|
+
style="transform: rotate(-135deg)"
|
291
|
+
>
|
292
|
+
<i></i
|
293
|
+
></em>
|
294
|
+
</h3>
|
295
|
+
<div style="display: block">
|
296
|
+
<p class="faq-answer" itemprop="text">
|
297
|
+
{{data.answer | replace: "$variable", page.value}}
|
298
|
+
</p>
|
299
|
+
</div>
|
300
|
+
</li>
|
301
|
+
{% endfor %}
|
302
|
+
</ul>
|
303
|
+
</div>
|
212
304
|
</div>
|
213
305
|
</div>
|
214
306
|
</div>
|
307
|
+
</section>
|
308
|
+
{%- endif -%} {%- endif -%} {%- include share/socialshare.html -%} {%-
|
309
|
+
include Rating/rating.html -%} {%- if homeData.infographics.size > 0 -%} {%-
|
310
|
+
include /appscms/infographics/infographics.html -%} {%- endif -%} {%- if
|
311
|
+
homeData.USPS -%} {%- include /Usp/usp.html -%} {%- endif -%} {%- if
|
312
|
+
homeData.display_formats -%}
|
313
|
+
<div class="container file-detail-table">
|
314
|
+
{%- include fileformat/fileformatdetail.html -%}
|
215
315
|
</div>
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
{%-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
{%-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
page.tags -%} {%- endif -%} {%- if homeData.posts.size > 0 -%} {%- include
|
239
|
-
customblog/pageRelatedPosts.html -%} {%- else -%} {%- if categories.size > 0
|
240
|
-
or tags.size > 0 -%} {%- include section/related_categories_post.html -%}
|
241
|
-
{%- else -%} {%- include section/recent_posts.html -%} {%- endif -%} {%-
|
242
|
-
endif -%} {%- if site.customblogdata -%} {%- if categories.size > 0 or
|
243
|
-
tags.size > 0 -%} {%- include customblog/relatedposts.html -%} {%- else -%}
|
244
|
-
{%- include customblog/recentposts.html -%} {%- endif -%} {%- endif -%} {%-
|
245
|
-
if homeData.author.size > 0 -%} {%- include
|
246
|
-
featurePageAuthors/featurePageAuthors.html -%} {%- endif -%} {%- include
|
247
|
-
footer/index.html -%} {%- if site.customCode -%} {%- include customCode.html
|
248
|
-
-%} {%- endif -%} {%- include script.html -%}
|
249
|
-
</body>
|
316
|
+
{%- endif -%} {%- if homeData.compare_formats -%}
|
317
|
+
<div class="container compare-table">
|
318
|
+
{%- include fileformat/comparisonfiles.html -%}
|
319
|
+
</div>
|
320
|
+
{%- endif -%} {%- assign langen = "en" -%} {%- if
|
321
|
+
site.data[folder][langen][file].categories -%} {%- assign categories =
|
322
|
+
site.data[folder][langen][file].categories -%} {%- else -%} {%- assign
|
323
|
+
categories = page.categories -%} {%- endif -%} {%- if
|
324
|
+
site.data[folder][langen][file].tags -%} {%- assign tags =
|
325
|
+
site.data[folder][langen][file].tags -%} {%- else -%} {%- assign tags =
|
326
|
+
page.tags -%} {%- endif -%} {%- if homeData.posts.size > 0 -%} {%- include
|
327
|
+
customblog/pageRelatedPosts.html -%} {%- else -%} {%- if categories.size > 0
|
328
|
+
or tags.size > 0 -%} {%- include section/related_categories_post.html -%}
|
329
|
+
{%- else -%} {%- include section/recent_posts.html -%} {%- endif -%} {%-
|
330
|
+
endif -%} {%- if site.customblogdata -%} {%- if categories.size > 0 or
|
331
|
+
tags.size > 0 -%} {%- include customblog/relatedposts.html -%} {%- else -%}
|
332
|
+
{%- include customblog/recentposts.html -%} {%- endif -%} {%- endif -%} {%-
|
333
|
+
if homeData.author.size > 0 -%} {%- include
|
334
|
+
featurePageAuthors/featurePageAuthors.html -%} {%- endif -%} {%- include
|
335
|
+
footer/index.html -%} {%- if site.customCode -%} {%- include customCode.html
|
336
|
+
-%} {%- endif -%} {%- include script.html -%}
|
337
|
+
</body>
|
250
338
|
|
251
|
-
{%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
|
252
|
-
<script>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
339
|
+
{%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
|
340
|
+
<script>
|
341
|
+
let videoContainer = document.querySelector(".how-to-video");
|
342
|
+
let thumbnail = document.getElementById("thumbnail-img");
|
343
|
+
let videoId = videoContainer.getAttribute("data-videoid");
|
344
|
+
let thumbnailUrl =
|
345
|
+
"https://img.youtube.com/vi/" + videoId + "/maxresdefault.jpg";
|
346
|
+
console.log(videoId);
|
258
347
|
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
348
|
+
// Function to load video
|
349
|
+
function loadVideo() {
|
350
|
+
videoContainer.innerHTML =
|
351
|
+
'<iframe loading="lazy" class="youtubeVideoPlayer" width="100%" height="100%" src="https://www.youtube.com/embed/' +
|
352
|
+
videoId +
|
353
|
+
'?autoplay=1&mute=1" allowfullscreen></iframe>';
|
354
|
+
}
|
355
|
+
// Function to handle lazy loading of the thumbnail
|
356
|
+
function lazyLoadThumbnail(entries, observer) {
|
357
|
+
entries.forEach((entry) => {
|
358
|
+
if (entry.isIntersecting) {
|
359
|
+
// Load thumbnail when it becomes visible
|
360
|
+
thumbnail.src = thumbnailUrl;
|
361
|
+
// Stop observing once loaded
|
362
|
+
observer.unobserve(entry.target);
|
363
|
+
}
|
364
|
+
});
|
365
|
+
}
|
366
|
+
// Set up the Intersection Observer
|
367
|
+
var observer = new IntersectionObserver(lazyLoadThumbnail, {
|
368
|
+
threshold: 0.1,
|
272
369
|
});
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
</script>
|
280
|
-
{%- endif -%}
|
281
|
-
|
282
|
-
</html>
|
370
|
+
observer.observe(thumbnail);
|
371
|
+
// Optionally, you can add an event listener to trigger video loading on click or other interactions
|
372
|
+
thumbnail.addEventListener("click", loadVideo);
|
373
|
+
</script>
|
374
|
+
{%- endif -%}
|
375
|
+
</html>
|