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.
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
- {% include header/index.html %} {%- if homeData.nofileupload -%}
9
- <div id="safeui-alert" class="alert alert-{{homeData.variant | default: 'info'}} fade show text-center" role="alert">
10
- <div class="container">
11
- {%- if homeData.alertmsg -%} {{homeData.alertmsg}} {%- else -%} We do
12
- not upload any files to server, hence your data is 100% secure. {%-
13
- endif -%}
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
- </div>
16
- {%- endif -%} {%- if homeData.h1 or homeData.h2 -%}
17
- <div class="flex-container mb-1">
18
- <div class="flex-class py-5">
19
- <div class="d-flex justify-content-center align-items-center">
20
- <span class="fHhdVc">
21
- <div class="div-cont feature-img mr-2">
22
- {%- if homeData.img -%}
23
- <img loading="lazy" style="width:{{homeData.imgwidth}};height:{{homeData.imgheight}};"
24
- src="{{homeData.img}}" alt="{{homeData.imgalt}}" {%- if site.crossorigin -%} crossorigin {%- endif -%} />
25
- {%- endif -%}
26
- </div>
27
- </span>
28
- <h1 class="home-top-h1">
29
- {%- for word in homeData.h1 -%} {%- if forloop.first == true -%}
30
- {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%-
31
- endfor -%}
32
- </h1>
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
- </div>
41
- {%- endif -%} {%- if homeData.features -%} {%- if site.monumetricId and
42
- page.url != '/' and page.lang == "en" -%}
43
- <div class="container">
44
- <div class="row">
45
- <div class="col-md-9 mx-auto">
46
- {%- endif -%}
47
- <div class="flex-container">
48
- <div class="flex-class">
49
- <ul class="home-features">
50
- {% for product in homeData.features %}
51
- <li style="background:{{product.color}}" class="home-feature-box">
52
- <div class="home-inner-box">
53
- <div class="div-cont feature-img" height="36px" width="36px">
54
- <img loading="lazy" src="{{product.icon}}" height="36px" width="36px" alt="star icon" {%- if
55
- site.crossorigin -%} crossorigin {%- endif -%} />
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
- </div>
58
- <div class="home-feature-desc">{{product.description}}</div>
59
- <a class="home-feature-name" href="{{product.url}}">{{product.name}}</a>
60
- </li>
61
- {% endfor %}
62
- </ul>
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
- </div>
69
- {%- endif -%} {%- endif -%}
70
- <div class="home-content-box" id="theme-content-box">{{content}}</div>
71
- {%- if homeData.TEXTUAL_CONTENT -%}
72
- <div class="container mt-4 mb-4">
73
- <div class="row px-0">
74
- {%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
75
- <div class="col-md-9 mx-auto">
76
- <div class="row">
77
- {%- endif -%} {% assign totalHeaderCount = 0 %} {% for data in
78
- homeData.TEXTUAL_CONTENT %} {% assign words = data.header | split: "
79
- " %} {% assign word_count = words | size %} {% assign
80
- totalHeaderCount = totalHeaderCount | plus: word_count %} {% endfor
81
- %} {% for data in homeData.TEXTUAL_CONTENT %}
82
- <div
83
- class="{%- if site.monumetricId and page.url != '/' and page.lang == 'en' -%} col-md-6 my-4 {%- else -%} col-md-4 my-4 {%- endif -%}">
84
- <div>
85
- <img class="feature-card-img" height="48px" width="48px" loading="lazy" src="{{data.logoUrl}}"
86
- alt="{{data.header}}" {%- if site.crossorigin -%} crossorigin {%- endif -%} />
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
- {%- if totalHeaderCount > site.count_of_words_in_headings -%}
89
- <h2 class="feature-card-title">
90
- {{data.header | replace: "$variable", page.value}}
91
- </h2>
92
- {%- else -%}
93
- <div class="feature-card-title">
94
- {{data.header | replace: "$variable", page.value}}
95
- </div>
96
- {%- endif -%}
97
- <div class="feature-card-desc">
98
- {{data.content | replace: "$variable", page.value}}
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
- </div>
109
- {%- endif -%} {%- if homeData.HOW_TO_CONTENT -%}
110
- <section class="how-to-section">
111
- <div class="container">
112
- <div class="row">
113
- {%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
114
- <div class="col-md-9 mx-auto">
115
- <div class="row">
116
- {%- endif -%}
117
- <div class="col-md-6 order-0">
118
- {%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
119
- <div class="how-to-video-wrapper">
120
- {% assign video_url = homeData.HOW_TO_CONTENT.YoutubeVideoUrl %}
121
- {% assign video_id = "" %}
122
- {% if video_url contains "youtu.be/" %}
123
- {% assign parts = video_url | split: "/" %}
124
- {% assign video_id = parts[3] %}
125
- {% elsif video_url contains "youtube.com/watch" %}
126
- {% assign params = video_url | split: "?" | last | split: "&" %}
127
- {% for param in params %}
128
- {% if param contains "v=" %}
129
- {% assign video_id = param | split: "=" | last %}
130
- {% endif %}
131
- {% endfor %}
132
- {% endif %}
133
-
134
- {%- if site.monumetricId -%}
135
- <div class="how-to-video h-100 w-100" data-videoid="{{video_id}}">
136
- <img class="youtubeVideoPlayer" width="100%" height="100%" id="thumbnail-img" alt="thumbnail-img" />
137
- <div class="youtube-play-btn-wrapper">
138
- <button class="play-btn btn btn-primary" onClick="loadVideo()">►</button>
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-video h-100 w-100" data-videoid="{{video_id}}">
143
- <img class="youtubeVideoPlayer" width="100%" height="100%" id="thumbnail-img" alt="thumbnail-img" />
144
- <div class="youtube-play-btn-wrapper">
145
- <button class="play-btn btn btn-primary" onClick="loadVideo()">►</button>
146
- </div>
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
- {%- else -%}
151
- <div class="how-to-img-wrapper">
152
- <img class="how-to-leftimg" height="180px" width="300px" src="{{homeData.HOW_TO_CONTENT.logoImageUrl}}"
153
- loading="lazy" alt="{{homeData.HOW_TO_CONTENT.logoImageAlt | default: 'how to image' }}" {%- if
154
- site.crossorigin -%} crossorigin {%- endif -%} />
155
- </div>
156
- {%- endif -%}
157
- </div>
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
- <li id="step{{forloop.index}}" class="how-to-list-item">
168
- <span>{{forloop.index}}.</span>{{data | replace:
169
- "$variable", page.value}}
170
- </li>
171
- {% endfor %}
172
- </ol>
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
- </div>
182
- </section>
183
- {%- endif -%} {%- assign showFaqs = true -%} {%- for item in site.noFaqsList
184
- -%} {%- if item == page.lang -%} {%- assign showFaqs = false -%} {%- break
185
- -%} {%- else -%} {%- assign showFaqs = true -%} {%- endif -%} {%- endfor -%}
186
- {%- if showFaqs == true -%} {%- if homeData.FAQ -%}
187
- <section class="faq-section">
188
- <div class="container">
189
- <div class="row">
190
- <div class="col-md-8 mx-auto">
191
- <div class="faq">
192
- {%- if homeData.FAQ.size>0 -%}
193
- <h3 class="feature-h1 text-center mb-4">
194
- {{homeData.faqheading | default: 'Frequently Asked Questions'}}
195
- </h3>
196
- {%- endif -%}
197
- <ul class="list-unstyled">
198
- {% for data in homeData.FAQ %}
199
- <li>
200
- <h3 class="faq-question" itemprop="name">
201
- {{data.question | replace: "$variable", page.value}}<em style="transform: rotate(-135deg)">
202
- <i></i></em>
203
- </h3>
204
- <div style="display: block">
205
- <p class="faq-answer" itemprop="text">
206
- {{data.answer | replace: "$variable", page.value}}
207
- </p>
208
- </div>
209
- </li>
210
- {% endfor %}
211
- </ul>
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
- </section>
217
- {%- endif -%} {%- endif -%} {%- include share/socialshare.html -%} {%-
218
- include Rating/rating.html -%}
219
- {%- if homeData.infographics.size > 0 -%}
220
- {%- include /appscms/infographics/infographics.html -%}
221
- {%- endif -%}
222
-
223
- {%- if homeData.USPS -%} {%- include
224
- /Usp/usp.html -%} {%- endif -%} {%- if homeData.display_formats -%}
225
- <div class="container file-detail-table">
226
- {%- include fileformat/fileformatdetail.html -%}
227
- </div>
228
- {%- endif -%} {%- if homeData.compare_formats -%}
229
- <div class="container compare-table">
230
- {%- include fileformat/comparisonfiles.html -%}
231
- </div>
232
- {%- endif -%} {%- assign langen = "en" -%} {%- if
233
- site.data[folder][langen][file].categories -%} {%- assign categories =
234
- site.data[folder][langen][file].categories -%} {%- else -%} {%- assign
235
- categories = page.categories -%} {%- endif -%} {%- if
236
- site.data[folder][langen][file].tags -%} {%- assign tags =
237
- site.data[folder][langen][file].tags -%} {%- else -%} {%- assign tags =
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
- let videoContainer = document.querySelector('.how-to-video');
254
- let thumbnail = document.getElementById('thumbnail-img');
255
- let videoId = videoContainer.getAttribute("data-videoid")
256
- let thumbnailUrl = 'https://img.youtube.com/vi/' + videoId + '/maxresdefault.jpg';
257
- console.log(videoId)
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
- // Function to load video
260
- function loadVideo() {
261
- videoContainer.innerHTML = '<iframe loading="lazy" class="youtubeVideoPlayer" width="100%" height="100%" src="https://www.youtube.com/embed/' + videoId + '?autoplay=1&mute=1" allowfullscreen></iframe>';
262
- }
263
- // Function to handle lazy loading of the thumbnail
264
- function lazyLoadThumbnail(entries, observer) {
265
- entries.forEach(entry => {
266
- if (entry.isIntersecting) {
267
- // Load thumbnail when it becomes visible
268
- thumbnail.src = thumbnailUrl;
269
- // Stop observing once loaded
270
- observer.unobserve(entry.target);
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
- // Set up the Intersection Observer
275
- var observer = new IntersectionObserver(lazyLoadThumbnail, { threshold: 0.1 });
276
- observer.observe(thumbnail);
277
- // Optionally, you can add an event listener to trigger video loading on click or other interactions
278
- thumbnail.addEventListener('click', loadVideo);
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>