Skip to content

Commit 611c52f

Browse files
committed
fix-CTF
1 parent c4b414a commit 611c52f

1 file changed

Lines changed: 35 additions & 27 deletions

File tree

_pages/CTF.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,58 @@ display_categories: [CTF]
88
horizontal: false
99
---
1010

11+
1112
<!-- pages/projects.md -->
12-
<div class="ctf">
13-
{%- if site.enable_project_categories and page.display_categories %}
13+
<div class="projects">
14+
{% if site.enable_project_categories and page.display_categories %}
1415
<!-- Display categorized projects -->
15-
{%- for category in page.display_categories %}
16-
<h2 class="category">{{ category }}</h2>
17-
{%- assign categorized_projects = site.projects | where: "category", category -%}
18-
{%- assign sorted_projects = categorized_projects | sort: "importance" %}
16+
{% for category in page.display_categories %}
17+
<a id="{{ category }}" href=".#{{ category }}">
18+
<h2 class="category">{{ category }}</h2>
19+
</a>
20+
{% assign categorized_projects = site.projects | where: "category", category %}
21+
{% assign sorted_projects = categorized_projects | sort: "importance" %}
1922
<!-- Generate cards for each project -->
20-
{% if page.horizontal -%}
23+
{% if page.horizontal %}
2124
<div class="container">
22-
<div class="row row-cols-2">
23-
{%- for project in sorted_projects -%}
25+
<div class="row row-cols-1 row-cols-md-2">
26+
{% for project in sorted_projects %}
2427
{% include projects_horizontal.liquid %}
25-
{%- endfor %}
28+
{% endfor %}
2629
</div>
2730
</div>
28-
{%- else -%}
29-
<div class="grid">
30-
{%- for project in sorted_projects -%}
31+
{% else %}
32+
<div class="row row-cols-1 row-cols-md-3">
33+
{% for project in sorted_projects %}
3134
{% include projects.liquid %}
32-
{%- endfor %}
35+
{% endfor %}
3336
</div>
34-
{%- endif -%}
37+
{% endif %}
3538
{% endfor %}
3639

37-
{%- else -%}
40+
{% else %}
41+
3842
<!-- Display projects without categories -->
39-
{%- assign sorted_projects = site.projects | sort: "importance" -%}
43+
44+
{% assign sorted_projects = site.projects | sort: "importance" %}
45+
4046
<!-- Generate cards for each project -->
41-
{% if page.horizontal -%}
47+
48+
{% if page.horizontal %}
49+
4250
<div class="container">
43-
<div class="row row-cols-2">
44-
{%- for project in sorted_projects -%}
51+
<div class="row row-cols-1 row-cols-md-2">
52+
{% for project in sorted_projects %}
4553
{% include projects_horizontal.liquid %}
46-
{%- endfor %}
54+
{% endfor %}
4755
</div>
4856
</div>
49-
{%- else -%}
50-
<div class="grid">
51-
{%- for project in sorted_projects -%}
57+
{% else %}
58+
<div class="row row-cols-1 row-cols-md-3">
59+
{% for project in sorted_projects %}
5260
{% include projects.liquid %}
53-
{%- endfor %}
61+
{% endfor %}
5462
</div>
55-
{%- endif -%}
56-
{%- endif -%}
63+
{% endif %}
64+
{% endif %}
5765
</div>

0 commit comments

Comments
 (0)