feat: custom sections, TV series section, fix table wrapping
This commit is contained in:
parent
995a539fa9
commit
39c64bf51a
17 changed files with 402 additions and 204 deletions
86
layouts/partials/tv/series/table-body.html
Normal file
86
layouts/partials/tv/series/table-body.html
Normal file
|
@ -0,0 +1,86 @@
|
|||
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||
{{ range ( sort $.Site.Data.tv_series.current "date_started" "desc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
{{ with .date_added }}
|
||||
{{ time.Format "Jan 2, 2006" . }}
|
||||
{{ else }}
|
||||
n/a
|
||||
{{ end }}
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- with ( index . "name" ) -}}
|
||||
<cite
|
||||
class="cite"
|
||||
itemscope
|
||||
itemtype="TVSeries"
|
||||
>{{ . }}</cite
|
||||
>
|
||||
{{- end -}}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- partial "books/rows/read-dates.html" . -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
{{ .Scratch.Set "filterCol" "date_finished" }}
|
||||
{{ .Scratch.Set "filterDir" "desc" }}
|
||||
{{ end }}
|
||||
|
||||
{{ range ( sort $.Site.Data.tv_series.log ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
|
||||
<tr>
|
||||
<td>
|
||||
{{ with .date_added }}
|
||||
{{ time.Format "Jan 2, 2006" . }}
|
||||
{{ else }}
|
||||
n/a
|
||||
{{ end }}
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- with ( index . "name" ) -}}
|
||||
<cite
|
||||
class="cite"
|
||||
itemscope
|
||||
itemtype="TVSeries"
|
||||
>{{ . }}</cite
|
||||
>
|
||||
{{- end -}}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- partial "books/rows/read-dates.html" . -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||
{{ range ( sort $.Site.Data.tv_series.wishlist "name" "asc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
{{ with .date_added }}
|
||||
{{ time.Format "Jan 2, 2006" . }}
|
||||
{{ else }}
|
||||
n/a
|
||||
{{ end }}
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- with ( index . "name" ) -}}
|
||||
<cite
|
||||
class="cite"
|
||||
itemscope
|
||||
itemtype="TVSeries"
|
||||
>{{ . }}</cite
|
||||
>
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue