Skip to content

Commit 1743b0f

Browse files
author
Fabian Morón Zirfas
authored
Merge pull request #23 from basiljs/feature/menu
Feature/menu
2 parents 4d7ad24 + 2314456 commit 1743b0f

File tree

5 files changed

+35
-16
lines changed

5 files changed

+35
-16
lines changed

_includes/aside-left.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<aside>
2+
<div class="logo"></div>
3+
<div class="nav-o-meter"></div>
4+
<nav class="main-menu">
5+
<ul>
6+
<!--
7+
loop all pages
8+
exclude all entry layouts
9+
include all default and the reference
10+
exclude the root path
11+
-->
12+
{% for item in site.pages %}{% if item.layout != 'entry' %}{%if item.layout == 'default' or item.layout == 'reference' %}{% if item.url != '/' %}
13+
<li class="menu-item {% if item.title == page.title %}active{% endif %}"><a href="{{item.url}}">{{item.title}}</a></li>
14+
{% endif %}{% endif %}{% endif %}{% endfor %}
15+
</ul>
16+
</nav>
17+
<div class="tweet">
18+
</div>
19+
<div class="links"></div>
20+
</aside>

_includes/footer.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<footer>
2+
<div class="impressum">
3+
4+
</div>
5+
</footer>

_includes/menu.html

Whitespace-only changes.

_layouts/default.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
<script type="text/javascript" src="/assets/js/highlight.js"></script>
1818
<script src="/assets/js/basiljs.js" type="text/javascript"></script>
1919
</head>
20-
<body>
20+
<!--
21+
the filtering of the titles for a body class is a little cumbersome.
22+
If we have some special characters in the tile we will have to filter it here
23+
-->
24+
<body class="{{
25+
page.title | replace: '.', '' | replace: ' ', '' | downcase
26+
}}">
27+
{% include aside-left.html %}
2128
<div class="main">
2229
<h1>{{page.title}}</h1>
2330
<div id="content" class="wrapppper">
@@ -27,8 +34,7 @@ <h1>{{page.title}}</h1>
2734
<div class="line"></div>
2835
<div class="line"></div>
2936
</div>
30-
<div class="guidelines">
31-
<!-- <script src="/assets/js/gridline.js" type="text/javascript"></script> -->
32-
</div>
37+
<div class="guidelines"></div>
38+
{% include footer.html %}
3339
</body>
3440
</html>

index.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@ layout: default
33
title: Basil.js
44
---
55

6-
<div>
7-
<ul>
8-
{% for page in site.pages %}
9-
{% if page.layout != 'entry' %}
10-
{%if page.layout == 'default' or page.layout == 'reference' %}
11-
<li><a href="{{page.url}}">{{page.title}}</a></li>
12-
{%endif%}
13-
{% endif %}
14-
15-
{% endfor %}
16-
</ul>
17-
</div>
186

197
## Have you ever wanted to ...
208

0 commit comments

Comments
 (0)