Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make repository file list useable on mobile #19515

Merged
merged 11 commits into from
Apr 28, 2022
10 changes: 8 additions & 2 deletions templates/repo/view_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
</span>
{{end}}
</th>
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When $.i18n.Lang}}{{end}}{{end}}</th>
<th class="text grey right age">
<span class="mobile-align">
Gusted marked this conversation as resolved.
Show resolved Hide resolved
{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When $.i18n.Lang}}{{end}}{{end}}</th>
</span>
Gusted marked this conversation as resolved.
Show resolved Hide resolved
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -87,7 +90,10 @@
{{end}}
</span>
</td>
<td class="text right age three wide">{{if $commit}}{{TimeSince $commit.Committer.When $.i18n.Lang}}{{end}}</td>
<td class="text right age three wide">
<span class="truncate">
{{if $commit}}{{TimeSince $commit.Committer.When $.i18n.Lang}}{{end}}</td>
</span>
Gusted marked this conversation as resolved.
Show resolved Hide resolved
</tr>
{{end}}
</tbody>
Expand Down
28 changes: 28 additions & 0 deletions web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -3237,3 +3237,31 @@ td.blob-excerpt {
transform: scale(105%);
box-shadow: 0 .5rem 1rem var(--color-shadow) !important;
}

@media @mediaSm {
.repository.file.list {
#repo-files-table {
.entry,
.commit-list {
display: flex !important;
padding-top: 4px;
padding-bottom: 4px;

td.age,
th.age {
margin-left: auto !important;
}

td.message,
span.commit-summary {
display: none !important;
}

th .mobile-align {
display: inline-block;
padding-top: 5px;
Gusted marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
}