-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwriteups.html
75 lines (62 loc) · 1.75 KB
/
writeups.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
---
layout: default
---
<script src="/menu.js"></script>
<style>
.cliquable {
color: #E27D1D;
cursor: pointer;
transition: 0.4s;
}
.retractable {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
}
</style>
{% assign annees = '' | split: '' %}
{% assign ctfs = '' | split: '' %}
{% assign anneed = '' | split: '' %}
{% assign ctfd = '' | split: '' %}
{% assign delim = ',' | split: '' %}
{% for post in site.posts %}
{% unless anneed contains post.annee %}
{% assign annee = post.annee | split: '' %}
{% assign annees = annees | concat: annee | concat: delim | join: '' %}
{% endunless %}
{% assign anneed = annees | split: ',' %}
{% unless ctfd contains post.ctf %}
{% assign ctf = post.ctf | split: '' %}
{% assign ctfs = ctfs | concat: ctf | concat: delim | join: ''%}
{% endunless %}
{% assign ctfd = ctfs | split: ',' %}
{% endfor %}
{% assign annees = annees | split: ',' | sort | reverse %}
{% assign ctfs = ctfs | split: ',' %}
{% assign test = false %}
<h1 align="center"><b>Writeups</b></h1>
{% for annee in annees %}
<h1>{{ annee }}: </h1>
{% for ctf in ctfs %}
{% for post in site.posts %}
{% if post.annee == annee and post.ctf == ctf %}
{% assign test = true %}
{% endif %}
{% endfor %}
{% if test == true %}
<h2 class="cliquable">_{{ ctf }}</h2>
<ul class="retractable">
{% for post in site.posts %}
{% if post.annee == annee and post.ctf == ctf %}
<li>
<h3>
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">{{ post.title }}</a>
</h3>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% assign test = false %}
{% endfor %}
{% endfor %}