From 60c65415dd2eb59e695159e111778aaf0661e606 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Tue, 23 Sep 2014 22:28:03 +0800 Subject: pull request page ui review, upgrade octicon icons --- public/ng/less/gogs/issue.less | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'public/ng/less/gogs/issue.less') diff --git a/public/ng/less/gogs/issue.less b/public/ng/less/gogs/issue.less index ae481f0e..a2209bcc 100644 --- a/public/ng/less/gogs/issue.less +++ b/public/ng/less/gogs/issue.less @@ -1,19 +1,15 @@ @import "../ui/var"; - .repo-issue-wrapper { padding: 18px 0; } - .pr-main { padding-right: 40px; box-sizing: border-box; } - .pr-sidebar { border-left: 1px solid #DDD; box-sizing: border-box; } - #pr-sidebar-nav { margin-top: 6px; li { @@ -39,16 +35,16 @@ } } } - .pr-title { .pr-num { font-weight: normal; color: #888; } + padding: 4px 0; } - .pr-meta { color: #888; + padding: 4px 0 8px 0; .pr-author { margin: 0 8px; color: #444; @@ -62,7 +58,6 @@ padding: 4px 6px; } } - .pr-nav { border-bottom: 1px solid #DDD; margin-top: 16px; @@ -89,7 +84,6 @@ } } } - .diff-bar { .diff-add { color: @btnGreenColor; @@ -114,26 +108,22 @@ border-bottom-left-radius: .2em; } } - #pr-commit, #pr-file-diff, #issue-add-comment-preview { display: none; } - #pr-conversation-list { padding-right: 30px; box-sizing: border-box; } - .issue-comment, .issue-commit, .issue-line, .issue-merge, .issue-add-comment { - margin-bottom: 16px; + margin-bottom: 24px; } - .issue-comment { .author-avatar { img { @@ -165,7 +155,6 @@ } } } - .issue-commit { line-height: 32px; i, .author-avatar img { @@ -181,7 +170,6 @@ line-height: 24px; } } - .issue-merge { .ico { width: 40px; @@ -202,7 +190,6 @@ font-size: 13px; } } - .issue-merge-ok { .ico { background-color: #65AD4E; @@ -217,12 +204,10 @@ color: darken(#65AD4E, 10%); } } - .issue-line { height: 4px; background-color: #E6E6E6; } - .issue-add-comment { .panel { margin-left: 60px; @@ -254,9 +239,9 @@ } } } - textarea#issue-add-content { width: 100%; box-sizing: border-box; height: 120px; + resize: vertical; } \ No newline at end of file -- cgit v1.2.3 From 8d5a4cc9eb1c3b22865eed964637a2f5622b6d85 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Tue, 23 Sep 2014 23:36:09 +0800 Subject: pull request ui review, change sidebar --- public/ng/css/gogs.css | 59 +++++++++++++++++++++---------------- public/ng/less/gogs/issue.less | 37 +++++++---------------- public/ng/less/gogs/repository.less | 29 ++++++++++++++++++ templates/repo/pulls.tmpl | 23 +++++---------- templates/repo/sidebar_mini.tmpl | 12 ++++++++ 5 files changed, 92 insertions(+), 68 deletions(-) create mode 100644 templates/repo/sidebar_mini.tmpl (limited to 'public/ng/less/gogs/issue.less') diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 207e349d..b78bd98c 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1076,6 +1076,35 @@ The register and sign-in page style #repo-sidebar-nav i { margin-right: 6px; } +#repo-sidebar-mini { + margin-top: 6px; + width: 60px; +} +#repo-sidebar-mini li { + margin-bottom: 4px; +} +#repo-sidebar-mini li > a { + position: relative; +} +#repo-sidebar-mini li > a > i.octicon { + font-size: 21px; +} +#repo-sidebar-mini .num { + position: absolute; + font-size: 12px; + top: 0; + left: 40px; + width: 20px; + height: 20px; + padding-left: 0; + padding-right: 0; + text-align: center; + line-height: 20px; + border-radius: 4px; + opacity: 0.7; + -webkit-transform: scale(0.85); + font-weight: bold; +} #repo-file-nav { padding: .6em 0 1em 0; } @@ -1575,37 +1604,17 @@ The register and sign-in page style } .repo-issue-wrapper { padding: 18px 0; + position: relative; } .pr-main { - padding-right: 40px; - box-sizing: border-box; + margin-right: 100px; } .pr-sidebar { border-left: 1px solid #DDD; box-sizing: border-box; -} -#pr-sidebar-nav { - margin-top: 6px; -} -#pr-sidebar-nav li { - margin-bottom: 4px; -} -#pr-sidebar-nav li > a { - border: 1px solid transparent; - border-left: none; -} -#pr-sidebar-nav li > a:hover { - background-color: #FFF; - border-color: #DDD; -} -#pr-sidebar-nav .label { - font-size: 12px; - line-height: 1.4em; - margin-top: 1px; -} -#pr-sidebar-nav li.current a { - background-color: #FFF; - border-color: #DDD; + position: absolute; + right: 0; + top: 12px; } .pr-title { padding: 4px 0; diff --git a/public/ng/less/gogs/issue.less b/public/ng/less/gogs/issue.less index a2209bcc..d5ab0817 100644 --- a/public/ng/less/gogs/issue.less +++ b/public/ng/less/gogs/issue.less @@ -1,40 +1,23 @@ @import "../ui/var"; .repo-issue-wrapper { padding: 18px 0; + position: relative; } + +// pull request main content .pr-main { - padding-right: 40px; - box-sizing: border-box; + margin-right: 100px; } + +// right bar in pull request page .pr-sidebar { border-left: 1px solid #DDD; box-sizing: border-box; + position: absolute; + right:0; + top:12px; } -#pr-sidebar-nav { - margin-top: 6px; - li { - margin-bottom: 4px; - } - li > a { - border: 1px solid transparent; - border-left: none; - &:hover { - background-color: #FFF; - border-color: #DDD; - } - } - .label { - font-size: 12px; - line-height: 1.4em; - margin-top: 1px; - } - li.current { - a { - background-color: #FFF; - border-color: #DDD; - } - } -} + .pr-title { .pr-num { font-weight: normal; diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index 0753d11f..973d7bfd 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -126,6 +126,35 @@ margin-right: 6px; } } +#repo-sidebar-mini { + margin-top: 6px; + width: 60px; + li { + margin-bottom: 4px; + } + li > a { + position: relative; + > i.octicon{ + font-size: 21px; + } + } + .num{ + position: absolute; + font-size: 12px; + top:0; + left: 40px; + width: 20px; + height: 20px; + padding-left: 0; + padding-right: 0; + text-align: center; + line-height: 20px; + border-radius: 4px; + opacity: 0.7; + -webkit-transform: scale(0.85); + font-weight: bold; + } +} #repo-file-nav { padding: .6em 0 1em 0; > li > a { diff --git a/templates/repo/pulls.tmpl b/templates/repo/pulls.tmpl index b2444f85..73f218ff 100644 --- a/templates/repo/pulls.tmpl +++ b/templates/repo/pulls.tmpl @@ -3,7 +3,7 @@
{{template "repo/header" .}}
-
+

Fix: Repo Name can not be converted to lower in some cases #256

@@ -16,7 +16,10 @@ Open - eryxwants to merge 2 commits into gogits:master from unknown repository + eryx 2 commits + gogits:master + + unknown repository
@@ -109,20 +112,8 @@
commit
file diff
-
- +
+ {{template "repo/sidebar_mini" .}}
diff --git a/templates/repo/sidebar_mini.tmpl b/templates/repo/sidebar_mini.tmpl new file mode 100644 index 00000000..0da012a1 --- /dev/null +++ b/templates/repo/sidebar_mini.tmpl @@ -0,0 +1,12 @@ + \ No newline at end of file -- cgit v1.2.3 From e3a27aeb25f5de7daaf279ec049830628e2cc3a6 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Sat, 27 Sep 2014 17:31:44 +0800 Subject: template and ui fix --- public/ng/css/gogs.css | 15 ++++-- public/ng/less/gogs/issue.less | 11 +--- public/ng/less/gogs/repository.less | 105 ++++++++++++++++++++---------------- templates/repo/home.tmpl | 6 ++- templates/repo/pulls.tmpl | 2 +- 5 files changed, 76 insertions(+), 63 deletions(-) (limited to 'public/ng/less/gogs/issue.less') diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 7116afc0..2d2ab7f3 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -1059,6 +1059,10 @@ The register and sign-in page style #repo-content { padding: 18px 0; } +.repo-wide-wrapper { + padding: 18px 0; + position: relative; +} #repo-clone-url { border-right: none; width: 190px; @@ -1083,6 +1087,9 @@ The register and sign-in page style #repo-desc { font-size: 1.2em; } +#repo-desc .no-description { + color: #999; +} #repo-sidebar-nav .label { font-size: 12px; line-height: 1.4em; @@ -1461,6 +1468,10 @@ The register and sign-in page style #commits-list { padding-top: 20px; } +#commits-list h4 { + line-height: 30px; + margin-bottom: 0; +} .commit-list th { background-color: #FFF; line-height: 28px !important; @@ -1642,10 +1653,6 @@ The register and sign-in page style #user-ssh-add-form .field { margin-bottom: 24px; } -.repo-issue-wrapper { - padding: 18px 0; - position: relative; -} .pr-main { margin-right: 100px; } diff --git a/public/ng/less/gogs/issue.less b/public/ng/less/gogs/issue.less index d5ab0817..aaeb1af3 100644 --- a/public/ng/less/gogs/issue.less +++ b/public/ng/less/gogs/issue.less @@ -1,23 +1,16 @@ @import "../ui/var"; -.repo-issue-wrapper { - padding: 18px 0; - position: relative; -} - // pull request main content .pr-main { margin-right: 100px; } - // right bar in pull request page .pr-sidebar { border-left: 1px solid #DDD; box-sizing: border-box; position: absolute; - right:0; - top:12px; + right: 0; + top: 12px; } - .pr-title { .pr-num { font-weight: normal; diff --git a/public/ng/less/gogs/repository.less b/public/ng/less/gogs/repository.less index 236271d4..daa8983b 100644 --- a/public/ng/less/gogs/repository.less +++ b/public/ng/less/gogs/repository.less @@ -6,12 +6,12 @@ /* repository main */ #repo-wrapper { - padding-bottom: 100px; + padding-bottom: 100px; } #repo-header { - height: 69px; - border-bottom: 1px solid@repoHeaderBorderColor; - background-color: @repoHeaderBgColor; + height: 69px; + border-bottom: 1px solid@repoHeaderBorderColor; + background-color: @repoHeaderBgColor; } #repo-header-name { line-height: 66px; @@ -91,6 +91,10 @@ #repo-content { padding: 18px 0; } +.repo-wide-wrapper { + padding: 18px 0; + position: relative; +} #repo-clone-url { border-right: none; width: 190px; @@ -114,6 +118,9 @@ } #repo-desc { font-size: 1.2em; + .no-description{ + color: #999; + } } #repo-sidebar-nav { .label { @@ -136,14 +143,14 @@ padding-left: 12px; width: 24px; text-align: center; - > i.octicon{ + > i.octicon { font-size: 21px; } } - .num{ + .num { position: absolute; font-size: 12px; - top:0; + top: 0; left: 36px; padding: 0 2px; min-width: 16px; @@ -197,34 +204,34 @@ box-sizing: border-box; } #repo-branch-tag { - .tab-nav { - border-bottom: 1px solid #EAEAEA; - a { - padding: .3em .8em; - } - .js-tab-nav-show { - background-color: #EEE; - font-weight: bold; - } + .tab-nav { + border-bottom: 1px solid #EAEAEA; + a { + padding: .3em .8em; } - .switching-list { - max-height: 300px; - overflow-y: auto; + .js-tab-nav-show { + background-color: #EEE; + font-weight: bold; } + } + .switching-list { + max-height: 300px; + overflow-y: auto; + } } #repo-branch-list, #repo-tag-list { - li { - i { - margin-right: 12px; - opacity: 0; - } + li { + i { + margin-right: 12px; + opacity: 0; } - li.checked { - i { - opacity: 1; - } + } + li.checked { + i { + opacity: 1; } + } } #repo-bread { .bread { @@ -302,7 +309,7 @@ } } #repo-readme, -#repo-read-file{ +#repo-read-file { margin-bottom: 80px; } #repo-bare-start { @@ -495,25 +502,29 @@ list-style: none; } #commits-list { - padding-top: 20px; + padding-top: 20px; + h4{ + line-height: 30px; + margin-bottom: 0; + } } .commit-list { - th { - background-color: #FFF; - line-height: 28px !important; - } - .date { - width: 120px; - } - .author { - padding-left: 20px; - min-width: 180px; - img { - margin-top: -4px; - } - } - .sha a { - font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace; - font-size: 14px; + th { + background-color: #FFF; + line-height: 28px !important; + } + .date { + width: 120px; + } + .author { + padding-left: 20px; + min-width: 180px; + img { + margin-top: -4px; } + } + .sha a { + font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace; + font-size: 14px; + } } \ No newline at end of file diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index a9d7f304..476277a8 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -4,9 +4,11 @@ {{template "repo/header" .}}
-

+

{{if .Repository.DescriptionHtml}} {{.Repository.DescriptionHtml}} - {{.Repository.Website}} + {{.Repository.Website}}{{else}} + No Description + {{end}}