srctree

Gregory Mullen parent 31e0ff51 4279a6fb
improve some alignments in commit view

inlinesplit
src/endpoints/repos/commits.zig added: 14, removed: 11, total 3
@@ -38,6 +38,10 @@ pub fn patchVerse(a: Allocator, patch: *Patch.Patch) ![]Template.Context {
return try patch.diffsVerseSlice(a);
}
 
pub const PatchView = struct {
@"inline": ?bool = true,
};
 
fn commitHtml(ctx: *Verse.Frame, sha: []const u8, repo_name: []const u8, repo: Git.Repo) Error!void {
if (!Git.commitish(sha)) {
std.debug.print("Abusive ''{s}''\n", .{sha});
@@ -129,7 +133,7 @@ fn commitHtml(ctx: *Verse.Frame, sha: []const u8, repo_name: []const u8, repo: G
}
} else |_| {}
 
const udata = ctx.request.data.query.validate(Diffs.PatchView) catch return error.BadData;
const udata = ctx.request.data.query.validate(PatchView) catch return error.BadData;
const inline_html = udata.@"inline" orelse true;
 
var page = CommitPage.init(.{
 
static/main.css added: 14, removed: 11, total 3
@@ -430,6 +430,10 @@ gist {
}
 
patch, gist {
margin: 2rem 0 10rem;
border-radius: 4px 4px 0 0;
padding: 8px;
 
header {
border-radius: 3px 3px 0 0;
border-top: 1px solid #780000;
@@ -455,12 +459,12 @@ patch, gist {
white-space: pre;
&.split {
white-space: pre;
width: 100%;
width: fit-content;
margin: 0;
display: inline-block;
span {
margin: 0;
width: 50%;
width: fit-content;
display: inline-block;
overflow: scroll;
}
@@ -493,9 +497,6 @@ patch, gist {
height: 25px;
padding: 4px 0 4px 12px;
}
margin: 2rem 0 10rem;
border-radius: 4px 4px 0 0;
padding: 8px;
 
.del { background: #633 }
.add { background: #353 }
 
templates/commit.html added: 14, removed: 11, total 3
@@ -20,9 +20,7 @@
</data>
</commit>
</With>
</content>
 
<content>
<Build Comments _comment_thread.html />
<diff>
<Build Patch _patch.html />