-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
134 lines (115 loc) · 4.73 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
---
layout: page
title: 'Illustrations'
---
<!-- START CONTENT -->
<div class="row gx-5">
<!-- START Counting all images in the /assets/illustrations folder -->
{% assign total_count = 0 %}
{% for file in site.static_files %}
{% if file.path contains '/assets/illustrations/' %}
{% assign total_count = total_count | plus: 1 %}
{% endif %}
{% endfor %}
<!-- END Counting all images in the /assets/illustrations folder -->
<!-- START LEFT SIDEBAR -->
<div class="col-2">
{% include sidebar-menu.html %}
<!-- START Sidebar Categories -->
<div class="d-flex align-items-center mb-3">
<h6 class="mb-0 fw-normal">Categories </h6>
<small class="text-secondary ms-auto align-self-center fw-normal"></small>
</div>
<!-- END Sidebar Categories -->
<ul class="list-unstyled">
{% assign categories = "" %}
{% for file in site.static_files %}
{% if file.path contains '/assets/illustrations/' %}
{% assign path_parts = file.path | split: '/' %}
{% assign category_name = path_parts[3] %}
{% unless categories contains category_name %}
{% assign categories = categories | append: category_name | append: "," %}
{% endunless %}
{% endif %}
{% endfor %}
{% assign categories = categories | split: ',' | uniq %}
<!-- Generowanie linków do kotwic -->
{% for category in categories %}
{% unless category == "" %}
<!-- Zliczanie plików w danej kategorii -->
{% assign count = 0 %}
{% for avatar in site.static_files %}
{% assign avatar_parts = avatar.path | split: '/' %}
{% if avatar_parts[3] == category %}
{% assign count = count | plus: 1 %}
{% endif %}
{% endfor %}
<li>
<a href="#{{ category | replace: ' ', '-' }}" class="d-flex link-custom link-offset-2 link-offset-3-hover link-underline link-underline-opacity-0 mb-2 opacity-75">
{{ category | capitalize }}
<small class="text-secondary text-end ms-auto opacity-75">
{{ count }}
</small>
</a>
</li>
{% endunless %}
{% endfor %}
</ul>
</div>
<!-- END LEFT SIDEBAR -->
<!-- START RIGHT CONTENT -->
<div class="col-10">
<h1 class="mb-4 fw-normal">{{ total_count }} Illustrations<br />for Your Design Systems and Docs</h1>
<p class="lead text-opacity-75 text-secondary">Discover a vast collection of free, high-quality illustrations designed specifically for documentation, frameworks, and design systems. Enhance your projects with our easily accessible and professionally crafted illustrations.</p>
<hr class="my-5 text-secondary" style="border-style: dashed;" />
<!-- Pobieranie katalogów (kategorii) z katalogu głównego /assets/avatars/ -->
{% assign categories = "" %}
{% for file in site.static_files %}
{% if file.path contains '/assets/illustrations/' %}
{% assign path_parts = file.path | split: '/' %}
{% assign category_name = path_parts[3] %}
{% unless categories contains category_name %}
{% assign categories = categories | append: category_name | append: "," %}
{% endunless %}
{% endif %}
{% endfor %}
{% assign categories = categories | split: ',' | uniq %}
{% for category in categories %}
{% unless category == "" %}
<!-- START Category Header -->
<h5 class="my-4 fw-normal" id="{{ category | replace: ' ', '-' }}">
{{ category | capitalize }}
<small class="text-secondary text-opacity-75 ms-2 fw-normal">
{% assign count = 0 %}
{% for avatar in site.static_files %}
{% assign avatar_parts = avatar.path | split: '/' %}
{% if avatar_parts[3] == category %}
{% assign count = count | plus: 1 %}
{% endif %}
{% endfor %}
{{ count }}
</small>
</h5>
<!-- END Category Header -->
<div class="row">
{% for avatar in site.static_files %}
{% assign avatar_parts = avatar.path | split: '/' %}
{% if avatar_parts[3] == category %}
{% assign filename = avatar.path | split: '/' | last | split: '.' | first %}
<div class="col-md-3 mb-4">
<!-- START Card -->
{% include card.html %}
<!-- END Card -->
</div>
<!-- START Modal -->
{% include modal.html %}
<!-- END Modal -->
{% endif %}
{% endfor %}
</div>
{% endunless %}
{% endfor %}
</div>
<!-- END RIGHT Content -->
</div>
<!-- END CONTENT -->