Browse Source

Fixed i18n and disqus

pull/19/head
Thomas Boerger 3 years ago
parent
commit
1b3ecd91c7
No known key found for this signature in database GPG Key ID: 5A388F55283960B6
16 changed files with 36 additions and 112 deletions
  1. +0
    -1
      archetypes/doc.md
  2. +0
    -1
      archetypes/page.md
  3. +0
    -1
      archetypes/post.md
  4. +0
    -18
      i18n/en-US.yaml
  5. +0
    -18
      i18n/zh-CN.yaml
  6. +3
    -5
      layouts/_default/single.html
  7. +0
    -0
      layouts/doc/list.html
  8. +7
    -9
      layouts/doc/single.html
  9. +8
    -10
      layouts/page/single.html
  10. +1
    -1
      layouts/partials/footer.html
  11. +1
    -2
      layouts/partials/navbar.html
  12. +1
    -0
      layouts/partials/pages.html
  13. +8
    -36
      layouts/partials/toplinks.html
  14. +3
    -5
      layouts/post/list.html
  15. +3
    -5
      layouts/post/single.html
  16. +1
    -0
      theme.toml

archetypes/docs.md → archetypes/doc.md View File

@@ -4,5 +4,4 @@ title: "Title"
weight: 10
toc: true
draft: false
type: "docs"
---

+ 0
- 1
archetypes/page.md View File

@@ -4,5 +4,4 @@ title: "Title"
weight: 10
toc: true
draft: false
type: "page"
---

+ 0
- 1
archetypes/post.md View File

@@ -4,5 +4,4 @@ author: "go-gitea"
title: "Title"
tags: ["tag"]
draft: false
type: "post"
---

+ 0
- 18
i18n/en-US.yaml View File

@@ -1,24 +1,6 @@
- id: navbar_menu
translation: "Menu"

- id: toplink_website
translation: "Website"

- id: toplink_blog
translation: "Blog"

- id: toplink_docs
translation: "Docs"

- id: toplink_code
translation: "Import"

- id: toplink_downloads
translation: "Downloads"

- id: toplink_github
translation: "GitHub"

- id: read_more
translation: "More..."



+ 0
- 18
i18n/zh-CN.yaml View File

@@ -1,24 +1,6 @@
- id: navbar_menu
translation: "菜单"

- id: toplink_website
translation: "网站"

- id: toplink_blog
translation: "博客"

- id: toplink_docs
translation: "文档"

- id: toplink_code
translation: "导入"

- id: toplink_downloads
translation: "下载"

- id: toplink_github
translation: "GitHub"

- id: read_more
translation: "更多..."



+ 3
- 5
layouts/_default/single.html View File

@@ -6,15 +6,13 @@
<div class="col-xs-12">
{{ .Content }}
</div>
</div>

{{ if .Site.DisqusShortname }}
<div class="row">
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
</div>
{{ end }}
{{ end }}
</div>
</div>

{{ partial "footer.html" . }}

layouts/docs/list.html → layouts/doc/list.html View File


layouts/docs/single.html → layouts/doc/single.html View File

@@ -6,18 +6,16 @@
<div class="col-sm-3">
{{ partial "menu" . }}
</div>
<div class="col-sm-8">
<div class="col-sm-9">
{{ .Content }}
</div>
</div>

{{ if .Site.DisqusShortname }}
<div class="row">
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>

{{ partial "footer.html" . }}

+ 8
- 10
layouts/page/single.html View File

@@ -3,21 +3,19 @@

<div class="container content">
<div class="row">
<div class="col-sm-4">
<div class="col-sm-3">
{{ partial "menu" . }}
</div>
<div class="col-sm-8">
<div class="col-sm-9">
{{ .Content }}
</div>
</div>

{{ if .Site.DisqusShortname }}
<div class="row">
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>

{{ partial "footer.html" . }}

+ 1
- 1
layouts/partials/footer.html View File

@@ -3,7 +3,7 @@
<div class="row">
<div class="col-xs-12 text-xs-center">
<p>
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>
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>.
</p>
</div>
</div>


+ 1
- 2
layouts/partials/navbar.html View File

@@ -1,6 +1,5 @@
<nav class="navbar navbar-light bg-faded">
<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="Toggle navigation"></button>
<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>

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


+ 1
- 0
layouts/partials/pages.html View File

@@ -11,6 +11,7 @@
{{ range .Children }}
<li class="nav-item">
<a class="nav-link{{ if $currentNode.IsMenuCurrent "sidebar" . }} active{{ end }}" href="{{ .URL | relLangURL }}">
{{ .Pre }}
{{ .Name }}
</a>
</li>


+ 8
- 36
layouts/partials/toplinks.html View File

@@ -1,36 +1,8 @@
<li class="nav-item{{ if eq .Site.Params.Toplink "website" }} active{{ end }}">
<a class="nav-link" href="https://gitea.io">
<i class="fa fa-home"></i>
{{ i18n "toplink_website" }}
</a>
</li>
<li class="nav-item{{ if eq .Site.Params.Toplink "docs" }} active{{ end }}">
<a class="nav-link" href="https://docs.gitea.io">
<i class="fa fa-question"></i>
{{ i18n "toplink_docs" }}
</a>
</li>
<li class="nav-item{{ if eq .Site.Params.Toplink "blog" }} active{{ end }}">
<a class="nav-link" href="https://blog.gitea.io">
<i class="fa fa-rss"></i>
{{ i18n "toplink_blog" }}
</a>
</li>
<li class="nav-item{{ if eq .Site.Params.Toplink "redirects" }} active{{ end }}">
<a class="nav-link" href="https://code.gitea.io">
<i class="fa fa-code"></i>
{{ i18n "toplink_code" }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="https://dl.gitea.io">
<i class="fa fa-download"></i>
{{ i18n "toplink_downloads" }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="https://github.com/go-gitea">
<i class="fa fa-github"></i>
{{ i18n "toplink_github" }}
</a>
</li>
{{ $currentNode := . }}{{ range .Site.Menus.page }}
<li class="nav-item">
<a class="nav-link {{ .Post }}" href="{{ .URL }}">
<i class="fa fa-{{ .Pre }}"></i>
{{ .Name }}
</a>
</li>
{{ end }}

+ 3
- 5
layouts/post/list.html View File

@@ -48,15 +48,13 @@
</div>
{{ end }}
</div>
</div>

{{ if .Site.DisqusShortname }}
<div class="row">
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
</div>
{{ end }}
{{ end }}
</div>
</div>

{{ partial "footer.html" . }}


+ 3
- 5
layouts/post/single.html View File

@@ -25,15 +25,13 @@
{{ .Content }}
</article>
</div>
</div>

{{ if .Site.DisqusShortname }}
<div class="row">
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ template "_internal/disqus.html" . }}
</div>
</div>
{{ end }}
{{ end }}
</div>
</div>

{{ partial "footer.html" . }}

+ 1
- 0
theme.toml View File

@@ -3,6 +3,7 @@ license = "Apache-2.0"
licenselink = "https://github.com/go-gitea/theme/blob/master/LICENSE"
description = "General theme for Gitea pages"
homepage = "https://github.com/go-gitea/theme"
min_version = 0.17

[author]
name = "The Gitea Authors"


Loading…
Cancel
Save