mirror of
https://github.com/docker/docs.git
synced 2026-11-21 14:06:38 +03:00
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:
5 files changed
+32
-10
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -14,3 +14,4 @@
|
||||
@import "tailwindcss/utilities";
|
||||
@import "/assets/css/syntax-light";
|
||||
@import "/assets/css/syntax-dark";
|
||||
@import "/assets/css/icons";
|
||||
@@ -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>
|
||||
|
||||
@@ -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 }}
|
||||
Reference in new issue
Block a user