From 8d5a4cc9eb1c3b22865eed964637a2f5622b6d85 Mon Sep 17 00:00:00 2001 From: fuxiaohei Date: Tue, 23 Sep 2014 23:36:09 +0800 Subject: [PATCH] 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 diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 207e349d5..b78bd98c4 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 a2209bcca..d5ab08176 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 0753d11fb..973d7bfd0 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 b2444f852..73f218ff1 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 000000000..0da012a1d --- /dev/null +++ b/templates/repo/sidebar_mini.tmpl @@ -0,0 +1,12 @@ + \ No newline at end of file