{{ $home := .Site.BaseURL }}

<!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"/>

        {{ define "description" }}{{ with .Page.Description }}{{ . }}{{ else }}An open platform to connect, manage, and secure microservices.{{ end }}{{ end }}

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

        {{ 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 name="og:title" content="{{ .Title }}">
        <meta name="og:description" content="{{ template "description" . }}">
        <meta name="og:url" content="{{ .Permalink }}">
        <meta name="og.site_name" content="Istio">

        {{ 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 }}
        {{ 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 }}
        {{ else }}
            {{ if eq .Title "Istio" }}
                <title>Istio</title>
            {{ else }}
                <title>Istio / {{ .Title }}</title>
            {{ end }}
        {{ end }}

        <!-- Google Analytics -->
        <script>
            window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
            ga('create', 'UA-98480406-1', 'auto');
            ga('send', 'pageview');
        </script>
        <script async src='https://www.google-analytics.com/analytics.js'></script>
        <!-- End Google Analytics -->

        <script>
            var branchName = "{{ .Site.Data.args.branch_name }}";
        </script>

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

        <!-- Favicons: generated from img/istio-logo-social.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-96x196.png" sizes="96x196">
        <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=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.6/css/all.css">

        {{ 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="Back to top"><i class="fa fa-lg fa-arrow-up"></i></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>
