···
{{ $patches := .AsFormatPatch }}
67
-
{{ range $patches }}
68
-
<div class="rounded ml-20 drop-shadow-sm bg-white dark:bg-gray-800 dark:text-white w-fit md:max-w-3/5 flex flex-col gap-2 mt-2 relative">
69
-
<div id="commit-{{.SHA}}" class="py-2 px-2 relative w-full md:max-w-3/5 md:w-fit flex flex-col">
70
-
<div class="flex items-center justify-between gap-2">
71
-
<div class="mr-4 flex items-center justify-start">
72
-
{{ i "git-commit-horizontal" "w-4 h-4 mr-1.5" }}
73
-
<span>{{ .Title }}</span>
67
+
{{ $round := .RoundNumber }}
68
+
<details class="group py-2 md:ml-[3.5rem] text-gray-500 dark:text-gray-400 flex flex-col gap-2 relative text-sm">
69
+
<summary class="py-1 list-none cursor-pointer hover:text-gray-500 hover:dark:text-gray-400">
71
+
{{ if eq (len $patches) 1 }}
74
+
<div class="group-open:hidden flex items-center gap-2 ml-2">
75
+
{{ i "chevrons-up-down" "w-4 h-4" }} expand {{ len $patches }} commit{{$s}}
77
+
<div class="hidden group-open:flex items-center gap-2 ml-2">
78
+
{{ i "chevrons-down-up" "w-4 h-4" }} hide {{ len $patches }} commit{{$s}}
81
+
{{ range $patches }}
82
+
<div id="commit-{{.SHA}}" class="py-1 px-2 relative w-full md:max-w-3/5 md:w-fit flex flex-col">
83
+
<div class="flex items-center gap-2">
84
+
{{ i "git-commit-horizontal" "w-4 h-4" }}
85
+
<div class="text-sm text-gray-500 dark:text-gray-400">
86
+
{{ if not $.Pull.IsPatchBased }}
87
+
{{ $fullRepo := $.RepoInfo.FullName }}
88
+
{{ if not $.Pull.IsBranchBased }}
89
+
{{ $fullRepo = printf "%s/%s" $owner $.PullSourceRepo.Name }}
91
+
<a href="/{{ $fullRepo }}/commit/{{ .SHA }}" class="font-mono text-gray-500 dark:text-gray-400">{{ slice .SHA 0 8 }}</a>
93
+
<span class="font-mono">{{ slice .SHA 0 8 }}</span>
96
+
<div class="flex items-center">
97
+
<span>{{ .Title }}</span>
98
+
{{ if gt (len .Body) 0 }}
100
+
class="py-1/2 px-1 mx-2 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600"
101
+
hx-on:click="document.getElementById('body-{{$round}}-{{.SHA}}').classList.toggle('hidden')"
103
+
{{ i "ellipsis" "w-3 h-3" }}
{{ if gt (len .Body) 0 }}
76
-
class="py-1/2 px-1 mx-2 bg-gray-200 hover:bg-gray-400 rounded dark:bg-gray-700 dark:hover:bg-gray-600"
77
-
hx-on:click="document.getElementById('body-{{.SHA}}').classList.toggle('hidden')"
79
-
{{ i "ellipsis" "w-3 h-3" }}
109
+
<p id="body-{{$round}}-{{.SHA}}" class="hidden mt-1 text-sm pb-2">
83
-
<div class="text-sm text-gray-500 dark:text-gray-400">
84
-
{{ if not $.Pull.IsPatchBased }}
85
-
{{ $fullRepo := $.RepoInfo.FullName }}
86
-
{{ if not $.Pull.IsBranchBased }}
87
-
{{ $fullRepo = printf "%s/%s" $owner $.PullSourceRepo.Name }}
89
-
<a href="/{{ $fullRepo }}/commit/{{ .SHA }}" class="font-mono">{{ slice .SHA 0 8 }}</a>
91
-
<span class="font-mono">{{ slice .SHA 0 8 }}</span>
95
-
{{ if gt (len .Body) 0 }}
96
-
<p id="body-{{.SHA}}" class="hidden mt-1 text-sm pb-2 dark:text-gray-300">
106
-
<div class="md:pl-12 flex flex-col gap-2 mt-2 relative">
119
+
<div class="md:pl-[3.5rem] flex flex-col gap-2 mt-2 relative">
{{ range $cidx, $c := .Comments }}
<div id="comment-{{$c.ID}}" class="bg-white dark:bg-gray-800 rounded drop-shadow-sm py-2 px-4 relative w-full md:max-w-3/5 md:w-fit">
···
221
+
{{ define "commits" }}