-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathctf.html
118 lines (99 loc) · 4.15 KB
/
ctf.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
---
title: CTFs
layout: default
menu: ctfs
---
<div class="container py-5">
<div class="row justify-content-center mb-lg-4">
<div class="col-12 col-lg-8 border-bottom border-zx4">
<h3 class="text-zx4 text-center text-lg-left"><i class="far fa-flag"></i> Challenge writeups</h3>
</div>
</div>
{% assign posts = site.posts | where:"writeups", "true" %}
<div class="row justify-content-center mt-1 d-none d-lg-flex">
<!-- Desktop -->
<div class="col-lg-8">
<ul>
{% for post in posts %}
<li>
<time class="text-monospace" datetime="{{ post.date | date_to_xmlschema }}"
itemprop="datePublished">{{ post.date | date: "%d/%m/%Y" }}</time>:
<a href="{{site.url}}{{site.baseurl}}{{post.url}}">{{post.ctf}} - {{post.challenge}}
</a>
<div class="float-right">
{% for category in post.categories %}
<span class="badge border-white badge-{{category}}" data-toggle="tooltip" data-placement="top" title="{{site.data.categories.name[category]}}">
<i class="{{ site.data.categories.icons[category] }}"></i> {{category}}
</span>
{% endfor %}
</div>
</li>
{% endfor %}
</ul>
</div>
</div>
{% for post in posts %}
<div class="row justify-content-center mt-1 d-block d-lg-none">
<!-- Mobile -->
<div class="col-12 text-center mt-3">
<time datetime="{{ post.date | date_to_xmlschema }}"
itemprop="datePublished">{{ post.date | date: "%d/%m/%Y" }}</time>
</div>
<div class="col-12 text-center">
<a class='font-weight-bold ml-3' href="{{site.url}}{{site.baseurl}}{{post.url}}">
{{post.ctf}} - {{post.challenge}}
</a>
</div>
<div class="col-12 text-center">
{{post.author}} -
{% for category in post.categories %}
<span class="badge border-white badge-{{category}}" data-toggle="tooltip" data-placement="top" title="{{site.data.categories.name[category]}}">
<i class="{{ site.data.categories.icons[category] }}"></i> {{category}}
</span>
{% endfor %}
</div>
</div>
{% endfor %}
{% assign years_s = "" %}
{% for x in site.data.ctf %}
{% if forloop.first == false %}
{% assign years_s = years_s | append: "|" | append: x[0] %}
{% else %}
{% assign years_s = years_s | append: x[0] %}
{% endif %}
{% endfor %}
{% assign years = years_s | split: "|" %}
{% for year in years %}
<div class="row justify-content-center mt-4">
<div class="col-12 col-lg-8 border-bottom border-zx4">
<h3 class="text-zx4 text-center text-lg-left"><i class="far fa-flag"></i> {{year}} CTFs</h3>
</div>
</div>
<div class="row justify-content-center mt-3">
<!-- Desktop -->
<div class="col-lg-8 d-none d-lg-block">
<ul>
{% for ctf in site.data.ctf[year] %}
<li>
<span class="text-monospace">{{ctf.from}} - {{ctf.to}}</span>: <a
href="{{ctf.link}}">{{ctf.name}}</a> - <span>Ranked
<b>#{{ctf.position}}</b> out of {{ctf.teams}} </span>
</li>
{% endfor %}
</ul>
</div>
<!-- Mobile -->
{% for ctf in site.data.ctf[year] %}
<div class="col-12 d-block d-lg-none text-center mt-3">
<span class="text-monospace">{% if ctf.from != ctf.to %}{{ctf.from}} - {{ctf.to}}{% else %}{{ ctf.from }}{% endif %}</span>
</div>
<div class="col-12 d-block d-lg-none text-center">
<a href="{{ctf.link}}">{{ctf.name}}</a>
</div>
<div class="col-12 d-block d-lg-none text-center">
Ranked <b>#{{ctf.position}}</b> out of {{ctf.teams}}
</div>
{% endfor %}
</div>
{% endfor %}
</div>