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; @extend .nerd;
color: $fg_color; color: $fg_color;
border-bottom: none; 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 { &:hover {
color: $accent_color; color: $accent_color;
text-decoration: none; text-decoration: none;
border-bottom: none; border-bottom: none;
span {
display: block;
}
} }
} }

View File

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