From 4fcbf553aa9b451bc461e09a98711966668e1889 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Sat, 7 Jun 2014 13:27:24 +0800 Subject: [PATCH] organisation main page ui --- cmd/web.go | 5 +++ public/css/gogs.css | 94 +++++++++++++++++++++++++++++++++++++++++- routers/org/org.go | 11 +++++ templates/org/org.tmpl | 85 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 routers/org/org.go create mode 100644 templates/org/org.tmpl diff --git a/cmd/web.go b/cmd/web.go index 30db037a2c..2b14b0778e 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -27,6 +27,7 @@ import ( "github.com/gogits/gogs/routers/admin" "github.com/gogits/gogs/routers/api/v1" "github.com/gogits/gogs/routers/dev" + "github.com/gogits/gogs/routers/org" "github.com/gogits/gogs/routers/repo" "github.com/gogits/gogs/routers/user" ) @@ -186,6 +187,10 @@ func runWeb(*cli.Context) { reqOwner := middleware.RequireOwner() + m.Group("/o", func(r martini.Router) { + r.Get("/:org", org.Organization) + }) + m.Group("/:username/:reponame", func(r martini.Router) { r.Get("/settings", repo.Setting) r.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingPost) diff --git a/public/css/gogs.css b/public/css/gogs.css index 79fd4bf908..09249811a2 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1643,7 +1643,7 @@ html, body { vertical-align: top; } -#label-color-change-ipt2{ +#label-color-change-ipt2 { margin-top: 1px; } @@ -1814,4 +1814,96 @@ html, body { #release-preview { margin: 6px 0; +} + +/* organization */ + +#body-nav.org-nav { + height: 140px; + padding: 16px 0; +} + +.org-nav .org-logo { + margin-right: 16px; + width: 100px; + height: 100px; +} + +.org-nav .org-name { + margin-top: 0; +} + +.org-description { + font-size: 16px; +} + +.org-meta li, .org-meta li a, .org-repo-update, .org-repo-status, .org-team-meta { + color: #888; +} + +.org-meta li { + margin-right: 12px; +} + +.org-meta li a:hover { + text-decoration: underline; +} + +.org-meta .fa { + margin-left: 0; +} + +.org-sidebar { + margin-top: -100px; +} + +.org-panel .panel-heading { + font-size: 18px; +} + +.org-repo-status { + font-family: Verdana, Arial, Helvetica, sans-serif; +} + +.org-repo-item { + border-bottom: 1px solid #DDD; + padding-bottom: 18px; +} + +.org-member img { + width: 60px; + height: 60px; + border-radius: 4px; +} + +.org-member { + display: inline-block; + padding: 2px; +} + +.org-team-name { + font-size: 15px; + margin-bottom: 0; + color: #444; +} + +.org-team { + border-bottom: 1px solid #DDD; + margin-bottom: 12px; +} + +.org-team:last-child { + border: none; +} + +.org-team a { + display: block; +} + +.org-team a:hover { + text-decoration: none; +} + +.org-team a:hover .org-team-name { + color: #0079bc !important; } \ No newline at end of file diff --git a/routers/org/org.go b/routers/org/org.go new file mode 100644 index 0000000000..1c02e77332 --- /dev/null +++ b/routers/org/org.go @@ -0,0 +1,11 @@ +package org + +import ( + "github.com/go-martini/martini" + "github.com/gogits/gogs/modules/middleware" +) + +func Organization(ctx *middleware.Context, params martini.Params) { + ctx.Data["Title"] = "Organization Name" + params["org"] + ctx.HTML(200, "org/org") +} diff --git a/templates/org/org.tmpl b/templates/org/org.tmpl new file mode 100644 index 0000000000..872e50be86 --- /dev/null +++ b/templates/org/org.tmpl @@ -0,0 +1,85 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +
+
+
+ +
+

Organization Name

+

Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.

+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
    +
  • Go
  • +
  • 6
  • +
  • 2
  • +
+
+

gogs

+

Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.

+

Updated 17 hours ago

+
+
+
+
    +
  • Go
  • +
  • 6
  • +
  • 2
  • +
+
+

gogs

+

Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.

+

Updated 17 hours ago

+
+
+
+ +
+
+{{template "base/footer" .}}