Skip to content

Commit c87db7b

Browse files
author
Tony Wasserka
committed
Render links to non-existing pages red
1 parent 3036852 commit c87db7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

layouts/_default/_markup/render-link.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{{- if (not (or (strings.HasPrefix .Destination "http") (strings.HasPrefix .Destination "#"))) }}
2+
{{ $style := "" }}
3+
{{ with $.PageInner.GetPage (index (strings.Split .Destination "#") 0) }}
4+
{{ else }}
5+
{{ $style = "color:#ba0000" }}
6+
{{ end }}
7+
28
<a href="/3dbrew/{{ strings.Replace .Destination ":" "" }}"
39
{{- with .Title }} title="{{ . }}"{{ end -}}
10+
style={{ $style }}
411
>
512
{{- with .Text }}{{ . }}{{ end -}}
613
</a>

0 commit comments

Comments
 (0)