Browse Source

css: font-family fixes for Chinese

pull/4300/merge
Unknwon 8 years ago
parent
commit
9c1620d49c
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      README_ZH.md
  2. 10
      public/css/gogs.css
  3. 6
      public/less/_base.less
  4. 4
      templates/org/home.tmpl
  5. 4
      templates/user/auth/signup.tmpl
  6. 12
      templates/user/dashboard/dashboard.tmpl

2
README_ZH.md

@ -9,7 +9,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 项目概览 ## 项目概览
- 有关基本用法和变更日志,请通过 [使用手册](https://gogs.io/docs/intro/) 查看。 - 有关基本用法和变更日志,请通过 [使用手册](https://gogs.io/docs/intro) 查看。
- 想要先睹为快?直接去 [在线体验](https://try.gogs.io/gogs/gogs) 。 - 想要先睹为快?直接去 [在线体验](https://try.gogs.io/gogs/gogs) 。
- 使用过程中遇到问题?尝试从 [故障排查](https://gogs.io/docs/intro/troubleshooting.html) 页面或 [用户论坛](https://discuss.gogs.io/) 获取帮助。 - 使用过程中遇到问题?尝试从 [故障排查](https://gogs.io/docs/intro/troubleshooting.html) 页面或 [用户论坛](https://discuss.gogs.io/) 获取帮助。
- 希望帮助多国语言界面的翻译吗?请立即访问 [详情页面](https://gogs.io/docs/features/i18n.html)! - 希望帮助多国语言界面的翻译吗?请立即访问 [详情页面](https://gogs.io/docs/features/i18n.html)!

10
public/css/gogs.css

@ -5,10 +5,18 @@
background-size: contain; background-size: contain;
} }
body { body {
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important; font-family: "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
background-color: #fff; background-color: #fff;
overflow-y: scroll; overflow-y: scroll;
} }
h1,
h2,
h3,
h4,
h5,
.ui.header {
font-family: "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
}
img { img {
border-radius: 3px; border-radius: 3px;
} }

6
public/less/_base.less

@ -1,10 +1,14 @@
@footer-margin: 40px; @footer-margin: 40px;
body { body {
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important; font-family: "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
background-color: #fff; background-color: #fff;
overflow-y: scroll; overflow-y: scroll;
} }
h1, h2, h3, h4, h5,
.ui.header {
font-family: "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", SimSun, Arial, Helvetica, sans-serif !important;
}
img { img {
border-radius: 3px; border-radius: 3px;
} }

4
templates/org/home.tmpl

@ -36,14 +36,14 @@
</div> </div>
<div class="ui five wide column"> <div class="ui five wide column">
<h4 class="ui top attached header"> <div class="ui top attached header">
<strong>{{.i18n.Tr "org.people"}}</strong> <strong>{{.i18n.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}} {{if .IsOrganizationMember}}
<div class="ui right"> <div class="ui right">
<a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} <span class="octicon octicon-chevron-right"></span></a> <a class="text grey" href="{{.OrgLink}}/members">{{.Org.NumMembers}} <span class="octicon octicon-chevron-right"></span></a>
</div> </div>
{{end}} {{end}}
</h4> </div>
<div class="ui attached segment members"> <div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}} {{$isMember := .IsOrganizationMember}}
{{range .Members}} {{range .Members}}

4
templates/user/auth/signup.tmpl

@ -5,7 +5,7 @@
<form class="ui form" action="{{.Link}}" method="post"> <form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<h3 class="ui top attached header"> <h3 class="ui top attached header">
{{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}} {{.i18n.Tr "sign_up"}}
</h3> </h3>
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}
@ -45,7 +45,7 @@
</div> </div>
<div class="inline field"> <div class="inline field">
<label></label> <label></label>
<a href="{{AppSubUrl}}/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a> <a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_hepler_msg"}}</a>
</div> </div>
{{end}} {{end}}
</div> </div>

12
templates/user/dashboard/dashboard.tmpl

@ -18,7 +18,7 @@
<a class="item" data-tab="mirrors">{{.i18n.Tr "mirror"}}</a> <a class="item" data-tab="mirrors">{{.i18n.Tr "mirror"}}</a>
</div> </div>
<div class="ui tab active list" data-tab="repos"> <div class="ui tab active list" data-tab="repos">
<h4 class="ui top attached header"> <div class="ui top attached header">
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.RepoCount}}</span> {{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.RepoCount}}</span>
<div class="ui right"> <div class="ui right">
<a class="poping up" href="{{AppSubUrl}}/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center"> <a class="poping up" href="{{AppSubUrl}}/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
@ -26,7 +26,7 @@
<span class="sr-only">{{.i18n.Tr "new_repo"}}</span> <span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
</a> </a>
</div> </div>
</h4> </div>
<div class="ui attached table segment"> <div class="ui attached table segment">
<ul class="repo-owner-name-list"> <ul class="repo-owner-name-list">
{{range .Repos}} {{range .Repos}}
@ -74,7 +74,7 @@
{{if not .ContextUser.IsOrganization}} {{if not .ContextUser.IsOrganization}}
<div class="ui tab list" data-tab="orgs"> <div class="ui tab list" data-tab="orgs">
<h4 class="ui top attached header"> <div class="ui top attached header">
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span> {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
<div class="ui right"> <div class="ui right">
<a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center"> <a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
@ -82,7 +82,7 @@
<span class="sr-only">{{.i18n.Tr "new_org"}}</span> <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
</a> </a>
</div> </div>
</h4> </div>
<div class="ui attached table segment"> <div class="ui attached table segment">
<ul class="repo-owner-name-list"> <ul class="repo-owner-name-list">
{{range .ContextUser.Orgs}} {{range .ContextUser.Orgs}}
@ -102,7 +102,7 @@
{{end}} {{end}}
<div class="ui tab list" data-tab="mirrors"> <div class="ui tab list" data-tab="mirrors">
<h4 class="ui top attached header"> <div class="ui top attached header">
{{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span> {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
<div class="ui right"> <div class="ui right">
<a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center"> <a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center">
@ -110,7 +110,7 @@
<span class="sr-only">{{.i18n.Tr "new_mirror"}}</span> <span class="sr-only">{{.i18n.Tr "new_mirror"}}</span>
</a> </a>
</div> </div>
</h4> </div>
<div class="ui attached table segment"> <div class="ui attached table segment">
<ul class="repo-owner-name-list"> <ul class="repo-owner-name-list">
{{range .Mirrors}} {{range .Mirrors}}

Loading…
Cancel
Save