update tooltip styling to bootstrap

This commit is contained in:
Karen Bradshaw
2020-10-05 12:01:39 -04:00
parent 9e01fb5560
commit be9e8e9ad8
6 changed files with 26 additions and 69 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
{{- end }}
<link rel="stylesheet" href="{{ "css/feature-states.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/custom-jekyll/tags.css" | relURL }}">
{{- if .Site.Params.announcement }}
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
{{- end }}
+4 -6
View File
@@ -14,13 +14,11 @@
{{- $glossary_home := "docs/reference/glossary/?all=true" | relLangURL -}}
{{- $external_link := $term_info.Params.full_link | default (printf "%s#term-%s" $glossary_home $id | safeURL ) -}}
{{- $tooltip := $term_info.Params.short_description | markdownify -}}
{{- $tooltip := $tooltip | replaceRE "(?s)<a class='glossary-tooltip'.*?>(.*?)<span class='tooltip-text'>.*</a>" "$1" | plainify -}}
{{- $tooltip := $tooltip | replaceRE "(?s)<a class='glossary-tooltip'.*?>(.*?).*</a>" "$1" | plainify -}}
{{- $tooltip := trim $tooltip " \n" -}}
<a class='glossary-tooltip' href='{{ $external_link }}' target='_blank'>
{{- $text -}}
<span class='tooltip-text'>
{{- $tooltip | safeHTML -}}
</span>
<a class='glossary-tooltip' title='{{- $tooltip | safeHTML -}}' data-toggle='tooltip' data-placement='top' href='{{ $external_link }}' target='_blank' aria-label='{{ $text }}'>
{{- $text -}}
</a>
{{- end -}}
{{- end -}}