Skip to content

Commit fd8ea85

Browse files
committed
chore: use one icon with rotation
1 parent 65ecb83 commit fd8ea85

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

assets/css/compiled/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exampleSite/content/docs/guide/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,11 @@ The field `message` supports Markdown syntax.
443443
If you want to use template syntax, you can define the partial in `layouts/_partials/custom/banner.html`.
444444
In this case, the field `message` will be ignored.
445445

446-
### Flag Outbound Links
446+
### External Link Decoration
447447

448448
Adds an arrow icon to external links (default: false) when rendering links from Markdown.
449449

450450
```yaml
451451
params:
452-
flagOutboundLinks: true
452+
externalLinkDecoration: true
453453
```

exampleSite/hugo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ menu:
121121
params:
122122
description: Modern, responsive, batteries-included Hugo theme for creating beautiful static websites.
123123

124-
flagOutboundLinks: true
124+
externalLinkDecoration: true
125125

126126
banner:
127127
key: 'announcement-v0_10'

exampleSite/hugo_stats.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@
434434
"hx:ltr:-mr-4",
435435
"hx:ltr:before:left-0",
436436
"hx:ltr:border-l",
437-
"hx:ltr:hidden",
438437
"hx:ltr:md:left-auto",
439438
"hx:ltr:ml-1",
440439
"hx:ltr:ml-3",
@@ -587,7 +586,6 @@
587586
"hx:rtl:before:right-0",
588587
"hx:rtl:before:rotate-180",
589588
"hx:rtl:border-r",
590-
"hx:rtl:hidden",
591589
"hx:rtl:left-1.5",
592590
"hx:rtl:left-3",
593591
"hx:rtl:md:right-auto",
@@ -605,6 +603,7 @@
605603
"hx:rtl:pr-5",
606604
"hx:rtl:pr-6",
607605
"hx:rtl:pr-8",
606+
"hx:rtl:rotate-270",
608607
"hx:rtl:text-left",
609608
"hx:scroll-my-6",
610609
"hx:scroll-py-6",

layouts/_markup/render-link.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
{{- if $isExternal -}}target="_blank" rel="noopener"{{- end -}}
1919
>
2020
{{- .Text | safeHTML -}}
21-
{{- if and .Page.Site.Params.flagOutboundLinks $isExternal -}}
22-
{{- partial "utils/icon.html" (dict "name" "arrow-up-right" "attributes" `class="hx:inline hx:rtl:hidden hx:align-baseline" height="1em"`) -}}
23-
{{- partial "utils/icon.html" (dict "name" "arrow-up-left" "attributes" `class="hx:inline hx:ltr:hidden hx:align-baseline" height="1em"`) -}}
21+
{{- if and .Page.Site.Params.externalLinkDecoration $isExternal -}}
22+
{{- partial "utils/icon.html" (dict "name" "arrow-up-right" "attributes" `class="hx:inline hx:rtl:rotate-270 hx:align-baseline" height="1em"`) -}}
2423
{{- end -}}
2524
</a>
2625
{{- end -}}

0 commit comments

Comments
 (0)