Back to Istio Io

{{- .Title -}}

layouts/partials/primary_top.html

latest2.3 KB
Original Source

{{ if $isDocs }} {{ end }}

{{ if .Params.decoration }}

{{- .Title -}}

{{ i18n "mark_all_as_read" }} {{ else if .Params.skipTitle}} {{ else }}

{{- .Title -}}

{{ end }} {{ if .Params.subtitle }}

{{ .Params.subtitle }}

{{ end }} {{ if not (or .Params.skip_byline $skipByLine) }} {{ if or .Params.attribution (gt .Page.ReadingTime 1) (ne .PublishDate.Year 0001) }}

{{- $needBar := false -}} {{- if .Params.attribution -}} {{- i18n "page_attribution" -}}{{- .Params.attribution -}} {{- if .Params.twitter -}} (@{{- .Params.twitter -}}) {{- end -}} {{- $needBar = true -}} {{- end -}} {{- if ne .PublishDate.Year 0001 -}} {{- if $needBar -}} | {{- end -}} {{- partial "icon.html" "calendar" -}} {{- .PublishDate.Format (i18n "page_publish_date_format") -}} {{- if .Params.last_update -}} {{- $date := time .Params.last_update -}} {{- $date = $date.Format (i18n "page_publish_date_format") -}} {{- printf (i18n "page_last_update_format") $date -}} {{- end -}} {{- $needBar = true }} {{- end -}} {{- if gt .Page.ReadingTime 1 -}} {{- partial "icon.html" "clock" -}} {{- printf (i18n "page_reading_time") .Page.ReadingTime -}} {{if and (isset .Params "test") (not ( eq .Params.test "n/a"))}} {{ if (.Params.test) }} [{{- partial "icon.html" "checkmark" -}} {{ i18n "tested"}}](https://github.com/istio/istio.io/tree/master/README.md#testing-document-content "{{ i18n "has_test" }}") {{ else }} [{{- partial "icon.html" "cancel-grey" -}} {{ i18n "tested"}}](https://github.com/istio/istio.io/tree/master/README.md#testing-document-content "{{ i18n "needs_test" }}") {{end}} {{end}} {{- end -}}

{{ end }} {{ end }}

{{ if $needTOC }} {{ end }} {{ if .Page.Params.target_release }} {{ $page_parts := split .Page.Params.target_release "." }} {{ $page_version := int (index $page_parts 0) }} {{ $page_revision := int (index $page_parts 1) }} {{ $page_normalized_version := add (add (mul $page_version 1000000) (mul $page_revision 1000)) 0 }} {{ $site_parts := split .Site.Data.args.version "." }} {{ $site_version := int (index $site_parts 0) }} {{ $site_revision := int (index $site_parts 1) }} {{ $site_normalized_version := add (add (mul $site_version 1000000) (mul $site_revision 1000)) 0 }} {{ if gt $site_normalized_version $page_normalized_version }}

{{ end }} {{ end }}