This website works better with JavaScript.
Home
Explore
Help
Sign In
noah
/
personal-site
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
style/appearance ++ for new header-anchor rendering
main
Noah Hall
2 years ago
parent
76841963a6
commit
7f2c4e9e8c
2 changed files
with
11 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
_includes/markdown-it-accessible-anchor.js
+10
-0
scss/style.scss
+ 1
- 1
_includes/markdown-it-accessible-anchor.js
View File
@ -16,7 +16,7 @@ const slugify = (s) =>
const
defaultOptions
=
{
divClass
:
'heading-wrapper'
,
anchorClass
:
'anchor-link'
,
linkIcon
:
'
#
'
,
linkIcon
:
'
🔗
'
,
}
;
const
targets
=
[
'h1'
,
'h2'
,
'h3'
,
'h4'
,
'h5'
,
'h6'
]
;
+ 10
- 0
scss/style.scss
View File
@ -47,6 +47,16 @@ p {
}
}
div
.
heading-wrapper
{
position
:
relative
;
}
a
.
anchor-link
{
position
:
absolute
;
right
:
calc
(
100
%
+
.
5em
)
;
top
:
.
5em
;
}
sup
.
footnote-ref
a
{
font-size
:
1em
;
}
Write
Preview
Loading…
Cancel
Save