diff --git a/cmd/web.go b/cmd/web.go index 899b733297..808b03ecde 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -539,10 +539,10 @@ func runWeb(ctx *cli.Context) { m.Group("", func() { m.Get("/releases", repo.Releases) m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues) + m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) m.Get("/labels/", repo.RetrieveLabels, repo.Labels) m.Get("/milestones", repo.Milestones) }, middleware.RepoRef()) - m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) // m.Get("/branches", repo.Branches) diff --git a/models/repo.go b/models/repo.go index 772551db88..b4ad19c069 100644 --- a/models/repo.go +++ b/models/repo.go @@ -350,7 +350,7 @@ func (repo *Repository) SavePatch(index int64, patch []byte) error { return fmt.Errorf("PatchPath: %v", err) } - os.MkdirAll(path.Dir(patchPath), os.ModePerm) + os.MkdirAll(filepath.Dir(patchPath), os.ModePerm) if err = ioutil.WriteFile(patchPath, patch, 0644); err != nil { return fmt.Errorf("WriteFile: %v", err) } diff --git a/public/css/gogs.css b/public/css/gogs.css index ab399f6c68..a926bc4180 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1863,9 +1863,6 @@ footer .container .links > *:first-child { position: relative; width: 325%; } -.repository.file.list #repo-files-table thead th .ui.sha.label { - font-weight: bold; -} .repository.file.list #repo-files-table thead .ui.avatar { margin-bottom: 5px; } @@ -2243,6 +2240,9 @@ footer .container .links > *:first-child { font-size: 13px; padding: 6px 40px 4px 35px; } +.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) { + background-color: rgba(0, 0, 0, 0.02) !important; +} .repository .diff-detail-box { margin: 15px 0; line-height: 30px; @@ -2318,6 +2318,7 @@ footer .container .links > *:first-child { } .repository .diff-file-box .code-diff pre { margin: 0; + font-size: 13px; } .repository .diff-file-box .code-diff .lines-num { border-right: 1px solid #d4d4d5; diff --git a/public/js/gogs.js b/public/js/gogs.js index 93af48e37b..489b6996d6 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -938,7 +938,7 @@ $(window).load(function () { } // Code view. - if ($('.code-view').length > 0) { + if ($('.code-view .linenums').length > 0) { var $block = $('.code-view .linenums'); var lines = $block.html().split("\n"); $block.html(''); diff --git a/public/less/_repository.less b/public/less/_repository.less index aef608bcac..0490bfa0af 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -152,10 +152,6 @@ position: relative; width: 325%; } - - .ui.sha.label { - font-weight: bold; - } } .ui.avatar { margin-bottom: 5px; @@ -602,6 +598,9 @@ padding: 6px 40px 4px 35px; } } + &.ui.basic.striped.table tbody tr:nth-child(2n) { + background-color: rgba(0, 0, 0, .02)!important; + } } .diff-detail-box { @@ -677,12 +676,14 @@ } .code-diff { font-size: 13px; + td { padding: 0; border-top: none; } pre { margin: 0; + font-size: 13px; } .lines-num { border-right: 1px solid #d4d4d5; diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 35c7a48cc7..f87866bf44 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -36,7 +36,7 @@ {{end}}