From 214ad4e20f93841eab37410b9b13cca029b3b894 Mon Sep 17 00:00:00 2001 From: Gerben Date: Tue, 20 Mar 2018 20:31:17 +0100 Subject: [PATCH] Reorder repo search/branch-picker/buttons; use dropdown for clone. --- public/custom-style.css | 15 +++- templates/repo/branch_dropdown.tmpl | 15 ++-- templates/repo/home.tmpl | 106 ++++++++++++++-------------- 3 files changed, 77 insertions(+), 59 deletions(-) diff --git a/public/custom-style.css b/public/custom-style.css index 60ed609..d69642c 100644 --- a/public/custom-style.css +++ b/public/custom-style.css @@ -30,4 +30,17 @@ } #repo-desc { font-size: 1.2em; -} \ No newline at end of file +} + +/* Undo gitea's repurposing of left/right for attached objects (e.g. buttons) */ +.ui.left.attached, .ui.right.attached, .ui.left.action { + float: unset; +} + +.clone-grid { + display: grid; + grid-template-columns: 0fr 1fr; + grid-column-gap: 1em; + align-items: center; + text-align: right; +} diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 3935ad5..fa68943 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -1,6 +1,8 @@
+ {{ $showCommitCount := and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}} diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index f13b365..425eac8 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -3,14 +3,18 @@ {{template "repo/header" .}}
{{template "base/alert" .}} -
+
+
+ {{template "repo/branch_dropdown" .}} +
+ {{if .RepoSearchEnabled}} -