Permalink
Browse files

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>
  • Loading branch information...
prodingerd committed Oct 3, 2018
1 parent bf99797 commit ee7c61b3aff87e92d34806a41fe332ed558ccff1
Showing with 19 additions and 16 deletions.
  1. +5 −0 _includes/footer.html
  2. +11 −0 _includes/navigation.html
  3. +3 −16 _layouts/default.html
View
@@ -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>
View
@@ -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
@@ -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>

0 comments on commit ee7c61b

Please sign in to comment.