mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-04-21 15:26:42 +02:00
Code for controlling the lunchpagedetails
This commit is contained in:
parent
94e782038d
commit
ded3137441
3 changed files with 7 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "home_forgejo" .}}
|
||||
{{if .LandingPageDetails}}
|
||||
{{template "home_forgejo" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
Loading…
Add table
Reference in a new issue