<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
    <meta name="description" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ else }}{{ .Site.Params.description }}{{ end }}">
    {{ with .Site.Params.keywords }}<meta name="keywords" content="{{ . }}">{{ end }}

    <meta property="og:site_name" content="{{ .Site.Title }}">
    <meta property="og:title" content="{{ block "og-title" . }}{{ .Site.Title }}{{ end }}">
    <meta property="og:description" content="{{ if .IsPage }}{{ .Params.description }}{{ else }}{{ .Site.Params.description }}{{ end }}">
    <meta property="og:type" content="website">
    <meta property="og:url" content="{{ .Permalink }}">
    <meta property="og:image" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ .Params.thumbnail }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.thumbnail }}{{ end }}">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="{{ .Permalink }}">
    <meta name="twitter:image" content="{{ if .IsPage }}{{ .Site.BaseURL }}{{ .Params.thumbnail }}{{ else }}{{ .Site.BaseURL }}{{ .Site.Params.thumbnail }}{{ end }}">

    <base href="{{ .Permalink }}">
    <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>

    <link rel="canonical" href="{{ .Permalink }}">
    {{ if or (.Site.Params.snsShare) (.Site.Params.faIcons) }}
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
    {{ end }}
    <link  rel="stylesheet" href="https://fonts.googleapis.com/css?family=Fira+Mono:400,700">
    <link rel="stylesheet" href="{{ "/css/normalize.min.css" | absURL }}">
    <link rel="stylesheet" href="{{ "/css/style.min.css" | absURL }}">

    {{ if .Site.Params.rtl}}
      <link rel="stylesheet" href="{{ "/css/style-rtl.min.css" | absURL }}">
    {{ end }}

    {{ range .Site.Params.custom_css }}
      <link rel="stylesheet" href="{{ . | absURL }}">
    {{ end }}

    <link rel="icon" type="image/png" href="{{ "/images/favicon-32x32.png" | absURL }}" sizes="32x32">
    <link rel="icon" type="image/png" href="{{ "/images/favicon-16x16.png" | absURL }}" sizes="16x16">

    {{ with .Site.Home.AlternativeOutputFormats.Get "RSS" }}
      <link rel="alternate" href="{{ .Permalink }}" type="application/rss+xml" title="{{ $.Site.Title | plainify }}">
      <link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title | plainify }}" />
    {{ end }}

    {{ hugo.Generator }}
  </head>

  <body class="{{ if .Site.Params.rtl }}rtl{{ end }}">
    <main class="wrapper">
      {{ partial "header.html" . }}

      <div class="content">
        {{ block "content" . }}{{ end }}
      </div>
      {{ if or (.Site.Params.fixedbarContent) (.Site.Params.snsShare)}}
        {{ partial "footer.html" . }}
      {{ end }}
    </main>

    {{ template "_internal/google_analytics.html" . }}

  <script src="{{ "js/app.js" | absURL }}"></script>
  {{ with .Site.Params.fixedbarContentAfter }}
  <script>
  (function($) {
    $(function() {
      $('#privateTrigger').on('click', function() {
        $('.private').slideToggle();
        $('#privateTriggerText').text("{{ . }}");
      });
    });
   })(jQuery);
  </script>
  {{ end }}
  </body>
</html>
