all repos — elgit @ 4cb034adf2fd34dbaeae280c30d88601865dc7d8

fork of legit: web frontend for git, written in go

remove syntax highlighting

Alan Pearce
commit

4cb034adf2fd34dbaeae280c30d88601865dc7d8

parent

84ac9429d2b3dc331491481ff6669a3b78f99971

1 file changed, 18 insertions(+), 21 deletions(-)

changed files
M templates/file.gotemplates/file.go
@@ -8,32 +8,29 @@ . "alin.ovh/gomponents/html"
) // FilePage renders a file view page -func FilePage(data PageData, chroma bool) g.Node { +func FilePage(data PageData) g.Node { return Page(data, []g.Node{ RepoHeader(data), RenderNav(data), Main( P(g.Text(data.Path), g.Text(" ("), A(Href("?raw=true"), g.Text("view raw")), g.Text(")")), - g.If(chroma, - Div(Class("chroma-file-wrapper"), g.Raw(data.Content)), - Div(Class("file-wrapper"), - Table( - TBody( - Tr( - Td(Class("line-numbers"), - Pre(g.Map(data.LineCount, func(line int) g.Node { - return g.Group([]g.Node{ - g.Text("\n"), - A( - ID(fmt.Sprintf("L%d", line)), - Href(fmt.Sprintf("#L%d", line)), - g.Text(fmt.Sprintf("%d", line)), - )}) - })), - ), - Td(Class("file-content"), - Pre(g.Text(data.Content)), - ), + Div(Class("file-wrapper"), + Table( + TBody( + Tr( + Td(Class("line-numbers"), + Pre(g.Map(data.LineCount, func(line int) g.Node { + return g.Group([]g.Node{ + g.Text("\n"), + A( + ID(fmt.Sprintf("L%d", line)), + Href(fmt.Sprintf("#L%d", line)), + g.Text(fmt.Sprintf("%d", line)), + )}) + })), + ), + Td(Class("file-content"), + Pre(g.Text(data.Content)), ), ), ),