add ¶ markers on hover on titles to make it easier to grab the permalink
This commit is contained in:
parent
fbc6c6c8f4
commit
17ce8565f8
2 changed files with 10 additions and 1 deletions
|
@ -15,6 +15,10 @@
|
|||
hr { border: 0; border-bottom: 1px solid black; margin-top: 16px }
|
||||
td { padding: 0em .5em; vertical-align: top }
|
||||
footer { font-size: small; text-align: right }
|
||||
/* permalinks */
|
||||
h1 a::after, h2 a::after, h3 a::after, h4 a::after, h5 a::after, h6 a::after { content: "¶"; opacity: 0; margin-left: .5em; }
|
||||
h1:hover a::after, h2:hover a::after, h3:hover a::after, h4:hover a::after, h5:hover a::after, h6:hover a::after { opacity: 100; }
|
||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { text-decoration: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
7
main.scm
7
main.scm
|
@ -94,7 +94,12 @@
|
|||
(substring* 0 40)))
|
||||
|
||||
(define (enumerate-tag tag inner)
|
||||
`(,tag (@ (id ,(slugify tag inner))) ,inner))
|
||||
(let ((slug (slugify tag inner)))
|
||||
`(,tag
|
||||
(@ (id ,slug))
|
||||
,inner
|
||||
(a (@ (title "Permalink to this section")
|
||||
(href "#" ,slug))))))
|
||||
|
||||
(define (sxml-html-rules adjust-relative)
|
||||
`(;; assign all headings an id so you can link to them
|
||||
|
|
Loading…
Reference in a new issue