diff options
author | Unknwon <u@gogs.io> | 2015-12-02 20:26:48 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-02 20:26:48 -0500 |
commit | c4bab163cb1d28385cd18ba0d58c9a3e3b237361 (patch) | |
tree | d77e573dca1f359a802645e5941c01e0751688f4 | |
parent | 3d3498bda17ce35d38f7e06ce63f6a62dd5a894e (diff) | |
parent | 0068b8106ba1c3dbe79bf6dfff79be470e950f4a (diff) | |
download | gitea-c4bab163cb1d28385cd18ba0d58c9a3e3b237361.tar.gz gitea-c4bab163cb1d28385cd18ba0d58c9a3e3b237361.zip |
Merge pull request #2088 from nanoant/patch/further-layout-fixes
Further layout fixes
26 files changed, 41 insertions, 62 deletions
diff --git a/cmd/web.go b/cmd/web.go index da392a1e98..3fc39628bf 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -514,11 +514,11 @@ func runWeb(ctx *cli.Context) { m.Get("/edit/:tagname", repo.EditRelease) m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost) m.Post("/delete", repo.DeleteRelease) - }, reqRepoAdmin, middleware.RepoRef()) + }, reqRepoAdmin) m.Combo("/compare/*").Get(repo.CompareAndPullRequest). Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) - }, reqSignIn, middleware.RepoAssignment()) + }, reqSignIn, middleware.RepoAssignment(), middleware.RepoRef()) m.Group("/:username/:reponame", func() { m.Group("", func() { diff --git a/public/css/gogs.css b/public/css/gogs.css index 1c5a29b251..ae1b888040 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -5,9 +5,7 @@ font-style: normal; } .octicon, -.mega-octicon, -.icon.octicon, -.icon.mega-octicon { +.mega-octicon { font: normal normal normal 16px/1 octicons; display: inline-block; text-decoration: none; @@ -1052,6 +1050,7 @@ footer .container .links > *:first-child { .octicon.icon, .mega-octicon.icon { font-family: octicons; + font-size: 16px; opacity: 1 !important; } .sr-only { diff --git a/public/less/_base.less b/public/less/_base.less index 77ed754518..fd12c80b2b 100644 --- a/public/less/_base.less +++ b/public/less/_base.less @@ -313,9 +313,11 @@ footer { .generate-img(@n, (@i + 1)); } +// ensure Semantic UI .icon font family and 14px size does not apply to .icon.octicon .octicon.icon, .mega-octicon.icon { font-family: octicons; + font-size: 16px; opacity: 1 !important; } diff --git a/public/less/_octicons.less b/public/less/_octicons.less index a159dec851..dfd437e6b1 100755 --- a/public/less/_octicons.less +++ b/public/less/_octicons.less @@ -14,9 +14,7 @@ // .octicon is optimized for 16px. // .mega-octicon is optimized for 32px but can be used larger. -.octicon, .mega-octicon, -// ensure Semantic UI .icon of 14px does not apply to .icon.octicon: -.icon.octicon, .icon.mega-octicon { +.octicon, .mega-octicon { font: normal normal normal 16px/1 octicons; display: inline-block; text-decoration: none; diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index 03a07935c8..07762606fa 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository commits"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> {{template "repo/commits_table" .}} </div> diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl index f541cd0a84..91085b9d22 100644 --- a/templates/repo/forks.tmpl +++ b/templates/repo/forks.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository forks"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <h2 class="ui dividing header"> {{.i18n.Tr "repo.forks"}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 10455db516..d345c566b9 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -45,3 +45,37 @@ </div><!-- end grid --> </div><!-- end container --> {{end}} +{{if not .IsBareRepo}} +<div class="ui tabs container"> + <div class="ui tabular menu navbar"> + <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> + <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} + </a> + <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> + <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if eq 0 .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span> + </a> + <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> + <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if eq 0 .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> + </a> + <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"> + <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if eq 0 .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span> + </a> + <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> + <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if eq 0 .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span> + </a> + <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki"> + <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}} + </a> + {{if .IsRepositoryAdmin}} + <div class="right menu"> + <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings"> + <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}} + </a> + </div> + {{end}} + </div> +</div> +<div class="ui tabs divider"></div> +{{else}} +<div class="ui divider"></div> +{{end}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 85094104bf..b733583b0a 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository file list"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <p id="repo-desc"> {{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}} diff --git a/templates/repo/issue/labels.tmpl b/templates/repo/issue/labels.tmpl index f955973c6d..dd84ce416c 100644 --- a/templates/repo/issue/labels.tmpl +++ b/templates/repo/issue/labels.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository labels"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="navbar"> {{template "repo/issue/navbar" .}} diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index b927d80063..5b1ad1d026 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="navbar"> {{template "repo/issue/navbar" .}} diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index 527a90b4d4..248b81e242 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository milestones"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="navbar"> {{template "repo/issue/navbar" .}} diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 5c3aaae7ff..5970bda3d2 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository release"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> {{template "base/alert" .}} <h2 class="ui header"> diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index fcf030314a..7129cf6b56 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository new release"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <h2 class="ui dividing header"> {{if .PageIsEditRelease}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 0fdd397038..651c453cd5 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings collaboration"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index e0391b0598..5406d0433d 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/githook_edit.tmpl b/templates/repo/settings/githook_edit.tmpl index f5e80616c1..b9b75a3aa6 100644 --- a/templates/repo/settings/githook_edit.tmpl +++ b/templates/repo/settings/githook_edit.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings edit githook"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 910d750559..8120b80e17 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings githooks"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/hook_new.tmpl b/templates/repo/settings/hook_new.tmpl index 1e0fdd22be..7c9a5de1f0 100644 --- a/templates/repo/settings/hook_new.tmpl +++ b/templates/repo/settings/hook_new.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings new webhook"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/hooks.tmpl b/templates/repo/settings/hooks.tmpl index eea165fa8b..e3f6f4ddae 100644 --- a/templates/repo/settings/hooks.tmpl +++ b/templates/repo/settings/hooks.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings webhooks"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index b14b223319..474d719eb7 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository settings options"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> {{template "repo/settings/navbar" .}} diff --git a/templates/repo/sidebar.tmpl b/templates/repo/sidebar.tmpl deleted file mode 100644 index e00fa3bcfd..0000000000 --- a/templates/repo/sidebar.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -{{if not .IsBareRepo}} -<div class="ui tabs container"> - <div class="ui tabular menu navbar"> - <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> - <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} - </a> - <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> - <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if eq 0 .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span> - </a> - <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> - <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if eq 0 .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> - </a> - <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"> - <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if eq 0 .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span> - </a> - <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> - <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if eq 0 .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span> - </a> - <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki"> - <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}} - </a> - {{if .IsRepositoryAdmin}} - <div class="right menu"> - <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings"> - <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}} - </a> - </div> - {{end}} - </div> -</div> -<div class="ui tabs divider"></div> -{{else}} -<div class="ui divider"></div> -{{end}}
\ No newline at end of file diff --git a/templates/repo/watchers.tmpl b/templates/repo/watchers.tmpl index 0ad6f58bf3..7802cea324 100644 --- a/templates/repo/watchers.tmpl +++ b/templates/repo/watchers.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository watchers"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <h2 class="ui dividing header"> {{if .PageIsWatchers}} diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index be7a357fe1..09c33415ba 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository wiki new"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> {{template "base/alert" .}} <div class="ui header"> diff --git a/templates/repo/wiki/pages.tmpl b/templates/repo/wiki/pages.tmpl index f8bff23221..468357a63f 100644 --- a/templates/repo/wiki/pages.tmpl +++ b/templates/repo/wiki/pages.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository wiki pages"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui header"> {{.i18n.Tr "repo.wiki.pages"}} diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl index 641822ddf3..babc329336 100644 --- a/templates/repo/wiki/start.tmpl +++ b/templates/repo/wiki/start.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository wiki start"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui center segment"> <span class="mega-octicon octicon-book"></span> diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index bfd0a8b601..c052bedb7d 100644 --- a/templates/repo/wiki/view.tmpl +++ b/templates/repo/wiki/view.tmpl @@ -1,7 +1,6 @@ {{template "base/head" .}} <div class="repository wiki view"> {{template "repo/header" .}} - {{template "repo/sidebar" .}} <div class="ui container"> <div class="ui grid"> <div class="ui ten wide column"> |