Merge pull request #19058 from dvdksn/icons-external-links-hide-ligatures-from-crawlers

icons external links hide ligatures from crawlers
This commit is contained in:
David Karlsson authored and GitHub committed 2024-01-08 15:15:26 +01:00
commit 288af647d7
5 files changed
+32 -10

No files matched your search

+6
View File
@@ -18,6 +18,12 @@
@apply text-blue-light underline underline-offset-2 dark:text-blue-dark;
}
.external-link {
.icon:after {
@apply text-base ml-1;
}
}
.invertible {
@apply dark:hue-rotate-180 dark:invert dark:filter;
}
+19
View File
@@ -0,0 +1,19 @@
@layer utilities {
.icon {
font-family: "Material Symbols Rounded";
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
}
.icon:after {
content: attr(data-icon);
}
}
+1
View File
@@ -14,3 +14,4 @@
@import "tailwindcss/utilities";
@import "/assets/css/syntax-light";
@import "/assets/css/syntax-dark";
@import "/assets/css/icons";
+2 -6
View File
@@ -2,16 +2,12 @@
{{- if (strings.HasPrefix $url "http") -}}
{{/* external link, add icon */}}
<a
class="link"
class="link external-link"
href="{{ $url | safeURL }}"
target="_blank"
rel="noopener"
>{{ .Text | safeHTML }}<span
aria-hidden
class="select-none ml-1 align-top text-[1em] material-symbols-rounded"
>open_in_new</span
></a
>
class="icon" data-icon="open_in_new"></span></a>
{{- else if (strings.HasPrefix $url "/") -}}
{{/* absolute link, use url as-is */}}
<a class="link" href="{{ $url }}">{{ .Text | safeHTML }}</a>
+4 -4
View File
@@ -3,18 +3,18 @@
{{ if not (in .Filename "/_vendor/") }}
<p class="flex items-center gap-2">
<span class="material-symbols-rounded">edit</span>
<a class="link" target="_blank" rel="noopener"
<a class="link external-link" target="_blank" rel="noopener"
href="{{ site.Params.repo }}/edit/main/content/{{ .Path }}">{{ T "editPage" }}
<span aria-hidden class="material-symbols-rounded select-none align-middle text-base">open_in_new</span>
<span class="icon" data-icon="open_in_new"></span>
</a>
</p>
{{ end }}
{{ end }}
<p class="flex items-center gap-2">
<span class="material-symbols-rounded">done</span>
<a class="link" target="_blank" rel="noopener"
<a class="link external-link" target="_blank" rel="noopener"
href="{{ site.Params.repo }}/issues/new?template=doc_issue.yml&location={{ .Permalink }}&labels=status%2Ftriage">{{ T "requestChanges" }}
<span aria-hidden class="material-symbols-rounded select-none align-middle text-base">open_in_new</span>
<span class="icon" data-icon="open_in_new"></span>
</a>
</p>
{{ end }}