Skip to content

Commit

Permalink
margin and wiki tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Aug 2, 2022
1 parent 6066d19 commit 19c3b2e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 26 deletions.
4 changes: 2 additions & 2 deletions templates/repo/commits.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/sub_menu" .}}
<div class="flex-button-row df ac sb fw mb-4 mt-3">
<div class="df ac mt-2">
<div class="repo-button-row df ac sb fw mb-4 mt-3">
<div class="df ac">
{{template "repo/branch_dropdown" dict "root" .}}
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
<span class="text">
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
</div>
{{end}}
{{template "repo/sub_menu" .}}
<div class="flex-button-row df ac sb fw">
<div class="df ac mt-3">
<div class="repo-button-row df ac sb fw">
<div class="df ac">
{{template "repo/branch_dropdown" dict "root" .}}
{{ $n := len .TreeNames}}
{{ $l := Subtract $n 1}}
Expand Down Expand Up @@ -105,7 +105,7 @@
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
{{end}}
</div>
<div class="df ac mt-3">
<div class="df ac">
{{if eq $n 0}}
{{if .Repository.IsTemplate}}
<div class="ui tiny primary buttons">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/sub_menu.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }} repository-summary-language-stats{{end}} my-2">
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }} repository-summary-language-stats{{end}} mt-2 mb-0">
<div class="ui segment sub-menu repository-menu">
<div class="ui two horizontal center link list">
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/wiki/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{{template "repo/header" .}}
{{ $title := .title}}
<div class="ui container">
<div class="flex-button-row df ac sb fw">
<div class="df ac mt-2">
<div class="repo-button-row df ac sb fw">
<div class="df ac">
<div class="choose page">
<div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
Expand All @@ -28,7 +28,7 @@
</div>
</div>
</div>
<div class="df ac mt-2">
<div class="df ac">
<div class="ui action small input" id="clone-panel">
{{template "repo/clone_buttons" .}}
{{template "repo/clone_script" .}}
Expand Down
13 changes: 0 additions & 13 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -2216,16 +2216,3 @@ table th[data-sortt-desc] {
.color-text-light-2 {
color: var(--color-text-light-2);
}

.flex-button-row {
margin-bottom: 10px;
}

.flex-button-row .button {
padding: 6px 10px !important;
height: 30px;
}

.flex-button-row input {
height: 30px;
}
35 changes: 31 additions & 4 deletions web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -2063,10 +2063,6 @@
}

&.view {
.choose.page {
margin-top: -5px;
}

> .markup {
padding: 15px 30px;

Expand All @@ -2093,6 +2089,12 @@
margin-bottom: 2px;
}
}

@media @mediaSm {
#clone-panel #repo-clone-url {
width: 160px;
}
}
}

&.settings {
Expand Down Expand Up @@ -2783,6 +2785,31 @@
line-height: 1.3em; // there is a `font-size: 1.25em` for inside emoji, so here the line-height needs to be larger slightly
}

.repo-button-row {
margin-bottom: 10px;
}

.repo-button-row > * {
margin-top: 10px;
}

.wiki .repo-button-row {
margin-bottom: 0;
}

.wiki .repo-button-row > * {
margin-top: 0;
}

.repo-button-row .button {
padding: 6px 10px !important;
height: 30px;
}

.repo-button-row input {
height: 30px;
}

tbody.commit-list {
vertical-align: baseline;
}
Expand Down

0 comments on commit 19c3b2e

Please sign in to comment.