diff options
Diffstat (limited to 'layouts/shortcodes/ep-table.html')
-rw-r--r-- | layouts/shortcodes/ep-table.html | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/layouts/shortcodes/ep-table.html b/layouts/shortcodes/ep-table.html index 59448a1..5614cb3 100644 --- a/layouts/shortcodes/ep-table.html +++ b/layouts/shortcodes/ep-table.html @@ -1 +1,37 @@ -{{ .Inner }} +{{- $caption := .Inner }} +{{- $page := .Page }} +{{- $site := .Site }} + +{{ with $file := .Get 0 }} +{{ with resources.Get $file}} +{{ with . | transform.Unmarshal }} +<table class="eptab"> + <tr> + <th scope="col">Air date</th> + <th scope="col">Ep#</th> + <th scope="col">Prod#</th> + <th scope="col">Title</th> + </tr> + {{ range .episodes }} + + {{ $detailUrl := where site.RegularPages "Params.episode_id" .Episode }} + + <tr> + <td>{{ .USRelDate }}</td> + <td>{{ .Episode }}</td> + <td>{{ .ProductionNo }}</td> + <td> + {{ if $detailUrl}} + <a href="{{ (index $detailUrl 0).Permalink }}">{{ .Title }}</a> + {{ else }} + {{ .Title }} + {{ end }} + </td> + </tr> +</tr> +{{ end }} +</table> +{{ end }} +{{ end }} +{{ end }} + |