added manual tooltip to nerdlinks

This commit is contained in:
Gabriele Musco 2020-09-05 11:03:07 +02:00
parent ab9f873c65
commit a7825fe8b4
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
2 changed files with 19 additions and 2 deletions

View File

@ -167,10 +167,25 @@ h1, h2, h3, h4, h5, h6 {
@extend .nerd;
color: $fg_color;
border-bottom: none;
position: relative;
span {
position: absolute;
top: 1.5em;
left: 50%;
transform: translateX(-50%);
padding: 2px;
border: 1px solid $stroke_color;
border-radius: 3px;
color: $fg_color;
display: none;
}
&:hover {
color: $accent_color;
text-decoration: none;
border-bottom: none;
span {
display: block;
}
}
}

View File

@ -1,8 +1,7 @@
<a
target="_blank"
class="nerdlink"
href="{{ index . 1 }}"
title="{{ index . 0 }}">
href="{{ index . 1 }}">
{{ if eq (lower (index . 0)) "gitlab" }}
&#xf296;
{{ else if eq (lower (index . 0)) "gnome" }}
@ -30,4 +29,7 @@
{{ else }}
{{ index . 0 }}
{{ end }}
<span>
{{ index . 0 }}
</span>
</a>