Skip to content

Commit 073c593

Browse files
committed
revert
1 parent 98157ad commit 073c593

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

modules/templates/util_date.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ func NewDateUtils() *DateUtils {
2020
return (*DateUtils)(nil) // the util is stateless, and we do not need to create an instance
2121
}
2222

23-
func (du *DateUtils) DaysInterval(t1, t2 time.Time) int {
24-
t1 = time.Date(t1.Year(), t1.Month(), t1.Day(), 0, 0, 0, 0, t1.Location())
25-
t2 = time.Date(t2.Year(), t2.Month(), t2.Day(), 0, 0, 0, 0, t2.Location())
26-
return int(t2.Sub(t1).Hours() / 24)
27-
}
28-
2923
// AbsoluteShort renders in "Jan 01, 2006" format
3024
func (du *DateUtils) AbsoluteShort(time any) template.HTML {
3125
return dateTimeFormat("short", time)

templates/repo/commits_list.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@
1111
</thead>
1212
<tbody class="commit-list">
1313
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
14-
{{$groupDate := DateUtils.ParseLegacy ""}}
1514
{{range .Commits}}
16-
{{$commitDate := ""}}{{if .Committer}}{{$commitDate = .Committer.When}}{{else}}{{$commitDate = .Author.When}}{{end}}
17-
{{if ne (DateUtils.DaysInterval $groupDate $commitDate) 0}}
18-
{{$groupDate = $commitDate}}
19-
<tr class="header"><td colspan="5">Commits on {{DateUtils.AbsoluteShort $groupDate}}</td></tr>
20-
{{end}}
2115
<tr>
2216
<td class="author">
2317
<div class="tw-flex">

web_src/css/repo.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -916,11 +916,7 @@ td .commit-summary {
916916
width: 200px;
917917
}
918918

919-
.repository #commits-table.ui.basic.striped.table tbody tr {
920-
background-color: inherit !important;
921-
}
922-
923-
.repository #commits-table.ui.basic.striped.table tbody tr:not(.header):nth-child(2n) {
919+
.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) {
924920
background-color: var(--color-light) !important;
925921
}
926922

0 commit comments

Comments
 (0)