single.html 2.07 KB
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1 2 3 4
{{/* Used to render all content pages other than the index. */}}
<html>
  <head>
    {{ partial "head.html" . }}
Eugen Rochko's avatar
Eugen Rochko committed
5
    <title>{{ .Page.Title }} - {{ .Site.Title }}</title>
Eugen Rochko's avatar
Eugen Rochko committed
6 7 8 9 10 11 12 13 14

    <meta property="og:title" content="{{ .Title }}" />
    <meta property="og:description" content="{{ .Summary }}" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="{{ .Permalink }}" />

    <meta name="twitter:card" content="summary_large_image" />

    {{ if isset .Params "hero" }}
Eugen Rochko's avatar
Eugen Rochko committed
15
      <meta name="og:image" content="{{ .Params.hero }}" />
Eugen Rochko's avatar
Eugen Rochko committed
16
      <meta name="twitter:image" content="{{ .Params.hero }}" />
Eugen Rochko's avatar
Eugen Rochko committed
17 18 19 20 21 22 23
    {{ else }}
      {{ $hero := .Page.Resources.GetMatch "hero" }}

      {{ if $hero }}
        <meta name="og:image" content="{{ $hero.Permalink }}" />
        <meta name="twitter:image" content="{{ $hero.Permalink }}" />
      {{ end }}
Eugen Rochko's avatar
Eugen Rochko committed
24 25 26
    {{ end }}

    <meta name="twitter:site" content="@MastodonProject" />
Eugen Rochko's avatar
Eugen Rochko committed
27 28 29 30 31 32 33
  </head>
  <body>
    {{ partial "header.html" . }}

    <div class="article h-entry">
      <div class="container">
        <header class="article-header">
Eugen Rochko's avatar
Eugen Rochko committed
34
          <h1 class="p-name">{{ .Page.Title }}</h1>
Eugen Rochko's avatar
Eugen Rochko committed
35 36 37 38 39 40 41 42 43

          {{ if isset .Params "subtitle" }}
            <h2>{{ .Params.subtitle }}</h2>
          {{ end }}

          {{ if isset .Params "hero" }}
            <div class="image-large">
              <img src="{{ .Params.hero }}" alt="" />
            </div>
44 45 46 47 48 49 50 51
          {{ else }}
            {{ $hero := .Page.Resources.GetMatch "hero" }}

            {{ if $hero }}
              <div class="image-large">
                <img src="{{ $hero.RelPermalink }}" alt="" />
              </div>
            {{ end }}
Eugen Rochko's avatar
Eugen Rochko committed
52 53 54
          {{ end }}
        </header>

Eugen Rochko's avatar
Eugen Rochko committed
55
        <main class="e-content">
Eugen Rochko's avatar
Eugen Rochko committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
          {{ .Content }}
        </main>

        <footer class="article-footer">
          {{ partial "entry_nav.html" . }}
        </footer>
      </div>
    </div>

    <div class="container">
      {{ partial "cta.html" . }}
    </div>

    <div class="related-articles container">
      {{ partial "related.html" . }}
    </div>

    {{ partial "footer.html" . }}
  </body>
</html>