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,78 +1,90 @@
|
|||
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||
{{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
<tr>
|
||||
<td>TODO</td>
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||
</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
Since {{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
Since
|
||||
{{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
<tr>
|
||||
<td colspan=4><h3>Diary</h3></td>
|
||||
<td colspan="6"><h3>Diary</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
<tr>
|
||||
<td>TODO</td>
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||
</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}–{{- if index . "Date Finished" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
{{- if index . "Level of Completion" }} <span class="games__level-of-completion">({{ index . "Level of Completion" }})</span>{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>
|
||||
{{- with index . "Level of Completion" }}
|
||||
{{ . }}
|
||||
{{- end -}}
|
||||
</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}–{{- if index . "Date Finished" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td colspan=5><h3>Assorted</h3></td>
|
||||
<td colspan="6"><h3>Assorted</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
<tr>
|
||||
<td>TODO</td>
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||
</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}–{{- if index . "Date Finished" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
{{- if index . "Level of Completion" }} <span class="games__level-of-completion">({{ index . "Level of Completion" }})</span>{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>
|
||||
{{- with index . "Level of Completion" }}
|
||||
{{ . }}
|
||||
{{- end -}}
|
||||
</td>
|
||||
<td>
|
||||
{{- if index . "Date Started" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}–{{- if index . "Date Finished" -}}
|
||||
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||
{{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
<tr>
|
||||
<td>TODO</td>
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||
</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>n/a</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue