mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-03-21 04:54:11 -04:00
feat: optional special treatment for external links
This commit is contained in:
parent
3e53621007
commit
077d477f7f
@ -82,6 +82,46 @@
|
|||||||
box-shadow: 0 -1px 0 var(--primary) inset;
|
box-shadow: 0 -1px 0 var(--primary) inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-content a.external-link {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-content a.external-link::after {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
clip-path: polygon(
|
||||||
|
60% 5%,
|
||||||
|
60% 0%,
|
||||||
|
100% 0%,
|
||||||
|
100% 5%,
|
||||||
|
100% 40%,
|
||||||
|
94.98% 40%,
|
||||||
|
94.98% 5%,
|
||||||
|
94.98% 9.59%,
|
||||||
|
42.41% 59.2%,
|
||||||
|
38.1% 54.64%,
|
||||||
|
90.7% 5%,
|
||||||
|
60% 5%,
|
||||||
|
50% 8%,
|
||||||
|
13% 8%,
|
||||||
|
8% 8%,
|
||||||
|
8% 92%,
|
||||||
|
92% 92%,
|
||||||
|
92% 50%,
|
||||||
|
87% 50%,
|
||||||
|
87% 87%,
|
||||||
|
13% 87%,
|
||||||
|
13% 13%,
|
||||||
|
50% 13%,
|
||||||
|
50% 8%
|
||||||
|
);
|
||||||
|
background-color: var(--primary);
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
.post-content del {
|
.post-content del {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
4
layouts/_default/_markup/render-link.html
Normal file
4
layouts/_default/_markup/render-link.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}
|
||||||
|
{{ if and site.Params.ExternalLinksIcon (strings.HasPrefix .Destination "http") }} class="external-link"{{ end }}
|
||||||
|
{{ if and site.Params.ExternalLinksNewTab (strings.HasPrefix .Destination "http") }} target="_blank"{{ end }}
|
||||||
|
>{{ .Text }}</a>
|
Loading…
x
Reference in New Issue
Block a user