Welcome to mirror list, hosted at ThFree Co, Russian Federation.

single.html « guest « layouts - github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f058f60004491051a001c1bb038c3520678f7ed7 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
{{ define "main" }}
<div class = "hero_container">
<div class="row">
  <div class="col">
    <h1>{{ title .Title }}</h1>
  </div>
</div>
{{ .Scratch.Delete "guest-names" }}

<div class = "row">
  <div class="col-lg-8">
    <div class="row">
      <div class="col-md-3">
      {{- if and (isset .Params "thumbnail") (ne .Params.thumbnail "") -}}
        {{- if (eq (slicestr .Params.thumbnail 0 4) "http") -}}
          <img alt="{{ .Title }}" src="{{ .Params.thumbnail }}" class="img-fluid episode_image" width="250px">
          {{- else -}}
          <img alt="{{ .Title }}" src="{{ .Params.thumbnail | absURL}}" class="img-fluid episode_image" width="250px">
        {{- end -}}
        {{- else -}}
        <img alt="{{ .Title }}" src="{{ "img/guest/default-guest.png" | absURL }}" class="img-fluid episode_image" width="250px"/>
      {{- end -}}
      </div>
      <div class="col-md-8">
        <div class = "row">
          <div class="col">
            {{ .Content }}
          </div>
        </div>
        <div class = "row">
          <div class = "col guest_social_icons">
            {{ if .Params.Website }}
              <a href="{{ .Params.Website }}">
                <i class="fas fa-home fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.Twitter }}
              <a href="https://twitter.com/{{ .Params.Twitter }}">
                <i class="fab fa-twitter-square fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.GitHub }}
              <a href="https://github.com/{{ .Params.GitHub}}">
                <i class="fab fa-github-square fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.LinkedIn }}
              <a href="https://www.linkedin.com/in/{{ .Params.LinkedIn}}/">
                <i class="fab fa-linkedin fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.Facebook }}
              <a href="https://www.facebook.com/{{ .Params.Facebook}}">
                <i class="fab fa-facebook-square fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.Pinterest }}
              <a href="https://www.pinterest.com/{{ .Params.Pinterest}}">
                <i class="fab fa-pinterest-square fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.Instagram }}
              <a href="https://www.instagram.com/{{ .Params.Instagram}}">
                <i class="fab fa-instagram fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.YouTube }}
              <a href="https://www.youtube.com/{{ .Params.YouTube}}">
                <i class="fab fa-youtube-square fa-2x"></i>
              </a>
            {{ end }}
            {{ if .Params.Twitch }}
            <a href="https://www.twitch.tv/{{ .Params.Twitch}}">
              <i class="fab fab fa-twitch fa-2x"></i>
            </a>
          {{ end }}
          </div>
        </div>
      </div>
      </div>
      </div>
    <div class="col-lg-4">
    <div class = "row">
      <div class="col">
        <h3>Episodes Featuring {{ .Title }}</h3>

          {{- with .Params.guest_group -}}
            {{- range where $.Site.Pages "Params.guest_group" . -}}
              {{- $.Scratch.Add "guest-names" (slice .File.BaseFileName) -}}
            {{- end -}}
          {{- else -}}

            {{- with .Params.Aka -}}
            {{- $.Scratch.Add "guest-names" (slice $.File.BaseFileName) -}}
              {{- range $names := . -}}
                {{- if ne $names $.File.BaseFileName }}
                  {{- $.Scratch.Add "guest-names" (slice $names) -}}
                {{- end -}}
              {{- end -}}
              
            {{- else -}}
              {{ $.Scratch.Set "guest-names" (slice .File.BaseFileName) }}
            {{- end -}}
          {{- end -}}
        <div class="list-group guest_episode_list">
          {{ range $name := ($.Scratch.Get "guest-names") }}
          {{- $.Scratch.Set "guest-name" $name -}}
            {{- range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) -}}
              {{- range $page.Params.guests -}}
                {{- if eq  . ($.Scratch.Get "guest-name") -}}
                  {{ if and (isset $.Site.Params "episode_number_style") ($page.Params.episode)}}
                    {{ if eq $.Site.Params.episode_number_style "parens" }}            
                      <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} ({{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }})</a>
                    {{ else if eq $.Site.Params.episode_number_style "brackets" }}
                      <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} [{{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}]</a>
                    {{ else if eq $.Site.Params.episode_number_style "dash" }}
                      <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} - {{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}</a>
                    {{ else }}
                      <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
                    {{ end }}
                  {{ else  }}
                    <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
                  {{ end }}
                {{- end -}}<!-- if eq guest name-->
              {{- end -}}<!-- range params guests -->
            {{- end -}}<!--range episodes -->
        {{- end -}}<!-- range -->
        </div>
      </div>
    </div>
    </div>
</div>
</div>
{{ end }}