Add the correct styling for broken links

This commit is contained in:
2026-08-09 16:02:27 -04:00
parent 92d041e208
commit e57ee2c711
2 changed files with 13 additions and 3 deletions

View File

@@ -65,10 +65,11 @@ class BidirectionalLinksGenerator < Jekyll::Generator
current_note.content = current_note.content.gsub(
/\[\[([^\]]+)\]\]/i, # match on the remaining double-bracket links
<<~HTML.delete("\n") # replace with this HTML (\\1 is what was inside the brackets)
<span title='There is no note that matches this link.' class='invalid-link'>
<span title='This link has not been created yet.' class='invalid-link'>
<span class='invalid-link-brackets'>[[</span>
\\1
<span class='invalid-link-brackets'>]]</span></span>
<span class='invalid-link-brackets'>]]</span>
</span>
HTML
)
end

View File

@@ -9,4 +9,13 @@
.backlinks {
}
}
.invalid-link {
opacity: 80%;
cursor: help;
}
.invalid-link-brackets {
opacity: 20%;
}