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:
parent
bf99797d33
commit
ee7c61b3af
3 changed files with 19 additions and 16 deletions
5
_includes/footer.html
Normal file
5
_includes/footer.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<footer>
|
||||
<span>
|
||||
© <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
11
_includes/navigation.html
Normal 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>
|
|
@ -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>
|
||||
© <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>
|
||||
|
|
Loading…
Reference in a new issue