Fix a few rendering issues

924b4f0d8f4f02614db393df23eb15c5bc49e372
Alexis Sellier committed ago 1 parent 4629f71d
git_cli.go +2 -2
309 309
310 310
	// Check if this is a root commit (no parents)
311 311
	parentOut, perr := g.cmd("rev-parse", hash+"^")
312 312
	if perr != nil {
313 313
		// Root commit: diff against empty tree
314 -
		out, err = g.cmd("diff-tree", "-p", "--no-commit-id", "--root", hash)
314 +
		out, err = g.cmd("diff-tree", "-p", "--no-commit-id", "--root", "-U1000000", hash)
315 315
	} else {
316 316
		parent := strings.TrimSpace(parentOut)
317 -
		out, err = g.cmd("diff", parent, hash)
317 +
		out, err = g.cmd("diff", "-U1000000", parent, hash)
318 318
	}
319 319
	if err != nil {
320 320
		return nil, err
321 321
	}
322 322
+0 -0
static/style.css +7 -7
138 138
  border-radius: 4px 4px 0 0;
139 139
  background: var(--bg);
140 140
}
141 141
.tab.tab-mono {
142 142
  font-family: var(--mono);
143 -
  font-size: 1rem;
143 +
  font-size: 0.875rem;
144 144
}
145 145
.repo-nav .tab:first-of-type { margin-left: auto; }
146 146
.nav-auth {
147 147
  display: flex;
148 148
  align-items: center;
856 856
  color: var(--fg-dim);
857 857
  text-align: left;
858 858
  width: 1%;
859 859
}
860 860
861 -
.comment {
861 +
.discussion-comment {
862 862
  border: 1px solid var(--border);
863 863
  border-radius: 4px;
864 864
  margin-bottom: 1rem;
865 865
}
866 866
.topic-title {
867 867
  font-size: 1.125rem;
868 868
  font-weight: 600;
869 869
  margin: 1rem 0;
870 870
}
871 -
.comment-header {
871 +
.discussion-comment-header {
872 872
  display: flex;
873 873
  align-items: center;
874 874
  padding: 0.75rem 0.75rem 0.5rem;
875 875
  font-size: 1rem;
876 876
  color: var(--fg);
877 877
}
878 -
.comment-date {
878 +
.discussion-comment-date {
879 879
  font-size: 1rem;
880 880
  color: var(--fg-dim);
881 881
  white-space: nowrap;
882 882
  margin-left: 0.25rem;
883 883
}
884 -
.comment-author {
884 +
.discussion-comment-author {
885 885
  display: inline-flex;
886 886
  align-items: center;
887 887
  gap: 0.25rem;
888 888
}
889 -
.comment-author a {
889 +
.discussion-comment-author a {
890 890
  color: var(--fg);
891 891
  text-decoration: none;
892 892
  font-weight: 600;
893 893
}
894 -
.comment-author a:hover {
894 +
.discussion-comment-author a:hover {
895 895
  text-decoration: underline;
896 896
}
897 897
898 898
.post-body {
899 899
  padding: 0.25rem 0.75rem 0.75rem;
templates/discussion.html +6 -6
1 1
{{define "content"}}
2 2
{{$dpath := discussionPath .BaseURL .Repo}}
3 3
<h2 class="topic-title">{{.Data.Discussion.Title}}</h2>
4 4
5 -
<div class="comment">
6 -
  <div class="comment-header">
7 -
    <span class="comment-author">{{if .Data.Discussion.Avatar}}<img class="avatar" src="{{.Data.Discussion.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Data.Discussion.Author}}">{{.Data.Discussion.Author}}</a> <span class="comment-date">{{timeAgo .Data.Discussion.CreatedAt}} ago</span></span>
5 +
<div class="discussion-comment">
6 +
  <div class="discussion-comment-header">
7 +
    <span class="discussion-comment-author">{{if .Data.Discussion.Avatar}}<img class="avatar" src="{{.Data.Discussion.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Data.Discussion.Author}}">{{.Data.Discussion.Author}}</a> <span class="discussion-comment-date">{{timeAgo .Data.Discussion.CreatedAt}} ago</span></span>
8 8
  </div>
9 9
  {{if .Data.Discussion.Body}}<div class="post-body">{{formatBody .Data.Discussion.Body}}</div>{{end}}
10 10
</div>
11 11
12 12
{{range .Data.Replies}}
13 -
<div class="comment" id="reply-{{.ID}}">
14 -
  <div class="comment-header">
15 -
    <span class="comment-author">{{if .Avatar}}<img class="avatar" src="{{.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Author}}">{{.Author}}</a> <span class="comment-date">{{timeAgo .CreatedAt}} ago</span></span>
13 +
<div class="discussion-comment" id="reply-{{.ID}}">
14 +
  <div class="discussion-comment-header">
15 +
    <span class="discussion-comment-author">{{if .Avatar}}<img class="avatar" src="{{.Avatar}}" alt="" width="20" height="20"> {{end}}<a href="https://bsky.app/profile/{{.Author}}">{{.Author}}</a> <span class="discussion-comment-date">{{timeAgo .CreatedAt}} ago</span></span>
16 16
  </div>
17 17
  <div class="post-body">{{formatBody .Body}}</div>
18 18
</div>
19 19
{{end}}
20 20