<!DOCTYPE html>
<html lang="{{ .Site.Language }}" itemscope itemtype="https://schema.org/WebPage">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta name="theme-color" content="#466BB0"/>

        {{ with .Page.Description }}
            {{ if not (or (strings.HasSuffix . ".") (strings.HasSuffix . "。")) }}
                {{ errorf "Page description doesn't end with a period: '%s'" .Page.Description }}
            {{ end }}
        {{ end }}

        {{ define "description" }}{{ with .Page.Description }}{{ . }}{{ else }}Connect, secure, control, and observe services.{{ end }}{{ end }}

        <meta name="title" content="{{ .Title }}">
        <meta name="description" content="{{ template "description" . }}">

        {{ if .Page.Params.attribution }}
            <meta name="author" content="{{ .Page.Params.attribution }}">
        {{ end }}

        {{ if .Page.Params.keywords }}
            <meta name="keywords" content="microservices,services,mesh,{{ delimit .Page.Params.keywords "," }}">
        {{ else }}
            <meta name="keywords" content="microservices,services,mesh">
        {{ end }}

        <!-- Open Graph protocol -->
        <meta property="og:title" content="{{ .Title }}">
        <meta property="og:type" content="website">
        <meta property="og:description" content="{{ template "description" . }}">
        {{ if .Permalink }}
            <meta property="og:url" content="{{ .Permalink }}">
        {{ end }}
        <meta property="og:image" content="{{ .Site.BaseURL }}/img/istio-whitelogo-bluebackground-framed.svg">
        <meta property="og:image:alt" content="Istio Logo">
        <meta property="og:image:width" content="112">
        <meta property="og:image:height" content="150">
        <meta property="og:site_name" content="Istio">

        <!-- Twitter card -->
        <meta name="twitter:card" content="summary">
        <meta name="twitter:site" content="@IstioMesh">
        {{ if .Page.Params.twitter }}
            <meta name="twitter:creator" content="@{{ .Page.Params.twitter }}">
        {{ end }}

        {{ $analytics_id := .Site.Data.args.main_analytics_id }}
        {{ if .Site.Data.args.archive }}
            {{ if eq .Title "Istio" }}
                <title>Istioldie {{ .Site.Data.args.version }}</title>
            {{ else }}
                <title>Istioldie {{ .Site.Data.args.version }} / {{ .Title }}</title>
            {{ end }}
            {{ $analytics_id = .Site.Data.args.archive_analytics_id }}
        {{ else if .Site.Data.args.preliminary }}
            {{ if eq .Title "Istio" }}
                <title>Istio Prelim {{ .Site.Data.args.version }}</title>
            {{ else }}
                <title>Istio Prelim {{ .Site.Data.args.version }} / {{ .Title }}</title>
            {{ end }}
            {{ $analytics_id = .Site.Data.args.preliminary_analytics_id }}
        {{ else }}
            {{ if eq .Title "Istio" }}
                <title>Istio</title>
            {{ else }}
                <title>Istio / {{ .Title }}</title>
            {{ end }}
        {{ end }}

        <!-- Google Analytics -->
        <script async src="https://www.googletagmanager.com/gtag/js?id={{ $analytics_id }}"></script>
        <script>
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', '{{ $analytics_id }}');
        </script>
        <!-- End Google Analytics -->

        <script>
            var branchName = "{{ .Site.Data.args.source_branch_name }}";
            var docTitle = "{{ .Title }}";
            var iconFile = "{{ .Site.BaseURL}}/img/icons.svg";
            var buttonCopy = '{{ i18n "button_copy" }}';
            var buttonPrint = '{{ i18n "button_print" }}';
            var buttonDownload = '{{ i18n "button_download" }}';
        </script>

        <!-- RSS -->
        <link rel="alternate" type="application/rss+xml" title="Istio Blog" href="/feed.xml">

        <!-- Favicons: generated from img/istio-whitelogo-bluebackground-framed.svg by http://cthedot.de/icongen -->
        <link rel="shortcut icon" href="/favicons/favicon.ico" >
        <link rel="apple-touch-icon" href="/favicons/apple-touch-icon-180x180.png" sizes="180x180">
        <link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
        <link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
        <link rel="icon" type="image/png" href="/favicons/android-36x36.png" sizes="36x36">
        <link rel="icon" type="image/png" href="/favicons/android-48x48.png" sizes="48x48">
        <link rel="icon" type="image/png" href="/favicons/android-72x72.png" sizes="72x72">
        <link rel="icon" type="image/png" href="/favicons/android-96x96.png" sizes="96xW96">
        <link rel="icon" type="image/png" href="/favicons/android-144x144.png" sizes="144x144">
        <link rel="icon" type="image/png" href="/favicons/android-192x192.png" sizes="192x192">

        <!-- app manifests -->
        <link rel="manifest" href="/manifest.json">
        <meta name="apple-mobile-web-app-title" content="Istio">
        <meta name="application-name" content="Istio">

        <!-- style sheets -->
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Work+Sans:400,500,300,700,300italic,400italic,500italic,700italic|Chivo:400,500,300,700,300italic,400italic,500italic,700italic">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

        {{ if .Site.Data.args.archive }}
            <link rel="stylesheet" href="/css/light_theme_archive.css" title="light">
            <link rel="alternate stylesheet" href="/css/dark_theme_archive.css" title="dark">
        {{ else if .Site.Data.args.preliminary }}
            <link rel="stylesheet" href="/css/light_theme_preliminary.css" title="light">
            <link rel="alternate stylesheet" href="/css/dark_theme_preliminary.css" title="dark">
        {{ else }}
            <link rel="stylesheet" href="/css/light_theme_normal.css" title="light">
            <link rel="alternate stylesheet" href="/css/dark_theme_normal.css" title="dark">
        {{ end }}

        <script src="/js/styleSwitcher.min.js"></script>
    </head>

    <body class="language-unknown">
        {{ partial "header.html" . }}
        {{ block "main" . }}{{ end }}
        {{ partial "footer.html" . }}

        <div class="d-xl-none d-print-none">
            <button id="scroll-to-top" aria-hidden="true" onclick="scrollToTop()" title='{{ i18n "button_top"}}'>
                {{ partial "icon.html" "top" }}
            </button>
        </div>

        <!-- libraries we pull in -->
        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script>
        <script src="https://www.google.com/cse/brand?form=search_form"></script>

        <!-- our own scripts -->
        <script src="/js/all.min.js" data-manual></script>
    </body>
</html>
