mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-15 18:08:23 -07:00
#1080: Remove footer ads/branding from default template
This commit is contained in:
parent
ade343f6dc
commit
2bb982dada
@ -288,3 +288,6 @@ ARGS =
|
||||
[i18n]
|
||||
LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL
|
||||
NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语,Español,Português,Polski
|
||||
|
||||
[other]
|
||||
SHOW_FOOTER_BRANDING = false
|
2
gogs.go
2
gogs.go
@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.6.0.0320 Beta"
|
||||
const APP_VER = "0.6.0.0323 Beta"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
@ -50,10 +50,10 @@ type Version struct {
|
||||
// If you want to "retire" a migration, remove it from the top of the list and
|
||||
// update _MIN_VER_DB accordingly
|
||||
var migrations = []Migration{
|
||||
NewMigration("generate collaboration from access", accessToCollaboration), // V0 -> V1
|
||||
NewMigration("make authorize 4 if team is owners", ownerTeamUpdate), // V1 -> V2
|
||||
NewMigration("refactor access table to use id's", accessRefactor), // V2 -> V3
|
||||
NewMigration("generate team-repo from team", teamToTeamRepo), // V3 -> V4
|
||||
NewMigration("generate collaboration from access", accessToCollaboration), // V0 -> V1:v0.5.13
|
||||
NewMigration("make authorize 4 if team is owners", ownerTeamUpdate), // V1 -> V2:v0.5.13
|
||||
NewMigration("refactor access table to use id's", accessRefactor), // V2 -> V3:v0.5.13
|
||||
NewMigration("generate team-repo from team", teamToTeamRepo), // V3 -> V4:v0.5.13
|
||||
}
|
||||
|
||||
// Migrate database to current version
|
||||
|
File diff suppressed because one or more lines are too long
@ -209,6 +209,7 @@ func Contexter() macaron.Handler {
|
||||
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + x.GetToken() + `">`)
|
||||
|
||||
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
|
||||
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding
|
||||
|
||||
c.Map(ctx)
|
||||
}
|
||||
|
@ -130,6 +130,9 @@ var (
|
||||
// I18n settings.
|
||||
Langs, Names []string
|
||||
|
||||
// Other settings.
|
||||
ShowFooterBranding bool
|
||||
|
||||
// Global setting objects.
|
||||
Cfg *ini.File
|
||||
CustomPath string // Custom directory path.
|
||||
@ -327,6 +330,8 @@ func NewConfigContext() {
|
||||
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")
|
||||
Names = Cfg.Section("i18n").Key("NAMES").Strings(",")
|
||||
|
||||
ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool()
|
||||
|
||||
HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
0.6.0.0320 Beta
|
||||
0.6.0.0323 Beta
|
@ -5,10 +5,12 @@
|
||||
© 2015 Gogs · {{.i18n.Tr "version"}}: {{AppVer}} · {{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> · {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>
|
||||
</div>
|
||||
<div class="ui right links">
|
||||
{{if .ShowFooterBranding}}
|
||||
<a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
|
||||
<a target="_blank" href="https://twitter.com/gogitservice"><i class="fa fa-twitter"></i><span class="sr-only">Twitter</span></a>
|
||||
<a target="_blank" href="https://plus.google.com/communities/115599856376145964459"><i class="fa fa-google-plus"></i><span class="sr-only">Google Plus</span></a>
|
||||
<a target="_blank" href="http://weibo.com/gogschina"><i class="fa fa-weibo"></i><span class="sr-only">Sina Weibo</span></a>
|
||||
{{end}}
|
||||
<div class="ui language bottom pointing dropdown link item">
|
||||
<i class="world icon"></i>
|
||||
<div class="text">{{.LangName}}</div>
|
||||
|
@ -10,9 +10,11 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{if .ShowFooterBranding}}
|
||||
<div class="col-md-2" style="margin: -5px;">
|
||||
<a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github fa-2x"></i></a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="col-md-4">
|
||||
<p class="desc">
|
||||
|
@ -5,10 +5,12 @@
|
||||
{{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong></p>
|
||||
|
||||
<div class="right" id="footer-links">
|
||||
{{if .ShowFooterBranding}}
|
||||
<a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github-square"></i></a>
|
||||
<a target="_blank" href="https://twitter.com/gogitservice"><i class="fa fa-twitter"></i></a>
|
||||
<a target="_blank" href="https://plus.google.com/communities/115599856376145964459"><i class="fa fa-google-plus"></i></a>
|
||||
<a target="_blank" href="http://weibo.com/gogschina"><i class="fa fa-weibo"></i></a>
|
||||
{{end}}
|
||||
<div id="footer-lang" class="inline drop drop-top">{{.i18n.Tr "language"}}
|
||||
<div class="drop-down">
|
||||
<ul class="menu menu-vertical switching-list">
|
||||
|
Loading…
Reference in New Issue
Block a user