Skip to content

Commit 55add9c

Browse files
authored
Merge pull request #55 from libangrui/upgrade/blog-style-adjustment
Upgrade/blog style adjustment
2 parents ff0a264 + fce3e33 commit 55add9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+373
-307
lines changed

content/blog/1.1.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/blog/1.1.zh.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/blog/1.2.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/blog/1.2.zh.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/blog/1.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

content/blog/1.zh.md

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "Why use slack for our daily communications?"
2+
title: "Why use slack for our daily communications?" #required
33
author: ""
4-
date: 2017-12-08
4+
date: 2017-12-08 #required
55
gitalk: true
66
categories:
77
- 日志
File renamed without changes.

content/blog/test.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

layouts/_default/single.html

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,55 @@
11
{{ partial "header.html" . }}
22

3-
<div class="article clearfix">
3+
<div class="article blog-article clearfix">
44
<div class="container">
55
<aside class="sider">
6-
<div class="blog-menu">
7-
<h3>Blog Archive</h3>
8-
<ul>
9-
{{ $currentPage := . }}
10-
{{ range (where .Site.Pages "Type" "blog") }}
11-
{{ range .Pages.GroupByDate "2006" }}
12-
<li class="blog-menu_type {{if eq ($currentPage.Date.Format "2006") .Key }}active{{ end }}">
13-
<span>{{ .Key }}</span>
14-
<ul class="blog-menu_list">
15-
{{ range .Pages.GroupByDate "January" }}
16-
<li class="blog-menu_type {{if eq ($currentPage.Date.Format "January") .Key }}active{{ end }}">
17-
<span>{{ .Key }}</span>
18-
<div class="blog-menu_list">
19-
{{ range .Pages }}
20-
<a
21-
class="blog-menu_item {{if eq ($currentPage.Title) .Title }}active{{ end }}"
22-
href="{{ .Permalink }}">
23-
{{ .Title }}
24-
</a>
25-
{{ end }}
26-
</div>
27-
</li>
28-
{{ end }}
29-
</ul>
30-
</li>
6+
{{ if eq .Dir "blog/"}}
7+
<div class="blog-menu">
8+
<h3>Blog Archive</h3>
9+
<ul>
10+
{{ $currentPage := . }}
11+
{{ range (where .Site.Pages "Type" "blog") }}
12+
{{ range .Pages.GroupByDate "2006" }}
13+
<li class="blog-menu_type {{if eq ($currentPage.Date.Format "2006") .Key }}active{{ end }}">
14+
<span>{{ .Key }}</span>
15+
<ul class="blog-menu_list">
16+
{{ range .Pages.GroupByDate "January" }}
17+
<li class="blog-menu_type {{if eq ($currentPage.Date.Format "January") .Key }}active{{ end }}">
18+
<span>{{ .Key }}</span>
19+
<div class="blog-menu_list">
20+
{{ range .Pages }}
21+
<a
22+
class="blog-menu_item {{if eq ($currentPage.Title) .Title }}active{{ end }}"
23+
href="{{ .Permalink }}">
24+
{{ .Title }}
25+
</a>
26+
{{ end }}
27+
</div>
28+
</li>
29+
{{ end }}
30+
</ul>
31+
</li>
32+
{{ end }}
3133
{{ end }}
32-
{{ end }}
33-
</ul>
34-
</div>
34+
</ul>
35+
</div>
36+
{{ end }}
3537
</aside>
3638

39+
<div class="site-link">
40+
<a class="github" href="//www.github.com/openpitrix/openpitrix" target="_blank">github</a>
41+
<a class="slack" href="//openpitrix.slack.com" target="_blank">slack</a>
42+
<a class="twitter" href="//twitter.com/OpenPitrixorg" target="_blank">twitter</a>
43+
<a class="stack-overflow" href="#">stack-overflow</a>
44+
</div>
45+
3746
<article>
3847
<div class="article-meta">
3948
<h2 class="article-title">{{ .Title }}</h2>
40-
{{ if .Params.date }}<h3 class="article-date">{{ .Date.Format "Monday, Jan 2, 2006" }}</h3>{{ end }}
41-
{{ with .Params.author }}<h3 class="article-author">{{ . }}</h3>{{ end }}
49+
<div class="article-info">
50+
{{ with .Params.author }}<h3 class="article-author">{{ . }}</h3>{{ end }}
51+
{{ if .Params.date }}<h3 class="article-date">{{ .Date.Format "Monday, Jan 2, 2006" }}</h3>{{ end }}
52+
</div>
4253
</div>
4354
<div class="article-content">
4455
{{ .Content }}

0 commit comments

Comments
 (0)