mirror of
https://github.com/BreizhHardware/lefrenchmathproject.git
synced 2026-03-18 21:30:36 +01:00
nav bar
This commit is contained in:
2
404.html
2
404.html
@@ -20,7 +20,7 @@ layout: default
|
||||
<div class="container">
|
||||
<h1>404</h1>
|
||||
|
||||
<img src="assets/404.jpg" alt="Italian Trulli">
|
||||
<img src="assets/404.jpg" alt="Woops">
|
||||
|
||||
<p><strong>Page not found :(</strong></p>
|
||||
<p>The requested page could not be found.</p>
|
||||
|
||||
8
_data/menu.yml
Normal file
8
_data/menu.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- text: Home
|
||||
url: /
|
||||
- text: Courses
|
||||
url: /courses/
|
||||
- text: Exercices
|
||||
url: /exercises/
|
||||
- text: Méthodes
|
||||
url: /methods/
|
||||
17
_includes/nav.html
Normal file
17
_includes/nav.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% assign navurl = page.url | remove: 'index.html' %}
|
||||
<ul>
|
||||
{% for item in include.nav %}
|
||||
<li>
|
||||
<a href="{{ item.url }}">
|
||||
{% if item.url == navurl %}
|
||||
<b>{{ item.text }}</b>
|
||||
{% else %}
|
||||
{{ item.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% if item.subitems and navurl contains item.url %}
|
||||
{% include nav.html nav=item.subitems %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@@ -37,4 +37,6 @@
|
||||
|
||||
</body>
|
||||
|
||||
{% include nav.html nav=site.data.menu %}
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user