From 41f8ef8af5607ecbc0fb19f9b2df7b8d537d7659 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 3 May 2024 03:38:37 +0800 Subject: [PATCH] Improve repo button row layout (#30668) (#30839) Backport #30668 by @silverwind Since there is now a second `` in the repo buttons, we can make a better-looking layout with no empty space, except on mobile. Also I fixed one bug with focus border on clone panel. ## Large Screenshot 2024-04-23 at 22 25 22 ## Medium Screenshot 2024-04-23 at 22 25 34 ## Mobile Screenshot 2024-04-23 at 22 25 52 Co-authored-by: silverwind --- templates/repo/clone_buttons.tmpl | 2 +- templates/repo/home.tmpl | 12 +++---- web_src/css/modules/input.css | 4 +-- web_src/css/repo.css | 53 +++++++++++++++++++++++++------ 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/templates/repo/clone_buttons.tmpl b/templates/repo/clone_buttons.tmpl index 89daba9dc..91952c8a0 100644 --- a/templates/repo/clone_buttons.tmpl +++ b/templates/repo/clone_buttons.tmpl @@ -9,7 +9,7 @@ SSH {{end}} - + diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index eb9eb9c14..6df9f7d72 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -46,7 +46,7 @@ {{$l := Eval $n "-" 1}} {{$isHomepage := (eq $n 0)}}
-
+
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} {{$cmpBranch := ""}} @@ -66,7 +66,7 @@ {{end}} {{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}} -