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
|
@ -1,81 +1,78 @@
|
|||
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
<tr>
|
||||
<td colspan=4><h3>Diary</h3></td>
|
||||
<td colspan="4"><h3>Diary</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }}
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
|
||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
<td>
|
||||
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- if .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||
{{- if .is_repeat }} ↻{{ end -}}
|
||||
{{- else -}}
|
||||
n/a
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
{{- if .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||
{{- if .is_repeat }}↻{{ end -}}
|
||||
{{- else -}}
|
||||
n/a
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td colspan=4><h3>Assorted</h3></td>
|
||||
<td colspan="4"><h3>Assorted</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }}
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
|
||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
<td>
|
||||
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{- if .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||
{{- if .is_repeat }} ↻{{ end -}}
|
||||
{{- else -}}
|
||||
n/a
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
{{- if .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||
{{- if .is_repeat }}↻{{ end -}}
|
||||
{{- else -}}
|
||||
n/a
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||
{{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }}
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
<tr>
|
||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
|
||||
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
{{- with .comments -}}
|
||||
<p class="comments">Comments: {{ . }}</p>
|
||||
{{- end -}}
|
||||
</td>
|
||||
|
||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
||||
|
||||
<td>
|
||||
{{- if .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||
{{- if .is_repeat }} ↻{{ end -}}
|
||||
{{- else -}}
|
||||
n/a
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<th>Date Added</th>
|
||||
<th>Title</th>
|
||||
<th>Release Date</th>
|
||||
<th>Date Watched</th>
|
||||
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
<th>Date Watched</th>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue