adjusted active line highlighting

This commit is contained in:
m455 2023-02-03 23:16:49 -05:00
parent c1a4eccd92
commit 758352c8cd
2 changed files with 6 additions and 3 deletions

View file

@ -27,6 +27,9 @@
} }
#file-contents code { background-color: inherit } #file-contents code { background-color: inherit }
.line-number { text-align: right } .line-number { text-align: right }
.line:target {
background-color: yellow;
}
</style> </style>
</head> </head>
<body> <body>

View file

@ -205,9 +205,9 @@
`(table `(table
(@ (id "file-contents")) (@ (id "file-contents"))
,@(map (lambda (number line) ,@(map (lambda (number line)
`(tr (@ (class "line")) `(tr (@ ((class "line")
(td (@ ((class "line-number")
(id ,number))) (id ,number)))
(td (@ (class "line-number"))
(a (@ (href "#" ,number)) ,number)) (a (@ (href "#" ,number)) ,number))
(td (@ (class "line-contents")) (td (@ (class "line-contents"))
(code ,line)))) (code ,line))))