single.html 2.86 KB
Newer Older
Eugen Rochko's avatar
Eugen Rochko committed
1
{{/* Used to render all content pages other than the index. */}}
Eugen Rochko's avatar
Eugen Rochko committed
2
<!DOCTYPE html>
Simounet's avatar
Simounet committed
3
<html lang="en">
Eugen Rochko's avatar
Eugen Rochko committed
4 5
  <head>
    {{ partial "head.html" . }}
6
    <title>{{ .Page.Title }}{{ if isset .Params "subtitle" }}: {{ .Params.subtitle }}{{ end }} - {{ .Site.Title }}</title>
Eugen Rochko's avatar
Eugen Rochko committed
7 8

    <meta property="og:title" content="{{ .Title }}" />
9
    <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
Eugen Rochko's avatar
Eugen Rochko committed
10 11 12 13 14 15
    <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
16
      <meta name="og:image" content="{{ .Params.hero }}" />
Eugen Rochko's avatar
Eugen Rochko committed
17
      <meta name="twitter:image" content="{{ .Params.hero }}" />
Eugen Rochko's avatar
Eugen Rochko committed
18 19 20 21
    {{ else }}
      {{ $hero := .Page.Resources.GetMatch "hero" }}

      {{ if $hero }}
Eugen Rochko's avatar
Eugen Rochko committed
22 23
        {{ $hero := $hero.Resize "1200x" }}

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

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

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

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

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

            {{ if $hero }}
51 52 53 54
              {{ if not $hero.Params.resize }}
              {{ else }}
                {{ $hero := $hero.Resize "800x" }}
              {{ end }}
Eugen Rochko's avatar
Eugen Rochko committed
55

56 57 58 59
              <div class="image-large">
                <img src="{{ $hero.RelPermalink }}" alt="" />
              </div>
            {{ end }}
Eugen Rochko's avatar
Eugen Rochko committed
60 61 62
          {{ end }}
        </header>

Eugen Rochko's avatar
Eugen Rochko committed
63
        <main class="e-content">
Eugen Rochko's avatar
Eugen Rochko committed
64
          {{ .Content }}
Eugen Rochko's avatar
Eugen Rochko committed
65
          
Eugen Rochko's avatar
Eugen Rochko committed
66
          <p style="color: #687590;">
Eugen Rochko's avatar
Eugen Rochko committed
67
<span class="p-author h-card">
Eugen Rochko's avatar
Eugen Rochko committed
68 69 70 71
              {{ if isset .Params "author" }}
                {{ $author := index .Site.Data.authors .Params.author }}
                {{ $author.name }}
              {{ end }}
Eugen Rochko's avatar
Eugen Rochko committed
72
            </span>,
Eugen Rochko's avatar
Eugen Rochko committed
73 74 75 76
            <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">
              {{ .Date.Format "Jan 2, 2006" }}
            </time>
          </p>
Eugen Rochko's avatar
Eugen Rochko committed
77
        </main>
Eugen Rochko's avatar
Eugen Rochko committed
78

Eugen Rochko's avatar
Eugen Rochko committed
79
        <footer class="article-footer">
Eugen Rochko's avatar
Eugen Rochko committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
          {{ 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>