File tree Expand file tree Collapse file tree 4 files changed +24
-23
lines changed
Expand file tree Collapse file tree 4 files changed +24
-23
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 %}
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 ;
4040 box-shadow : 1px 2px 4px gray;
4141 }
4242
43- .flex-container > a > div : hover {
44- filter : brightness (80% );
45- }
46-
4743</ style >
Original file line number Diff line number Diff line change 11{% comment %}
2+ Bullet list menu.
3+
24 Pages at the current level excluding the page itself.
35{% endcomment %}
46
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments