Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Commit 1b3ecd9

Browse files
committed
Fixed i18n and disqus
1 parent f07f6a4 commit 1b3ecd9

16 files changed

+36
-112
lines changed

archetypes/docs.md archetypes/doc.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ title: "Title"
44
weight: 10
55
toc: true
66
draft: false
7-
type: "docs"
87
---

archetypes/page.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ title: "Title"
44
weight: 10
55
toc: true
66
draft: false
7-
type: "page"
87
---

archetypes/post.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ author: "go-gitea"
44
title: "Title"
55
tags: ["tag"]
66
draft: false
7-
type: "post"
87
---

i18n/en-US.yaml

-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
- id: navbar_menu
22
translation: "Menu"
33

4-
- id: toplink_website
5-
translation: "Website"
6-
7-
- id: toplink_blog
8-
translation: "Blog"
9-
10-
- id: toplink_docs
11-
translation: "Docs"
12-
13-
- id: toplink_code
14-
translation: "Import"
15-
16-
- id: toplink_downloads
17-
translation: "Downloads"
18-
19-
- id: toplink_github
20-
translation: "GitHub"
21-
224
- id: read_more
235
translation: "More..."
246

i18n/zh-CN.yaml

-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
11
- id: navbar_menu
22
translation: "菜单"
33

4-
- id: toplink_website
5-
translation: "网站"
6-
7-
- id: toplink_blog
8-
translation: "博客"
9-
10-
- id: toplink_docs
11-
translation: "文档"
12-
13-
- id: toplink_code
14-
translation: "导入"
15-
16-
- id: toplink_downloads
17-
translation: "下载"
18-
19-
- id: toplink_github
20-
translation: "GitHub"
21-
224
- id: read_more
235
translation: "更多..."
246

layouts/_default/single.html

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
<div class="col-xs-12">
77
{{ .Content }}
88
</div>
9-
</div>
109

11-
{{ if .Site.DisqusShortname }}
12-
<div class="row">
10+
{{ if .Site.DisqusShortname }}
1311
<div class="col-xs-12">
1412
{{ template "_internal/disqus.html" . }}
1513
</div>
16-
</div>
17-
{{ end }}
14+
{{ end }}
15+
</div>
1816
</div>
1917

2018
{{ partial "footer.html" . }}
File renamed without changes.

layouts/docs/single.html layouts/doc/single.html

+7-9
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
<div class="col-sm-3">
77
{{ partial "menu" . }}
88
</div>
9-
<div class="col-sm-8">
9+
<div class="col-sm-9">
1010
{{ .Content }}
11-
</div>
12-
</div>
1311

14-
{{ if .Site.DisqusShortname }}
15-
<div class="row">
16-
<div class="col-xs-12">
17-
{{ template "_internal/disqus.html" . }}
18-
</div>
12+
{{ if .Site.DisqusShortname }}
13+
<div class="col-xs-12">
14+
{{ template "_internal/disqus.html" . }}
15+
</div>
16+
{{ end }}
1917
</div>
20-
{{ end }}
18+
</div>
2119
</div>
2220

2321
{{ partial "footer.html" . }}

layouts/page/single.html

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@
33

44
<div class="container content">
55
<div class="row">
6-
<div class="col-sm-4">
6+
<div class="col-sm-3">
77
{{ partial "menu" . }}
88
</div>
9-
<div class="col-sm-8">
9+
<div class="col-sm-9">
1010
{{ .Content }}
11-
</div>
12-
</div>
1311

14-
{{ if .Site.DisqusShortname }}
15-
<div class="row">
16-
<div class="col-xs-12">
17-
{{ template "_internal/disqus.html" . }}
18-
</div>
12+
{{ if .Site.DisqusShortname }}
13+
<div class="col-xs-12">
14+
{{ template "_internal/disqus.html" . }}
15+
</div>
16+
{{ end }}
1917
</div>
20-
{{ end }}
18+
</div>
2119
</div>
2220

2321
{{ partial "footer.html" . }}

layouts/partials/footer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="row">
44
<div class="col-xs-12 text-xs-center">
55
<p>
6-
Copyright &copy; 2016 <a href="{{ .Site.Params.Website }}">{{ .Site.Params.Author }}</a>. All rights reserved. Made with <i class="fa fa-heart" aria-hidden="true"></i> and <a href="https://gohugo.io">Hugo</a>
6+
Copyright &copy; 2016 <a href="{{ .Site.Params.website }}">{{ .Site.Params.author }}</a>. All rights reserved. Made with <i class="fa fa-heart" aria-hidden="true"></i> and <a href="https://gohugo.io">Hugo</a>.
77
</p>
88
</div>
99
</div>

layouts/partials/navbar.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<nav class="navbar navbar-light bg-faded">
2-
<button class="navbar-toggler hidden-md-up float-xs-right" type="button" data-toggle="collapse" data-target="#navbar-responsive"
3-
aria-controls="navbar-responsive" aria-expanded="false" aria-label="Toggle navigation"></button>
2+
<button class="navbar-toggler hidden-md-up float-xs-right" type="button" data-toggle="collapse" data-target="#navbar-responsive" aria-controls="navbar-responsive" aria-expanded="false" aria-label="{{ i18n "navbar_menu" }}"></button>
43

54
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
65
<img src="{{ .Site.BaseURL }}images/gitea.png" alt="{{ .Site.Title }}">

layouts/partials/pages.html

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
{{ range .Children }}
1212
<li class="nav-item">
1313
<a class="nav-link{{ if $currentNode.IsMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
14+
{{ .Pre }}
1415
{{ .Name }}
1516
</a>
1617
</li>

layouts/partials/toplinks.html

+8-36
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,8 @@
1-
<li class="nav-item{{ if eq .Site.Params.Toplink "website" }} active{{ end }}">
2-
<a class="nav-link" href="https://gitea.io">
3-
<i class="fa fa-home"></i>
4-
{{ i18n "toplink_website" }}
5-
</a>
6-
</li>
7-
<li class="nav-item{{ if eq .Site.Params.Toplink "docs" }} active{{ end }}">
8-
<a class="nav-link" href="https://docs.gitea.io">
9-
<i class="fa fa-question"></i>
10-
{{ i18n "toplink_docs" }}
11-
</a>
12-
</li>
13-
<li class="nav-item{{ if eq .Site.Params.Toplink "blog" }} active{{ end }}">
14-
<a class="nav-link" href="https://blog.gitea.io">
15-
<i class="fa fa-rss"></i>
16-
{{ i18n "toplink_blog" }}
17-
</a>
18-
</li>
19-
<li class="nav-item{{ if eq .Site.Params.Toplink "redirects" }} active{{ end }}">
20-
<a class="nav-link" href="https://code.gitea.io">
21-
<i class="fa fa-code"></i>
22-
{{ i18n "toplink_code" }}
23-
</a>
24-
</li>
25-
<li class="nav-item">
26-
<a class="nav-link" target="_blank" href="https://dl.gitea.io">
27-
<i class="fa fa-download"></i>
28-
{{ i18n "toplink_downloads" }}
29-
</a>
30-
</li>
31-
<li class="nav-item">
32-
<a class="nav-link" target="_blank" href="https://github.com/go-gitea">
33-
<i class="fa fa-github"></i>
34-
{{ i18n "toplink_github" }}
35-
</a>
36-
</li>
1+
{{ $currentNode := . }}{{ range .Site.Menus.page }}
2+
<li class="nav-item">
3+
<a class="nav-link {{ .Post }}" href="{{ .URL }}">
4+
<i class="fa fa-{{ .Pre }}"></i>
5+
{{ .Name }}
6+
</a>
7+
</li>
8+
{{ end }}

layouts/post/list.html

+3-5
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@ <h2>
4848
</div>
4949
{{ end }}
5050
</div>
51-
</div>
5251

53-
{{ if .Site.DisqusShortname }}
54-
<div class="row">
52+
{{ if .Site.DisqusShortname }}
5553
<div class="col-xs-12">
5654
{{ template "_internal/disqus.html" . }}
5755
</div>
58-
</div>
59-
{{ end }}
56+
{{ end }}
57+
</div>
6058
</div>
6159

6260
{{ partial "footer.html" . }}

layouts/post/single.html

+3-5
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ <h2>
2525
{{ .Content }}
2626
</article>
2727
</div>
28-
</div>
2928

30-
{{ if .Site.DisqusShortname }}
31-
<div class="row">
29+
{{ if .Site.DisqusShortname }}
3230
<div class="col-xs-12">
3331
{{ template "_internal/disqus.html" . }}
3432
</div>
35-
</div>
36-
{{ end }}
33+
{{ end }}
34+
</div>
3735
</div>
3836

3937
{{ partial "footer.html" . }}

theme.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ license = "Apache-2.0"
33
licenselink = "https://github.com/go-gitea/theme/blob/master/LICENSE"
44
description = "General theme for Gitea pages"
55
homepage = "https://github.com/go-gitea/theme"
6+
min_version = 0.17
67

78
[author]
89
name = "The Gitea Authors"

0 commit comments

Comments
 (0)