Break up Navigation and Footer into Separate Files

Improve modularity by outsourcing the nav and footer tags into distinct
files.

Signed-off-by: Dominik Prodinger <prodinger.d@outlook.com>
This commit is contained in:
Dominik Prodinger 2018-10-03 08:32:27 +02:00
parent bf99797d33
commit ee7c61b3af
No known key found for this signature in database
GPG Key ID: 579FE90AF376722E
3 changed files with 19 additions and 16 deletions

5
_includes/footer.html Normal file
View File

@ -0,0 +1,5 @@
<footer>
<span>
&copy; <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time> {{ site.author.name }}. Made with Jekyll using the <a href="https://github.com/chesterhow/tale/">Tale</a> theme.
</span>
</footer>

11
_includes/navigation.html Normal file
View File

@ -0,0 +1,11 @@
<nav class="nav">
<div class="nav-container">
<a href="{{ site.baseurl }}/">
<h2 class="nav-title">{{ site.title }}</h2>
</a>
<ul>
<li><a href="{{ '/about' | prepend: site.baseurl }}">About</a></li>
<li><a href="{{ site.baseurl }}/">Posts</a></li>
</ul>
</div>
</nav>

View File

@ -4,26 +4,13 @@
{% include head.html %}
<body>
<nav class="nav">
<div class="nav-container">
<a href="{{ site.baseurl }}/">
<h2 class="nav-title">{{ site.title }}</h2>
</a>
<ul>
<li><a href="{{ '/about' | prepend: site.baseurl }}">About</a></li>
<li><a href="{{ site.baseurl }}/">Posts</a></li>
</ul>
</div>
</nav>
{% include navigation.html %}
<main>
{{ content }}
</main>
<footer>
<span>
&copy; <time datetime="{{ site.time }}">{{ site.time | date: '%Y' }}</time> {{ site.author.name }}. Made with Jekyll using the <a href="https://github.com/chesterhow/tale/">Tale</a> theme.
</span>
</footer>
{% include footer.html %}
</body>
</html>