1
0
mirror of https://github.com/bigchaindb/site.git synced 2024-11-22 09:46:57 +01:00

prepare menus

This commit is contained in:
Matthias Kretschmann 2016-01-07 20:15:09 +01:00
parent c7ba69aa69
commit 12bd4c1871
10 changed files with 94 additions and 14 deletions

View File

@ -23,6 +23,7 @@
@import 'bigchain/_grid';
@import 'bigchain/_media';
@import 'bigchain/_sections';
@import 'bigchain/_menus';
@import 'bigchain/_alerts';
@import 'bigchain/_code';
@import 'bigchain/_syntax';

View File

@ -1,10 +1,13 @@
.page-header {
padding: $spacer;
.logo { fill: #fff }
.page__header {
padding: ($spacer * 4) 0;
}
.page-content {
.page__title {
text-align: center;
margin: 0;
}
.page__content {
}

View File

@ -1,5 +1,6 @@
.footer {
@extend .small;
padding-top: $spacer;
padding-bottom: $spacer;
text-align: center;

View File

@ -0,0 +1,20 @@
.menu {
}
.menu__link {
display: inline-block;
padding: $spacer
}
.menu__logo svg { fill: #fff }
.menu--main {
@extend .background--gray;
.menu__link { color: #fff; }
}
.menu--footer {
@extend .text-center;
}

18
_src/_data/menus.yml Normal file
View File

@ -0,0 +1,18 @@
main:
- title: Features
url: /features/
- title: Whitepaper
url: /whitepaper/
- title: Docs
url: /docs/
footer:
- title: About
url: /about/
- title: Contact
url: /contact/
- title: Terms of Service
url: /tos/
- title: Privacy
url: /privacy/

View File

@ -1,6 +1,9 @@
<footer class="footer" role="contentinfo">
<div class="row">
<small>&copy; {{ site.time | date: "%Y" }} {{ site.name }}</small>
{% include menu-footer.html %}
<p><small>&copy; {{ site.time | date: "%Y" }} {{ site.name }}</small></p>
</div>
</footer>

View File

@ -0,0 +1,14 @@
<nav class="menu menu--footer">
<div class="row">
{% for link in site.data.menus.footer %}
{% assign active = nil %}
{% if page.url contains link.url %}
{% assign active = 'active' %}
{% endif %}
<a class="menu__link" class="{{ active }}" href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
</div>
</nav>

View File

@ -0,0 +1,21 @@
<nav class="menu menu--main">
<div class="row">
<a class="menu__logo" href="/">
<svg class="logo logo--sm" aria-labelledby="title">
<title>Logo</title>
<use xlink:href="/assets/img/sprite.svg#logo"></use>
</svg>
</a>
{% for link in site.data.menus.main %}
{% assign active = nil %}
{% if page.url contains link.url %}
{% assign active = 'active' %}
{% endif %}
<a class="menu__link" class="{{ active }}" href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
</div>
</nav>

View File

@ -13,6 +13,8 @@
</div>
<![endif]-->
{% include menu-main.html %}
{{ content }}
{% include footer.html %}

View File

@ -2,16 +2,13 @@
layout: base
---
<header role="banner" class="page-header background--gray">
<a href="/">
<svg class="logo logo--sm" aria-labelledby="title">
<title>Logo</title>
<use xlink:href="/assets/img/sprite.svg#logo"></use>
</svg>
</a>
<header role="banner" class="page__header">
<div class="row">
<h1 class="page__title">{{ page.title }}</h1>
</div>
</header>
<section role="main" class="page-content">
<section role="main" class="page__content">
<div class="row">
{{ content }}