1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18:12:57 +01:00

add blog nav

This commit is contained in:
krircc 2018-01-07 18:14:51 +08:00
parent 0e64cbdf63
commit 14f4da6fd0
6 changed files with 72 additions and 16 deletions

View File

@ -7,6 +7,7 @@
<div id="rnav"> <div id="rnav">
<li> <a href="/tutorials" title="tutorials">Tutorials</a></li> <li> <a href="/tutorials" title="tutorials">Tutorials</a></li>
<li> <a href="/docs" title="docs">Docs</a></li> <li> <a href="/docs" title="docs">Docs</a></li>
<li> <a href="/blog" title="blog">Blog</a></li>
<li> <a href="/community" title="community">Community</a></li> <li> <a href="/community" title="community">Community</a></li>
<li> <a href="/more" title="github">More</a></li> <li> <a href="/more" title="github">More</a></li>
</div> </div>

29
_layouts/blog.liquid Normal file
View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
{% include "head.liquid" %}
</head>
<body>
<header>
{% include "header.liquid" %}
</header>
<main>
<section class="docs">
<div class="inner">
<aside>
<p>2018</p>
<ul>
<li><a {%if route == "Blog-example"%}class="active"{%endif%} href="/blog/Blog-example.html">Blog Example</a></li>
</ul>
</aside>
<main>
{{ content }}
</main>
</div>
</section>
</main>
<footer>
{% include "footer.liquid" %}
</footer>
</body>
</html>

View File

@ -8,20 +8,20 @@
{% include "header.liquid" %} {% include "header.liquid" %}
</header> </header>
<main> <main>
<section class="docs"> <section class="blog">
<div class="inner"> <div class="inner">
<aside> <aside>
<p>Basics</p> <p>Basics</p>
<ul> <ul>
<li><a {%if route == "Basics-example"%}class="active"{%endif%} href="/docs/Basics-example.html">Basics Example</a></li> <li><a {%if route == "Basics-example"%}class="active"{%endif%} href="/blog/Basics-example.html">Basics Example</a></li>
</ul> </ul>
<p>Reference</p> <p>Reference</p>
<ul> <ul>
<li><a {%if route == "Reference-example"%}class="active"{%endif%} href="/docs/Reference-example.html">Reference Example</a></li> <li><a {%if route == "Reference-example"%}class="active"{%endif%} href="/blog/Reference-example.html">Reference Example</a></li>
</ul> </ul>
<p>Advance</p> <p>Advance</p>
<ul> <ul>
<li><a {%if route == "Advance-example"%}class="active"{%endif%} href="/docs/Advance-example.html">Advance Example</a></li> <li><a {%if route == "Advance-example"%}class="active"{%endif%} href="/blog/Advance-example.html">Advance Example</a></li>
</ul> </ul>
<p>Misc</p> <p>Misc</p>
<ul> <ul>

8
blog/Blog-example.md Normal file
View File

@ -0,0 +1,8 @@
extends: blog.liquid
title: "Blog::Blog Example"
route: Blog-example
---
## Basics Example
The words is comming.

13
blog/index.md Normal file
View File

@ -0,0 +1,13 @@
extends: blog.liquid
title: "Blog"
route: ""
---
## Documentation
Welcome to the Actix-web Blog!
If you feel like contributing further, you can fork that repo,
branch from `source`, and submit a pull request.
Contributions are always welcome!

View File

@ -70,7 +70,7 @@ ul, ol, li {
} }
/* ----------------------------------------section----------------------------------------*/ /* ----------------------------------------section----------------------------------------*/
section.docs aside ul li a { section.docs aside ul li a, section.blog aside ul li a {
display: inline-block; display: inline-block;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
text-decoration: none; text-decoration: none;
@ -80,7 +80,11 @@ section.docs aside ul li a {
section.docs aside ul li a.active, section.docs aside ul li a.active,
section.docs aside ul li a:hover, section.docs aside ul li a:hover,
section.docs aside ul li a:active, section.docs aside ul li a:active,
section.docs aside ul li a:focus { section.docs aside ul li a:focus,
section.blog aside ul li a.active,
section.blog aside ul li a:hover,
section.blog aside ul li a:active,
section.blog aside ul li a:focus {
font-weight: bold; font-weight: bold;
background: var(--orange); background: var(--orange);
color: var(--white); color: var(--white);
@ -227,19 +231,21 @@ footer p {
padding-top: 5rem; padding-top: 5rem;
width: 88%; width: 88%;
} }
section.docs .inner { section.docs .inner, section.blog .inner {
display: flex; display: flex;
} }
section.docs aside, section.blog aside {
section.docs aside {
flex: 0 1 30%; flex: 0 1 30%;
} }
section.docs aside p {
section.docs aside p, section.blog aside p {
font-size: 1.3rem; font-size: 1.3rem;
} }
section.docs main {
section.docs main, section.blog main {
flex: 0 1 70%; flex: 0 1 70%;
} }
.columns { .columns {
display: flex; display: flex;
} }
@ -285,17 +291,16 @@ footer p {
width: 77%; width: 77%;
} }
section.docs .inner { section.docs .inner, section.blog .inner {
display: flex; display: flex;
} }
section.docs aside, section.blog aside {
section.docs aside {
flex: 0 1 30%; flex: 0 1 30%;
} }
section.docs aside p { section.docs aside p, section.blog aside p {
font-size: 1.3rem; font-size: 1.3rem;
} }
section.docs main { section.docs main, section.blog main {
flex: 0 1 70%; flex: 0 1 70%;
} }