From 92a6058e29eb5f9cd655c3b1f8f43fd6d46fe5a4 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Mon, 24 Mar 2014 23:53:26 +0800 Subject: zip download button, repo single file buttons --- public/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public') diff --git a/public/js/app.js b/public/js/app.js index 9a58a6f2..f98fd03f 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -291,7 +291,7 @@ function initRepository() { $clone.find('button[data-link]').on("click",function (e) { var $this = $(this); if (!$this.hasClass('btn-primary')) { - $clone.find('.btn-primary').removeClass('btn-primary').addClass("btn-default"); + $clone.find('.input-group-btn .btn-primary').removeClass('btn-primary').addClass("btn-default"); $(this).addClass('btn-primary').removeClass('btn-default'); $url.val($this.data("link")); $clone.find('span.clone-url').text($this.data('link')); -- cgit v1.2.3 From 79633ab1fbb823ca2f6267e99bb8912ce227d293 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Tue, 25 Mar 2014 00:09:58 +0800 Subject: file size and file raw style update --- public/css/gogs.css | 6 ++++++ templates/repo/single_file.tmpl | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'public') diff --git a/public/css/gogs.css b/public/css/gogs.css index 434af035..8b031d6e 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -676,6 +676,12 @@ html, body { margin: 0 .5em 0 0; } +.file-content .file-head .file-size{ + font-size: 13px; + color: #888; + margin-left: 1em; +} + .file-content .file-body { padding: 30px 30px 50px; border: none; diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index d00bffa9..45586012 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -5,7 +5,7 @@ {{.FileName}} {{else}} - {{.FileName}} {{FileSize .FileSize}} + {{.FileName}} {{FileSize .FileSize}}
Raw @@ -17,7 +17,7 @@
{{if not .FileIsText}} {{else}} {{if .ReadmeExist}} -- cgit v1.2.3 From 7f6126dd04142c23fe5565a4c1f8cd8c93158460 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Tue, 25 Mar 2014 16:51:42 +0800 Subject: install sample page --- modules/base/conf.go | 2 +- public/css/gogs.css | 11 +++++++- routers/install.go | 13 ++++++++++ templates/install.tmpl | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ web.go | 1 + 5 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 routers/install.go create mode 100644 templates/install.tmpl (limited to 'public') diff --git a/modules/base/conf.go b/modules/base/conf.go index d3122a53..90b35476 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -243,7 +243,7 @@ func newNotifyMailService() { } func NewConfigContext() { - var err error + //var err error workDir, err := exeDir() if err != nil { fmt.Printf("Fail to get work directory: %s\n", err) diff --git a/public/css/gogs.css b/public/css/gogs.css index 8b031d6e..2254ef5a 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -224,6 +224,15 @@ html, body { line-height: 30px; } +#gogs-install-card{ + width: 800px; +} + +#gogs-install-card .form-group { + margin-left: 0; + margin-right: 0; +} + .gogs-card .btn { cursor: pointer; margin-right: 1.2em; @@ -676,7 +685,7 @@ html, body { margin: 0 .5em 0 0; } -.file-content .file-head .file-size{ +.file-content .file-head .file-size { font-size: 13px; color: #888; margin-left: 1em; diff --git a/routers/install.go b/routers/install.go new file mode 100644 index 00000000..d7d5159e --- /dev/null +++ b/routers/install.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package routers + +import "github.com/gogits/gogs/modules/middleware" + +func Install(ctx *middleware.Context){ + ctx.Data["PageIsInstall"] = true + ctx.Data["Title"] = "Install" + ctx.HTML(200,"install") +} diff --git a/templates/install.tmpl b/templates/install.tmpl new file mode 100644 index 00000000..a13f2190 --- /dev/null +++ b/templates/install.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +
+
+ {{.CsrfTokenHtml}} +

Install Steps

+
{{.ErrorMsg}}
+

GoGits need MySQL or PostgreSQL server

+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +

Recommend use INNODB engine with utf8_general_ci charset.

+
+
+ +
+
+ +
+
+ +
+ +

General settings for GoGits

+ +
+ +
+ +

The git copy of each repository is saved in this directory.

+
+
+
+ +
+ +

The user has access to visit and run GoGits.

+
+
+
+ +
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/web.go b/web.go index 0747f224..6538c61f 100644 --- a/web.go +++ b/web.go @@ -90,6 +90,7 @@ func runWeb(*cli.Context) { // Routers. m.Get("/", ignSignIn, routers.Home) + m.Get("/install",routers.Install) m.Get("/issues", reqSignIn, user.Issues) m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/stars", reqSignIn, user.Stars) -- cgit v1.2.3