forked from tangled.org/core
this repo has no description

appview: highlight linked lines

Changed files
+16 -2
appview
pages
cmd
syntax
-2
appview/pages/pages.go
···
func (p *Pages) RepoBlob(w io.Writer, params RepoBlobParams) error {
var style *chroma.Style = styles.Get("catpuccin-latte")
-
b := style.Builder()
-
style, _ = b.Build()
if params.ShowRendered {
switch markup.GetFormat(params.Path) {
+16
cmd/syntax/chroma.go
···
darkTheme = "catppuccin-macchiato"
)
+
const (
+
targetHl = `
+
.chroma .line:has(.ln:target) {
+
background-color: rgba(140, 143, 161, 0.3);
+
}
+
+
@media (prefers-color-scheme: dark) {
+
.chroma .line:has(.ln:target) {
+
background-color: rgba(128, 135, 162, 0.3);
+
}
+
}
+
`
+
)
+
func main() {
outFile := flag.String("out", "", "css output file path")
flag.Parse()
···
file.WriteString("\n@media (prefers-color-scheme: dark) {\n")
formatter.WriteCSS(file, styles.Get(darkTheme))
file.WriteString("}\n")
+
+
file.WriteString(targetHl)
}