blob: 6b98c93b8392d9e99ebb7d626abbaee3981cd9a9 (
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
{{ if isset .Site.Params "enable_jumbo" }}
{{ if eq .Site.Params.enable_jumbo "true" }}
{{- partial "jumbotron.html" . }}
{{ end }}
{{ end }}
<div class="row hero_container">
<div class="col-md-12">
<h2>
Latest Episode
</h2>
{{ range first 1 (where .Data.Pages "Type" "episode") }}
{{- with .Params.youtube -}}
{{- $.Scratch.Set "youtube" "true" -}}
{{- end -}}
{{- with .Params.episode_banner -}}
{{- $.Scratch.Set "episode_banner" "true" -}}
{{- end -}}
{{/* Begin youtube */}}
{{- if eq ($.Scratch.Get "youtube") "true" -}}
<div class = "row homepage_episode_row">
<div class = "col">
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="//www.youtube.com/embed/{{ .Params.youtube }}" allowfullscreen></iframe>
</div>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col">
{{ .Description | markdownify | truncate 600 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small>
</div>
</div>
{{- else if eq ($.Scratch.Get "episode_banner") "true" -}}
<div class = "row homepage_episode_row">
<div class = "col">
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col">
<img src="{{ .Params.episode_banner | absURL }}" class="img-fluid episode_image"/>
</div>
</div>
<div class = "row homepage_episode_row">
<div class = "col">
{{ .Description | markdownify | truncate 600 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small>
</div>
</div>
{{- else -}}
<!-- begin square row -->
<div class = "row homepage_episode_row">
<div class = "col-md-12">
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
{{- if .Params.episode_image -}}
<div class = "row homepage_episode_row">
<div class = "col-md-3">
<img class = "img-fluid" src = "{{ .Params.episode_image | absURL }}" />
</div>
<div class = "col-md-8">
{{- if ge (countrunes .Description ) 600 -}}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 600 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{- else -}}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{- end -}}
</div>
</div><!-- end square row -->
{{- else -}}
<div class = "col">
{{- if ge (countrunes .Description ) 600 -}}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 900 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{- else -}}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{- end -}}
</div>
{{- end -}}
{{- end -}}
{{- with .Params.podcast_file -}}
<div class = "row">
<div class = "col-md-12">
<audio src="{{ $.Site.Params.media_prefix }}{{ . }}" preload="auto" />
</div>
</div>
{{- end -}}
{{- end -}}
</div>
</div>
<section class="episode-list">
<!-- rest of episodes -->
{{- $paginator := .Paginate (after 1 (where .Data.Pages "Type" "episode")) 5 -}}
{{- $list := (where .Data.Pages "Type" "episode") -}}
{{- $len := (len $list) -}}
<div class="row main_container">
{{- with .Site.Params.enable_jumbo -}}
{{- if eq . "true" -}}
<div class = "col">
{{- else -}}
<div class="col-md-8">
{{- end -}}
{{- else -}}
<div class="col-md-8">
{{- end -}}
{{- if gt $len 1 -}}
{{- range $paginator.Pages -}}
<div class = "row homepage_episode_row">
<div class = "col-md-12">
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
</div>
</div>
<div class = "row homepage_episode_row">
{{- if .Params.episode_image -}}
<div class = "col-md-4">
<img class = "img-fluid" src = "{{ .Params.episode_image | absURL }}" />
</div>
<div class = "col-md-8">
{{- if ge (countrunes .Description ) 600 -}}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 600 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{- else -}}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{- end -}}
</div>
{{- else -}}
<div class = "col">
{{- if ge (countrunes .Description ) 900 -}}
<p class = "hompage_episode_description">{{ .Description | markdownify | truncate 900 " "}} <small><a href = "{{ .Permalink }}">Read More</a></small></p>
{{- else -}}
<p class = "hompage_episode_description">{{ .Description | markdownify }}</p>
{{- end -}}
</div>
{{- end -}}
</div>
{{- with .Params.podcast_file -}}
<div class = "row homepage_episode_row">
<div class = "col-md-12 player_row">
<audio src="{{ $.Site.Params.media_prefix }}{{ . }}" preload="auto" />
</div>
</div>
{{- end -}}
{{- end -}}
{{- end -}}
</div>
{{- if isset .Site.Params "enable_jumbo" -}}
{{- if ne .Site.Params.enable_jumbo "true" -}}
<div class="col-md-4 sidebar_col">
{{- partial "sidebar.html" . -}}
</div>
{{- end -}}
{{- end -}}
</div>
<div class="row">
<div class="col-md-12">
{{- if gt $paginator.TotalPages 1 -}}
<div class = "row">
<div class = "col">
<nav class="pagination justify-content-center">
<ul class="pagination pagination-lg">
{{- with $paginator.First -}}
{{- $url := trim (string .URL) "/" | absURL -}}
<li class="page-item">
<a href="{{ $url }}" aria-label="First" class="page-link"><span aria-hidden="true">««</span></a>
</li>
{{- end -}}
<li class="{{ if not $paginator.HasPrev }}disabled {{ end }}page-item">
<a href="{{ if $paginator.HasPrev }}{{ $paginator.Prev.URL }}{{ end }}" aria-label="Previous" class="page-link"><span aria-hidden="true">«</span></a>
</li>
{{- range $paginator.Pagers -}}
{{- $url := trim (string .URL) "/" | absURL -}}
<li class="{{ if eq . $paginator }}active {{ end }}page-item"><a href="{{ $url }}" class="page-link hidden-md-down">{{ .PageNumber }}</a></li>
{{- end -}}
<li class="{{ if not $paginator.HasNext }}disabled {{ end }}page-item">
<a href="{{ if $paginator.HasNext }}{{ $paginator.Next.URL }}{{ end }}" aria-label="Next" class="page-link"><span aria-hidden="true">»</span></a>
</li>
{{- with $paginator.Last -}}
{{- $url := trim (string .URL) "/" | absURL -}}
<li class="page-item">
<a href="{{ $url }}" aria-label="Last" class="page-link"><span aria-hidden="true">»»</span></a>
</li>
{{- end -}}
</ul>
</nav>
</div>
</div>
{{- end -}}
</div>
</div>
</div> <!-- end section -->
|