aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/attribution.html
blob: e69341be3a1b6278b130fdcfbb4ceee7bfcd4376 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<div class="border-t border-gray-500 py-4 my-2">
  {{ if in (slice "by" "by-nd" "by-sa" "by-nc" "by-nc-nd" "by-nc-sa") .license }}
    {{ $href := printf "http://creativecommons.org/licenses/%s/4.0/" .license }}
    <div
      xmlns:cc="http://creativecommons.org/ns#"
      xmlns:dct="http://purl.org/dc/terms/"
    >
      <span property="dct:title">The content in this website</span>
      by
      {{ with .Author.homepage }}
        <a
          rel="cc:attributionURL dct:creator"
          property="cc:attributionName"
          href="{{ . }}"
          class="hover:opacity-50"
        >
          {{ $.Author.name }}
        </a>
      {{ else }}
        {{ $.Author.name }}
      {{ end }}

      is licensed under a
      <a
        target="_blank"
        rel="license noopener noreferrer"
        href="{{ $href }}"
        class="block hover:opacity-50"
      >
        Creative Commons
        {{ with .license }}
          Attribution{{- if in . "by-nc" -}}
            -NonCommercial
          {{- end -}}{{- if in . "-nd" -}}
            -NoDerivatives
          {{- else if in . "-sa" -}}
            -ShareAlike
          {{- end -}}
        {{ end }}
        4.0 International License
        <span class="block m-2">
          <i class="text-4xl fab fa-creative-commons"></i>
          <i class="text-4xl fab fa-creative-commons-by"></i>
          {{ with .license }}
            {{ if in . "by-nc" }}
              <i class="text-4xl fab fa-creative-commons-nc"></i>
            {{ end }}{{ if in . "-nd" }}
              <i class="text-4xl fab fa-creative-commons-nd"></i>
            {{ else if in . "-sa" }}
              <i class="text-4xl fab fa-creative-commons-sa"></i>
            {{ end }}
          {{ end }}
        </span>
      </a>
    </div>
  {{ else }}
    Copyright &copy;
    {{ now.Format "2006" }}
    {{ .Author.name }}
  {{ end }}
</div>