Skip to content

Commit

Permalink
no need to use the legacy "repo-button-row" tricks since there is onl…
Browse files Browse the repository at this point in the history
…y one "clone" button
  • Loading branch information
wxiaoguang committed Dec 11, 2024
1 parent f21728b commit cc18d8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
3 changes: 1 addition & 2 deletions templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@
{{end}}
</div>

{{/* by default, the row-right flex grows, but on non-root tree path, it should not because the row-left might contain a long path */}}
<div class="repo-button-row-right {{if not $isTreePathRoot}}tw-flex-grow-0{{end}}">
<div class="repo-button-row-right">
<!-- Only show clone panel in repository home page -->
{{if $isTreePathRoot}}
{{template "repo/clone_panel" .}}
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/wiki/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{$title := .title}}
<div class="ui container">
<div class="repo-button-row">
<div class="tw-flex tw-items-center">
<div class="flex-text-block tw-flex-1">
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}">
<div class="ui basic small button">
<span class="text">
Expand Down Expand Up @@ -42,7 +42,7 @@
</div>
</div>
</div>
<div class="flex-text-block tw-flex-wrap tw-justify-end">
<div class="repo-button-row">
{{if .EscapeStatus.Escaped}}
<a class="ui small button unescape-button tw-m-0 tw-hidden">{{ctx.Locale.Tr "repo.unescape_control_characters"}}</a>
<a class="ui small button escape-button tw-m-0">{{ctx.Locale.Tr "repo.escape_control_characters"}}</a>
Expand Down
24 changes: 3 additions & 21 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1662,26 +1662,18 @@ td .commit-summary {
display: flex;
align-items: center;
gap: 8px;
justify-content: space-between;
flex-wrap: wrap;
}

.repo-button-row-left,
.repo-button-row-right {
display: flex;
flex: 1;
align-items: center;
gap: 0.5rem;
}

.repo-button-row-right {
justify-content: flex-end;
}

@media (max-width: 1200px) {
.repository:not(.wiki) .repo-button-row {
flex-direction: column;
align-items: stretch;
}
.repo-button-row-left {
flex: 1;
}

.repo-button-row .button {
Expand All @@ -1695,16 +1687,6 @@ td .commit-summary {
padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */
}

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

@media (max-width: 600px) {
.repo-button-row-left {
flex-wrap: wrap;
}
}

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

0 comments on commit cc18d8d

Please sign in to comment.