-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
videos.html
185 lines (164 loc) · 5.96 KB
/
videos.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
---
layout: page
title: Videos
permalink: /videos
description: "Explore our video library, featuring expert insights and practical tips on digital rights and privacy."
---
{% include variables.html %}
{% include c_sub-hero.html title=page.title perex=page.description %}
<section>
<div class="container">
{%- include c_box-header.html title=t.videos.titleNewest links=site.techloreVideos.links -%}
<div class="box has-footer">
<ul class="video-list video-list--3-videos marginless listless columns is-multiline is-gap-2">
{% for video in site.data._en.forum.latest-techlore-videos limit: 3 %}
{% assign forumLink = video.id | prepend: "https://discuss.techlore.tech/t/" %}
{%- include c_video.html
title=video.fancy_title
desc=video.excerpt
link=forumLink
thumbnail=video.image_url
date=video.created_at
-%}
{% endfor %}
</ul>
</div>
{% include c_box-footer.html
link="/videos#older-videos"
title=t.global.other.viewMore
%}
</div>
</section>
<section>
<div class="container">
{%- include c_box-header.html title=t.videos.titleFeatured -%}
<div class="box has-footer">
<ul class="video-list marginless listless columns is-multiline is-gap-2">
{% assign sortedVideos = site.guides | sort: "datePublished" | reverse %}
{% for video in sortedVideos limit: 4 %}
{% assign filename = video.path | split: "/" | last %}
{% assign videoThumbnail = "/guides/" | append: filename | replace: ".md", ".jpg" | relative_url %}
{%- include c_video.html
title=video.title
desc=video.description
link=video.linkForum
linkYouTube=video.linkYouTube
linkPeerTube=video.linkPeerTube
thumbnail=videoThumbnail
date=video.datePublished
-%}
{% endfor %}
</ul>
</div>
{% include c_box-footer.html
link=site.data._en.navigation.hiddenNav.allTechloreGuides.url
title=t.global.other.viewMore
%}
</div>
</section>
<section>
<div class="container is-max-tablet">
{% if t.goincognito.engageUser.title %}
<h2 class="has-text-centered">{{ t.goincognito.titleMore }}</h2>
{% endif %}
{% assign iconEngage = "iris-scan" %}
{% assign buttonLink = site.data._en.navigation.mainNav.goincognito.url | relative_url %}
{% include c_feature-box.html
icon=iconEngage
title=t.featureBox.tryIncognito.title
desc=t.featureBox.tryIncognito.desc
buttonText=t.featureBox.tryIncognito.buttonText
buttonLink=buttonLink
class="is-box-warning has-no-background has-border"
buttonClass="is-warning"
%}
</div>
</section>
<section>
<div class="container">
<div class="columns">
<div class="column is-full-mobile is-half" id="techlore-clips">
{%- include c_box-header.html title=t.videos.techloreClips.title links=site.techloreClips.links -%}
<div class="box has-footer">
<ul class="video-list video-list--50 marginless listless columns is-multiline is-gap-2">
{% for video in site.data._en.forum.latest-techlore-clips-videos limit: 2 %}
{% assign forumLink = video.id | prepend: "https://discuss.techlore.tech/t/" %}
{%- include c_video.html
title=video.fancy_title
desc=video.excerpt
link=forumLink
thumbnail=video.image_url
date=video.created_at
-%}
{% endfor %}
</ul>
</div>
</div>
<div class="column is-full-mobile is-half" id="surveillance-report">
{%- include c_box-header.html title=t.videos.surveillanceReport.title links=site.surveillanceReport.links -%}
<div class="box has-footer">
<ul class="video-list video-list--50 marginless listless columns is-multiline is-gap-2">
{% for video in site.data._en.forum.latest-surveillance-report-videos limit: 2 %}
{% assign forumLink = video.id | prepend: "https://discuss.techlore.tech/t/" %}
{%- include c_video.html
title=video.fancy_title
desc=video.excerpt
link=forumLink
thumbnail=video.image_url
date=video.created_at
posts=video.posts_count
likes=video.like_count
-%}
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</section>
<section id="older-videos">
<div class="container">
<h2 class="has-text-centered">{{ t.videos.titleArchive }}</h2>
<p class="has-text-centered mb-6">
{% include e_render-svg-icon.html icon="arrow-down" dimension=200 inline=true %}
</p>
{% assign sortedVideos = site.data._en.forum.latest-techlore-videos %}
{% assign groupedVideos = "" %}
{% assign headerLinks = site.techloreVideos.links %}
{%- for video in sortedVideos -%}
{% assign videoDate = video.last_posted_at | date: "%B %Y" %}
{% assign groupedVideos = groupedVideos | append: videoDate | append: "," %}
{%- endfor -%}
{% assign monthArray = groupedVideos | split: "," | uniq %}
{%- for month in monthArray -%}
<div class="is-flex is-flex-direction-column">
{% comment %} Hide header by default; not to show an empty month {% endcomment %}
{% assign showHeader = false %}
<div class="box">
<ul class="video-list marginless listless columns is-multiline is-gap-2 mb-6 pb-6">
{%- for video in sortedVideos offset: 3 -%}
{%- assign videoDate = video.last_posted_at | date: "%B %Y" -%}
{%- assign forumLink = video.id | prepend: "https://discuss.techlore.tech/t/" -%}
{%- if videoDate == month and video.size > 0 -%}
{%- include c_video.html
title=video.fancy_title
desc=video.excerpt
link=forumLink
thumbnail=video.image_url
date=video.created_at
-%}
{%- assign showHeader = true -%}
{%- endif -%}
{%- endfor -%}
</ul>
</div>
{%- if showHeader -%}
{% assign title = month | date: "%B, %Y" %}
{%- include c_box-header.html title=title links=headerLinks class="has-order-1 mb-4" -%}
{% comment %} Disable header links after the first loop {% endcomment %}
{% assign headerLinks = "" %}
{%- endif -%}
</div>
{%- endfor -%}
</div>
</section>