remove syntax highlighting
1 file changed, 18 insertions(+), 21 deletions(-)
changed files
M templates/file.go → templates/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)), ), ), ),