Skip to content

Commit 1320404

Browse files
committed
added project dropdown
1 parent 0a979bc commit 1320404

File tree

8 files changed

+77
-44
lines changed

8 files changed

+77
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
---
2-
layout: default
3-
---
4-
5-
<!-- category -->
6-
<header class="post-header">
7-
<h1 style ="text-align: center;" class="post-title">{{ page.category | escape }}</h1>
8-
</header>
9-
101
<!-- post list -->
112
<div class="archive-group">
123
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
134

145
<ul class="paginator-list">
156
<div id="container_out">
16-
{% for post in site.categories[page.category] %}
7+
{% for post in site.categories[include.category] %}
178
<li>
189
<div id="container_in">
1910
<a href="{{ post.url | relative_url }}"> {{ post.title | escape }} </a>
@@ -24,4 +15,3 @@ <h1 style ="text-align: center;" class="post-title">{{ page.category | escape }}
2415
</div>
2516
<ul>
2617
</div>
27-

_layouts/category-page.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: default
3+
---
4+
5+
<!-- category -->
6+
<header class="post-header">
7+
<h1 style ="text-align: center;" class="post-title">{{ page.category | escape }}</h1>
8+
</header>
9+
10+
<!-- post list -->
11+
{% include category-posts.html category=page.category %}
12+

_sass/projects.scss

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
11
.project-list {
2-
@extend .paginator-list;
2+
#category {
3+
font-size: 24px;
4+
}
5+
6+
summary {
7+
display: flex;
8+
flex-direction: row;
9+
justify-content: space-between;
10+
}
11+
12+
details {
13+
.button_on {
14+
display: block;
15+
color: blue;
16+
padding-left: 10px;
17+
}
18+
.button_off {
19+
display: none;
20+
}
21+
}
22+
23+
details[open] {
24+
.button_on {
25+
display: none;
26+
}
27+
.button_off {
28+
display: block;
29+
color: red;
30+
padding-left: 10px;
31+
}
32+
}
33+
34+
#list_out {
35+
padding-bottom: 10px;
36+
margin-left: 10px;
37+
margin-right: 10px;
38+
}
339

4-
#container_in {
5-
flex-direction: column;
40+
#content {
41+
padding-top: 10px;
642
}
7-
8-
span {
9-
width: auto;
10-
text-align: left;
11-
}
12-
13-
h3 {
14-
margin-bottom: 0px;
15-
}
1643
}

collections/_projects/aircraft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: category-list
2+
layout: category-page
33
category: Aircraft
44
description: "Model aircraft and other flying devices"
55
---
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: category-list
2+
layout: category-page
33
category: "Arduino Libraries"
44
description: "Libraries and code for the Arduino development boards"
55
---
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: category-list
2+
layout: category-page
33
category: Miscellaneous
44
description: "Other random projects"
55
---

collections/_projects/robots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: category-list
2+
layout: category-page
33
category: Robots
44
description: "Small robots and other electro-mechanical prototypes"
55
---

projects.html

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@
33
title: Projects
44
---
55

6-
<div class="archive-group">
7-
<ul class="project-list">
8-
<div id="container_out">
9-
{% for post in site.projects %}
10-
<li>
11-
<div id="container_in">
12-
<div id="container_title">
13-
<a href="{{ post.url | relative_url }}">
14-
<h3>{{ post.title | escape }}</h3>
15-
</a>
16-
</div>
6+
<ul class="project-list">
7+
{% for post in site.projects %}
8+
<li id="list_out">
9+
<div id="container_list">
10+
<a id="category" href="{{ post.url | relative_url }}"> {{ post.title }} </a>
11+
12+
<details>
13+
<summary>
1714
{% if post.description %}
1815
<span>{{ post.description }}</span>
19-
{% endif %}
20-
</div>
21-
</li>
22-
{% endfor %}
16+
{% endif %}
17+
18+
<span class="button_on">[show]</span>
19+
<span class="button_off">[hide]</span>
20+
</summary>
21+
22+
<div id="content">
23+
{% include category-posts.html category=post.category %}
24+
</div>
25+
</details>
2326
</div>
24-
<ul>
25-
</div>
27+
</li>
28+
{% endfor %}
29+
</ul>

0 commit comments

Comments
 (0)