Code for controlling the lunchpagedetails

This commit is contained in:
Git Version Control 2025-02-14 18:51:19 +01:00
parent 94e782038d
commit ded3137441
3 changed files with 7 additions and 2 deletions

View file

@ -89,6 +89,7 @@ var (
StaticCacheTime time.Duration
EnableGzip bool
LandingPageURL LandingPage
LandingPageDetails bool
UnixSocketPermission uint32
EnablePprof bool
PprofDataPath string
@ -360,9 +361,10 @@ func loadServerFrom(rootCfg ConfigProvider) {
LandingPageURL = LandingPageOrganizations
case "login":
LandingPageURL = LandingPageLogin
case "", "home":
case "", "home", "nodetails":
LandingPageURL = LandingPageHome
default:
LandingPageURL = LandingPage(landingPage)
}
LandingPageDetails = (landingPage != "nodetails")
}

View file

@ -59,6 +59,7 @@ func Home(ctx *context.Context) {
return
}
ctx.Data["LandingPageDetails"] = setting.LandingPageDetails
ctx.Data["PageIsHome"] = true
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled

View file

@ -11,6 +11,8 @@
</div>
</div>
</div>
{{template "home_forgejo" .}}
{{if .LandingPageDetails}}
{{template "home_forgejo" .}}
{{end}}
</div>
{{template "base/footer" .}}