forked from forgejo/forgejo
#1080: Remove footer ads/branding from default template
This commit is contained in:
parent
ade343f6dc
commit
2bb982dada
10 changed files with 23 additions and 8 deletions
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"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue