mirror of https://github.com/grpc/grpc.io.git
Chore: render-link variable rename (#276)
This commit is contained in:
parent
9dd867c20d
commit
cb8f547e54
|
|
@ -1,10 +1,10 @@
|
||||||
{{ $isRemote := hasPrefix .Destination "http" -}}
|
{{ $isExternal := hasPrefix .Destination "http" -}}
|
||||||
<a href="{{ .Destination | safeURL }}"
|
<a href="{{ .Destination | safeURL }}"
|
||||||
{{- with .Title }} title="{{ . }}"{{ end -}}
|
{{- with .Title }} title="{{ . }}"{{ end -}}
|
||||||
{{- if $isRemote }} target="_blank" rel="noopener"{{ end -}}
|
{{- if $isExternal }} target="_blank" rel="noopener"{{ end -}}
|
||||||
>
|
>
|
||||||
{{- .Text | safeHTML -}}
|
{{- .Text | safeHTML -}}
|
||||||
{{ if $isRemote -}}
|
{{ if $isExternal -}}
|
||||||
<i class="fas fa-external-link-alt"></i>
|
<i class="fas fa-external-link-alt"></i>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</a>
|
</a>
|
||||||
Loading…
Reference in New Issue