initial commit
This commit is contained in:
commit
5c664be9a8
55 changed files with 8825 additions and 0 deletions
78
layouts/partials/games/table-body.html
Normal file
78
layouts/partials/games/table-body.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||
{{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }}
|
||||
<tr>
|
||||
<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>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||
<tr>
|
||||
<td colspan=4><h3>Diary</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
||||
<tr>
|
||||
<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>
|
||||
{{ end }}
|
||||
<tr>
|
||||
<td colspan=5><h3>Assorted</h3></td>
|
||||
</tr>
|
||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }}
|
||||
<tr>
|
||||
<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>
|
||||
{{ end }}
|
||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||
{{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }}
|
||||
<tr>
|
||||
<td>
|
||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||
</td>
|
||||
<td>{{ index . "Date Released" }}</td>
|
||||
<td>{{ .Platforms }}</td>
|
||||
<td>n/a</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue