srctree

Gregory Mullen parent 4279a6fb cdbadf77
add toggle button to commit view

inlinesplit
src/endpoints/repos/commits.zig added: 36, removed: 3, total 33
@@ -144,6 +144,8 @@ fn commitHtml(ctx: *Verse.Frame, sha: []const u8, repo_name: []const u8, repo: G
.commit = try commitCtx(ctx.alloc, current, repo_name),
.comments = .{ .thread = thread },
.patch = Diffs.patchStruct(ctx.alloc, &patch, !inline_html) catch return error.Unknown,
.inline_active = if (inline_html) "active" else null,
.split_active = if (inline_html) null else "active",
});
 
ctx.status = .ok;
 
static/main.css added: 36, removed: 3, total 33
@@ -783,6 +783,35 @@ journal {
}
 
 
.toggle {
background: #333;
border-bottom: 1px solid #737373;
border-left: 1px solid black;
border-radius: 6px;
border-right: 1px solid #737373;
border-top: 1px solid black;
display: block;
height: fit-content;
margin: 0 0 0 auto;
padding: 4px 5px;
text-align: right;
white-space: pre;
width: fit-content;
> a {
margin: 2px 0;
padding: 2px 12px;
&.active {
background: #737373;
border-top: 1px solid black;
border-left: 1px solid black;
border-radius: 6px;
border-bottom: 1px solid #737373;
border-right: 1px solid #737373;
}
}
}
 
 
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
 
templates/commit.html added: 36, removed: 3, total 33
@@ -21,6 +21,8 @@
</commit>
</With>
 
<div style="width: 100%"><span class="toggle"><a class="<InlineActive ornull />" href="?inline=true">inline</a><a class="<SplitActive ornull />" href="?inline=false">split</a></span></div>
 
<Build Comments _comment_thread.html />
<diff>
<Build Patch _patch.html />