1
0
mirror of https://github.com/actix/actix-website synced 2024-11-24 00:41:07 +01:00

add example project and blog nav

This commit is contained in:
krircc 2018-06-24 22:31:09 +08:00
parent ada7b80fe9
commit 93d92615cb
9 changed files with 133 additions and 11 deletions

View File

@ -0,0 +1,8 @@
---
title: 旧
description: 2018-01-01
menu: blog_2018
weight: 999
---
# Title

View File

@ -0,0 +1,8 @@
---
title: 新
description: 2018-06-11
menu: blog_2018
weight: 998
---
# Title

10
content/blog/_index.cn.md Normal file
View File

@ -0,0 +1,10 @@
---
title: 博客
description: 快乐的Actix之旅
menu:
blog_intro:
name: 欢迎
weight: 1
---
欢迎开始快乐的Actix之旅 你可以从左侧的时间点选择开始。

View File

@ -5,18 +5,25 @@ description: 人生中最美好的事物就是分享
# 加入我们 # 加入我们
想与其他人讨论问题吗?该Actix的[gitter](https://gitter.im/actix/actix)频道或 [reddit](https://www.reddit.com/r/actix/)社区和中文社区QQ群570065685 是你最好的起点。 想与其他人讨论问题吗?Actix的你最好的起点是:
如果你认为你发现了一个bug最好直接去 - [gitter](https://gitter.im/actix/actix)频道
[github](https://github.com/actix) . 这里有2个主要仓库. [actix](https://github.com/actix/actix)的actor系统 - [reddit](https://www.reddit.com/r/actix/)社区
和 [actix-web](https://github.com/actix/actix-web) - QQ群570065685
高水平Web框架。
如果你发现了一个bug最好直接去
[github](https://github.com/actix) . 有2个主要仓库:
- [actix](https://github.com/actix/actix) Rust强大的actor系统
- [actix-web](https://github.com/actix/actix-web) Rust高水平Web框架。
我们是一个热情的社区,所以不要害怕参与. [我们遵守的行为准则](coc/). 我们是一个热情的社区,所以不要害怕参与. [我们遵守的行为准则](coc/).
# 案例 # 案例
如果你还没有准备好,这里有一些案例 如果你还没有准备好,这里有一些案例
- [muro](https://github.com/OUISRC/muro) : The interest and community for internet .(reddit clone) - [OUISRC/muro](https://github.com/OUISRC/muro) : The interest and community for internet .(reddit clone)
- [swipe-app/swipe-server](https://github.com/swipe-app/swipe-server) : Swipe app api with actix-web and graphql - [swipe-app/swipe-server](https://github.com/swipe-app/swipe-server) : Swipe app api with actix-web and graphql
- [yew-actix-protobuf-sample](https://github.com/havarnov/yew-actix-protobuf-sample) : web app written in yew and actix. - [yew-actix-protobuf-sample](https://github.com/havarnov/yew-actix-protobuf-sample) : web app written in yew and actix.
- [yinyanlv/partner](https://github.com/yinyanlv/partner)
- [yinyanlv/partner-client](https://github.com/yinyanlv/partner-client)

63
layouts/blog/baseof.html Normal file
View File

@ -0,0 +1,63 @@
{{ partial "header" . }}
{{ $currentURL := .URL }}
<div class="actix-pageheader">
<div class="container">
<h1 id="blog-title" class="display-4">{{ .Title }}</h1>
{{ if .Description }}
<p class="lead">{{ .Description }}</p>
{{ end }}
</div>
</div>
<div class="container actix-blog">
<div class="row">
<div class="col-md-3">
<button class="btn doctoggle" type="button" data-toggle="collapse" data-target="#collapsing-docnav" aria-expanded="false" aria-controls="collapsing-docnav">
Toggle navigation
</button>
<nav class="leftnav collapse show" id="collapsing-docnav">
<div class="" id="">
<details>
<summary>Introduction</summary>
<div>
<ul class="nav">
{{ range .Site.Menus.blog_intro }}
<li{{ if eq $currentURL .URL }} class="active"{{ end }}>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</div>
</details>
<details>
<summary>2018</summary>
<div>
<ul class="nav">
{{ range .Site.Menus.blog_2018 }}
<li{{ if eq $currentURL .URL }} class="active"{{ end }}>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</div>
</details>
</div>
</nav>
</div>
<div class="col-md-9">
<div class="actix-content">
{{ block "main" . }}{{ end }}
<!-- Yes, we have to use *Prev* to get the next content, because the
weights are sorted inversely to how they are actually displayed... -->
{{ with .PrevInSection }}<div class="actix-next"><b>Next up</b>: <a href = {{ .URL }}>{{ end }}
{{ with .PrevInSection }} {{ .Title }}</a></div>{{ end }}
</div>
</div>
</div>
</div>
{{ partial "footer" . }}

3
layouts/blog/blog.html Normal file
View File

@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

3
layouts/blog/single.html Normal file
View File

@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

View File

@ -45,8 +45,8 @@
<li class="nav-item" id="language"> <li class="nav-item" id="language">
<img src="/img/i18n.jpeg"/> <img src="/img/i18n.jpeg"/>
<ul class="subitem"> <ul class="subitem">
<li class="submenu-item"><a href="https://actix.rs">English</a></li> <li class="submenu-item"><a href="https://actix.rs" target="view_window">English</a></li>
<li class="submenu-item"><a href="https://actix.rs/cn">中文</a> </li> <li class="submenu-item"><a href="https://actix.rs/cn" target="view_window">中文</a> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
@ -60,6 +60,9 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="/docs/">文档</a> <a class="nav-link" href="/docs/">文档</a>
</li> </li>
<li class="nav-item">
<a class="nav-link" href="/blog/">博客</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="/community/">社区</a> <a class="nav-link" href="/community/">社区</a>
</li> </li>
@ -69,8 +72,8 @@
<li class="nav-item" id="language"> <li class="nav-item" id="language">
<img src="/img/i18n.jpeg"/> <img src="/img/i18n.jpeg"/>
<ul class="subitem"> <ul class="subitem">
<li class="submenu-item"><a href="https://actix.rs">English</a></li> <li class="submenu-item"><a href="https://actix.rs" target="view_window">English</a></li>
<li class="submenu-item"><a href="https://actix.rs/cn">中文</a> </li> <li class="submenu-item"><a href="https://actix.rs/cn" target="view_window">中文</a> </li>
</ul> </ul>
</li> </li>
</ul> </ul>

View File

@ -388,6 +388,23 @@ img {
text-decoration: none; text-decoration: none;
} }
/*
*
* ===== blog =====
*
*/
#collapsing-docnav details {
border: none;
}
#collapsing-docnav details summary {
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 0.8rem;
}
#collapsing-docnav details ul {
margin: 1rem;
}
/* /*
* *
* ===== Footer ===== * ===== Footer =====