You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
594 B

10 years ago
10 years ago
10 years ago
10 years ago
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package routers
  5. import (
  6. "github.com/martini-contrib/render"
  7. "github.com/martini-contrib/sessions"
  8. "github.com/gogits/gogs/modules/auth"
  9. "github.com/gogits/gogs/modules/base"
  10. "github.com/gogits/gogs/routers/user"
  11. )
  12. func Home(r render.Render, data base.TmplData, session sessions.Session) {
  13. if auth.IsSignedIn(session) {
  14. user.Dashboard(r, data, session)
  15. return
  16. }
  17. data["PageIsHome"] = true
  18. r.HTML(200, "home", data)
  19. }