forked from CheckPointSW/MacOS-MalwarePedia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
168 lines (142 loc) · 5.31 KB
/
index.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
---
layout: default
---
<section>
<div class="jumbotron">
<div class="container logo">
<img src="/assets/images/cpr_logo.png" /> {{site.description}}
</div>
</div>
</section>
<section id="page-content">
<div class="container">
{% comment %}
<input class="form-control" placeholder="search..." type="text" aria-label="Search" id="search-input">
<div id="results-container"></div>
{% endcomment %}
sort: <div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<button type="button" class="btn btn-sm btn-sort btn-bleft" data-order="asc" onclick="sort_by_title(this)">Name</button>
<button type="button" class="btn btn-sm btn-sort" data-order="desc" onclick="sort_by_date(this)">Date</button>
</div>
<button type="button" class="btn btn-sm btn-expand pull-right" data-order="desc" onclick="expand_all(this)">Expand All</button>
<br>
<br>
<div class="post-list" id="post-list">
<div class="wrap-collabsible-title">
<label class="lbl-toggle-title">
<div class="container">
<div class="row">
<div class="col-md-3 first">
Name
</div>
<div class="col-md-2">
Samples
</div>
<div class="col-md-5">
Category
</div>
<div class="col-md-2 text-center">
First Seen
</div>
</div>
</div>
</label>
</div>
{% assign sorted_families = site.families | sort_natural: 'title' %}
{% for post in sorted_families %}
<div class="wrap-collabsible">
<input id="collapsible{{ forloop.index }}" class="toggle" type="checkbox">
<label for="collapsible{{ forloop.index }}" class="lbl-toggle {% cycle 'odd', 'even' %}">
<div class="container">
<div class="row">
<div class="col-md-3 first">
<a class="post-title sort-title" href="{{post.url | prepend:site.baseurl }}">
{{ post.title }}
</a>
</div>
<div class="col-md-2 sort-date" data-timestamp="{{ post.year | date: "%s"}}">
{% if post.hashes %}
{% for sample in post.hashes %}
<a href="https://www.virustotal.com/#/file/{{sample}}" target="_blank"><i class="fa fa-download"></i></a>
{% endfor %}
{% endif %}
</div>
<div class="col-md-6 sort-category">
{% for category in post.categories%}
<a href="/category/{{category}}">{{category}}</a>{% if forloop.last %}{% else %}, {% endif %}
{% endfor %}
</div>
<div class="col-md-1 sort-date" data-timestamp="{{ post.year | date: "%s"}}">
{{ post.year }}
</div>
</div>
</div>
</label>
<div class="collapsible-content">
<div class="content-inner">
{{ post.content }}
<br />
{% if post.hashes %}
<b>Samples:</b> <br>
{% for sample in post.hashes %}
<a href="https://www.virustotal.com/#/file/{{sample}}" target="_blank">{{sample}}</i></a> <br>
{% endfor %}
{% endif %}
<br>
<div class="posted">
posted on
<span class="posted-on">
{{ post.date | date: "%Y" }}
</span>
<span class="in">
in
</span>
<span class="categories-on">
{% for category in post.categories%}
{{category}} {% if forloop.last %}{% else %},{% endif %}
{% endfor %}
</span>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
<!-- Script pointing to search-script.js -->
<script src="/assets/js/search-script.js" type="text/javascript"></script>
{% comment %}
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '/search.json'
})
</script>
{% endcomment %}
<script>
var rows = document.querySelectorAll('.wrap-collabsible')
var expand = false;
function sort_by_title(e) {
isAscending = e.getAttribute('data-order')==='asc';
order = isAscending?'desc':'asc';
e.setAttribute('data-order',order);
tinysort(rows, {selector:'.sort-title', order: order})
}
function sort_by_date(e) {
isAscending = e.getAttribute('data-order')==='asc';
order = isAscending?'desc':'asc';
e.setAttribute('data-order',order);
tinysort(rows, {selector:'.sort-date', order: order, data:'timestamp'})
}
function expand_all(e) {
expand = !expand;
e.innerHTML = e.innerHTML == 'Expand All'?'Collapse All':'Expand All'
checkboxes = document.getElementsByClassName('toggle');
for(var i=0, n=checkboxes.length;i<n;i++) {
checkboxes[i].checked = expand;
console.log(expand)
}
}
</script>