Browse Source

Fixes pagination width on mobile view (#5711) (#6532)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
tags/v1.9.0-rc1
Mario Lubenka 5 years ago
parent
commit
6e4af4985e
3 changed files with 16 additions and 7 deletions
  1. 1
    1
      public/css/index.css
  2. 9
    0
      public/less/_base.less
  3. 6
    6
      templates/base/paginate.tmpl

+ 1
- 1
public/css/index.css
File diff suppressed because it is too large
View File


+ 9
- 0
public/less/_base.less View File

@@ -510,6 +510,15 @@ pre, code {
.branch-tag-choice {
line-height: 20px;
}

&.pagination.menu {
@media only screen and (max-width:767px) {
.item:not(.active):not(.navigation),
.item.navigation span.navigation_label{
display: none;
}
}
}
}

.file-comment {

+ 6
- 6
templates/base/paginate.tmpl View File

@@ -2,9 +2,9 @@
{{if gt .TotalPages 1}}
<div class="center page buttons">
<div class="ui borderless pagination menu">
<a class="{{if .IsFirst}}disabled{{end}} item" {{if not .IsFirst}}href="{{$.Link}}?sort={{$.SortType}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?sort={{$.SortType}}&page={{.Previous}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
<a class="{{if .IsFirst}}disabled{{end}} item navigation" {{if not .IsFirst}}href="{{$.Link}}?sort={{$.SortType}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}><i class="angle double left icon"></i><span class="navigation_label">&nbsp;{{$.i18n.Tr "admin.first_page"}}</span></a>
<a class="{{if not .HasPrevious}}disabled{{end}} item navigation" {{if .HasPrevious}}href="{{$.Link}}?sort={{$.SortType}}&page={{.Previous}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>
<i class="left arrow icon"></i><span class="navigation_label">&nbsp;{{$.i18n.Tr "repo.issues.previous"}}</span>
</a>
{{range .Pages}}
{{if eq .Num -1}}
@@ -13,10 +13,10 @@
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?sort={{$.SortType}}&page={{.Num}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>{{.Num}}</a>
{{end}}
{{end}}
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?sort={{$.SortType}}&page={{.Next}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>
{{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
<a class="{{if not .HasNext}}disabled{{end}} item navigation" {{if .HasNext}}href="{{$.Link}}?sort={{$.SortType}}&page={{.Next}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>
<span class="navigation_label">{{$.i18n.Tr "repo.issues.next"}}&nbsp;</span><i class="icon right arrow"></i>
</a>
<a class="{{if .IsLast}}disabled{{end}} item" {{if not .IsLast}}href="{{$.Link}}?sort={{$.SortType}}&page={{.TotalPages}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}>{{$.i18n.Tr "admin.last_page"}}&nbsp;<i class="angle double right icon"></i></a>
<a class="{{if .IsLast}}disabled{{end}} item navigation" {{if not .IsLast}}href="{{$.Link}}?sort={{$.SortType}}&page={{.TotalPages}}&q={{$.Keyword}}&tab={{$.TabName}}"{{end}}><span class="navigation_label">{{$.i18n.Tr "admin.last_page"}}&nbsp;</span><i class="angle double right icon"></i></a>
</div>
</div>
{{end}}

Loading…
Cancel
Save