get nyavbar kind of working
This commit is contained in:
parent
62cd366a52
commit
1879d2ef09
3 changed files with 44 additions and 8 deletions
4
_data/navigation.yml
Normal file
4
_data/navigation.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Home
|
||||||
|
link: /
|
||||||
|
- name: About
|
||||||
|
link: /about/
|
|
@ -11,6 +11,16 @@
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>{{ site.title }}</h1>
|
<h1>{{ site.title }}</h1>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
{% for item in site.data.navigation %}
|
||||||
|
<li{% if page.url == item.link %} class="current"{% endif %}>
|
||||||
|
<a href="{{ item.link }}">{{ item.name }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
|
@ -15,12 +15,8 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
header, footer {
|
footer {
|
||||||
padding: 20px;
|
padding: 20px 0;
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
border-bottom: thin solid $color-primary;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
@ -32,7 +28,33 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
max-width: $content-width;
|
text-align: center;
|
||||||
margin: 0 auto;
|
margin: 20px 0;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $color-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
border-top: thin solid $color-primary;
|
||||||
|
border-bottom: thin solid $color-primary;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: $content-width;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
a {
|
||||||
|
padding: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue