From 314664892c42741e2ff905bead8b7e8105aecaca Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 2 Dec 2015 23:48:36 +0100 Subject: [PATCH] UI: Keep repo URL action right of ref combo & path Just use secondary menu instead custom ".head.meta", which simplifies code. Also do not display repo URL action when we are in subdirectory or viewing a file. --- public/css/gogs.css | 14 ---- public/less/_repository.less | 16 ---- templates/repo/home.tmpl | 155 +++++++++++++++++------------------ 3 files changed, 75 insertions(+), 110 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index eba8454a1c..eb6188b37f 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1854,20 +1854,6 @@ footer .container .links > *:first-child { .repository.file.list .choose.reference .header .icon { font-size: 1.4em; } -.repository.file.list .head.meta { - padding: 0; -} -.repository.file.list .head.meta li { - list-style: none; - display: inline-block; -} -.repository.file.list .head.meta li .ui.breadcrumb { - margin-top: -5px; -} -.repository.file.list .head.meta li .ui.breadcrumb span, -.repository.file.list .head.meta li .ui.breadcrumb a { - font-size: 16px; -} .repository.file.list #repo-files-table thead th { padding-top: 8px; padding-bottom: 5px; diff --git a/public/less/_repository.less b/public/less/_repository.less index 7f66948c42..25a71078e1 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -139,22 +139,6 @@ font-size: 1.4em; } } - .head.meta { - padding: 0; - li { - list-style: none; - display: inline-block; - - .ui.breadcrumb { - margin-top: -5px; - - span, - a { - font-size: 16px; - } - } - } - } #repo-files-table { thead { diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 61387f8e13..85094104bf 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -3,14 +3,81 @@ {{template "repo/header" .}} {{template "repo/sidebar" .}}
-
-
-

- {{if .Repository.DescriptionHtml}}{{.Repository.DescriptionHtml}}{{else}}{{.i18n.Tr "repo.no_desc"}}{{end}} - {{.Repository.Website}} -

+

+ {{if .Repository.DescriptionHtml}}{{.Repository.DescriptionHtml}}{{else}}{{.i18n.Tr "repo.no_desc"}}{{end}} + {{.Repository.Website}} +

+ - -
    - {{if and .IsRepositoryAdmin .Repository.BaseRepo}} -
  • - {{ $baseRepo := .Repository.BaseRepo}} - - - -
  • {{end}} -
  • -
    - -
    -
  • -
  • - -
  • -
+
{{if .IsFile}} {{template "repo/view_file" .}} {{else}}