From 3eae4ecde76d3196b8fb5c7d4482c74e438d5a87 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 2 Dec 2015 22:40:22 +0100 Subject: [PATCH] UI: Make repository menu divide header and content This is more inline with way GitHub looks like and feels much more natural and in style with rest of the interface. --- public/css/gogs.css | 11 +++++ public/less/_repository.less | 14 ++++++ templates/repo/commits.tmpl | 8 ++-- templates/repo/forks.tmpl | 2 +- templates/repo/header.tmpl | 1 - templates/repo/home.tmpl | 2 +- templates/repo/issue/labels.tmpl | 2 +- templates/repo/issue/list.tmpl | 2 +- templates/repo/issue/milestones.tmpl | 2 +- templates/repo/release/list.tmpl | 2 +- templates/repo/release/new.tmpl | 2 +- templates/repo/settings/collaboration.tmpl | 2 +- templates/repo/settings/deploy_keys.tmpl | 2 +- templates/repo/settings/githook_edit.tmpl | 2 +- templates/repo/settings/githooks.tmpl | 2 +- templates/repo/settings/hook_new.tmpl | 2 +- templates/repo/settings/hooks.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- templates/repo/sidebar.tmpl | 53 ++++++++++++---------- templates/repo/watchers.tmpl | 2 +- templates/repo/wiki/new.tmpl | 4 +- templates/repo/wiki/pages.tmpl | 2 +- templates/repo/wiki/start.tmpl | 2 +- templates/repo/wiki/view.tmpl | 2 +- 24 files changed, 78 insertions(+), 49 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index cd27a674a..eba8454a1 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1815,6 +1815,17 @@ footer .container .links > *:first-child { margin: 1px; padding-right: 0; } +.repository .ui.tabs.container { + margin-top: 14px; + margin-bottom: 0px; +} +.repository .ui.tabs.container .ui.menu { + border-bottom: none; +} +.repository .ui.tabs.divider { + margin-top: 0; + margin-bottom: 20px; +} .repository #clone-panel { margin-top: -8px; width: 100%; diff --git a/public/less/_repository.less b/public/less/_repository.less index ffd432db2..7f66948c4 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -91,6 +91,20 @@ } } + .ui.tabs { + &.container { + margin-top: 14px; + margin-bottom: 0px; + .ui.menu { + border-bottom: none; + } + } + &.divider { + margin-top: 0; + margin-bottom: 20px; + } + } + #clone-panel { margin-top: -8px; width: 100%; diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 769841dee..03a07935c 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -1,9 +1,9 @@ {{template "base/head" .}}
- {{template "repo/header" .}} + {{template "repo/header" .}} + {{template "repo/sidebar" .}}
- {{template "repo/sidebar" .}} - {{template "repo/commits_table" .}} -
+ {{template "repo/commits_table" .}} +
{{template "base/footer" .}} diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl index e3fd90c67..f541cd0a8 100644 --- a/templates/repo/forks.tmpl +++ b/templates/repo/forks.tmpl @@ -1,8 +1,8 @@ {{template "base/head" .}}
{{template "repo/header" .}} + {{template "repo/sidebar" .}}
- {{template "repo/sidebar" .}}

{{.i18n.Tr "repo.forks"}}

diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 06bd49b9c..10455db51 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -44,5 +44,4 @@
-
{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 260f63753..61387f8e1 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -1,8 +1,8 @@ {{template "base/head" .}}
{{template "repo/header" .}} + {{template "repo/sidebar" .}}
- {{template "repo/sidebar" .}}

diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl index f622d1a23..f955973c6 100644 --- a/templates/repo/issue/labels.tmpl +++ b/templates/repo/issue/labels.tmpl @@ -1,8 +1,8 @@ {{template "base/head" .}}

{{template "repo/header" .}} + {{template "repo/sidebar" .}}
- {{template "repo/sidebar" .}}