mirror of
https://github.com/bigchaindb/site.git
synced 2024-12-24 02:16:10 +01:00
prepare menus
This commit is contained in:
parent
c7ba69aa69
commit
12bd4c1871
@ -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';
|
||||
|
@ -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 {
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
.footer {
|
||||
@extend .small;
|
||||
padding-top: $spacer;
|
||||
padding-bottom: $spacer;
|
||||
text-align: center;
|
||||
|
20
_src/_assets/styles/bigchain/_menus.scss
Normal file
20
_src/_assets/styles/bigchain/_menus.scss
Normal 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
18
_src/_data/menus.yml
Normal 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/
|
@ -1,6 +1,9 @@
|
||||
|
||||
<footer class="footer" role="contentinfo">
|
||||
<div class="row">
|
||||
<small>© {{ site.time | date: "%Y" }} {{ site.name }}</small>
|
||||
|
||||
{% include menu-footer.html %}
|
||||
|
||||
<p><small>© {{ site.time | date: "%Y" }} {{ site.name }}</small></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
14
_src/_includes/menu-footer.html
Normal file
14
_src/_includes/menu-footer.html
Normal 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>
|
21
_src/_includes/menu-main.html
Normal file
21
_src/_includes/menu-main.html
Normal 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>
|
@ -13,6 +13,8 @@
|
||||
</div>
|
||||
<![endif]-->
|
||||
|
||||
{% include menu-main.html %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include footer.html %}
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user