Skip to content

Commit 859b32e

Browse files
committed
feat: Update includes
1 parent 02edb25 commit 859b32e

File tree

4 files changed

+24
-23
lines changed

4 files changed

+24
-23
lines changed

_includes/breadcrumbs.html

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<div id="breadcrumbs">
22
{% assign crumbs = page.url | remove: '/index.html' | split: '/' %}
33

4-
<a href="{{ '/' | relative_url }}">Home</a>
5-
6-
{% for crumb in crumbs offset: 1 %}
7-
/
8-
{% if forloop.last %}
9-
{{ page.title }}
10-
{% else %}
11-
{% assign crumb_limit = forloop.index | plus: 1 %}
12-
<a href="{{ site.baseurl }}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}">
13-
{{- crumb | replace: '-', ' ' | remove: '.html' | capitalize -}}
14-
</a>
15-
{% endif %}
16-
{% endfor %}
17-
4+
{% if crumbs.size > 2 %}
5+
{% for crumb in crumbs offset: 1 %}
6+
{% unless forloop.first %}
7+
/
8+
{% endunless %}
9+
{% if forloop.last %}
10+
{{ page.title }}
11+
{% else %}
12+
{% assign crumb_limit = forloop.index | plus: 1 %}
13+
<a href="{{ site.baseurl }}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}">
14+
{{- crumb | replace: '-', ' ' | remove: '.html' | capitalize -}}
15+
</a>
16+
{% endif %}
17+
{% endfor %}
18+
{% endif %}
1819
</div>

_includes/flex-sections.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
{% comment %}
2+
Flexbox menu.
13

2-
{%- comment -%}
3-
{% for p in site.pages %}
4-
<div>{{ p.name }}</div>
5-
{% endfor %} {%- endcomment -%}
4+
After removing the common part of the item's path, use an item if it goes exactly one level down.
5+
{% endcomment %}
66

77
{% if page.layout == 'home' %}
88
{% assign depth = 2 %}
@@ -29,9 +29,9 @@
2929
.flex-container {
3030
display: flex;
3131
flex-wrap: wrap;
32+
padding-bottom: 1em;
3233
}
3334

34-
3535
.flex-container>a>div {
3636
margin: 10px;
3737
padding: 20px;
@@ -40,8 +40,4 @@
4040
box-shadow: 1px 2px 4px gray;
4141
}
4242

43-
.flex-container>a>div:hover {
44-
filter: brightness(80%);
45-
}
46-
4743
</style>

_includes/list-pages.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{% comment %}
2+
Bullet list menu.
3+
24
Pages at the current level excluding the page itself.
35
{% endcomment %}
46

_includes/list-sections.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{% comment %}
2+
Bullet list menu.
3+
24
After removing the common part of the item's path, use an item if it goes exactly one level down.
35
{% endcomment %}
46

0 commit comments

Comments
 (0)