{{- /* artifacts.tmpl ~ the template is for the artifact cards. see the artifact.tmpl for the single artifact page template. */ -}} {{- define "content" }} {{- $files := index .stats.files }} {{- $years := index .stats.years}} {{- $cnt := len .records}} {{- $web := index .website }} {{- $linkWeb := gt (len $web) 0}} {{- $zoo := index .demozoo }} {{- $linkZoo := ne $zoo "0"}} {{- $sixteen := index .sixteen }} {{- $link16C := ne $sixteen ""}} {{- $scener := index .scener }} {{- $noYears := false}} {{- $unYears := index .unknownYears }} {{- $editor := index .editor}}

There {{if eq $cnt 1}}is{{else}}are{{end}} {{$files | safeHTML}}{{if ne $years ""}} from {{$years | safeHTML}}{{end}}.

{{- if or $linkZoo $link16C $linkWeb}}

{{- if $linkZoo}} Production and member lists Demozoo{{linkSVG}}
{{- end}} {{- if $link16C}} ANSI and text artworks 16colors{{linkSVG}}
{{- end}} {{- if $linkWeb}} {{- range $web }} {{- if and (ne .URL "") (eq .NotWorking false ) }} {{.Name}}{{websiteIcon .URL}}
{{- end}} {{- if and (ne .URL "") (eq .NotWorking true ) }} {{.Name}} ex-site, {{.URL}}
{{- end}} {{- end}} {{- end}}

{{- end}} {{- $rowCols := "row-cols-1 row-cols-md-2 row-cols-lg-3"}}
{{- /* Begin the iteration of the records */}} {{- range .records }} {{- $filename := .Filename.String}} {{- if eq $filename ""}}{{$filename = "no filename provided"}}{{end}} {{- $forApproval := and (eq .Deletedat.IsZero false) (eq .Deletedby.String "")}} {{- if and (ne $forApproval true) (eq $unYears true) (eq $noYears false) (eq .DateIssuedYear.Int16 0)}} {{- /* Create a break in the the iteration of the records when $noYears is true. This should never display with search or order by date of records listings. */ -}} {{- $noYears = true}}

These are files from an unknown year

{{- end}} {{- /* Card for an individual artifact record */}} {{- $attr := attribute .CreditText.String .CreditProgram.String .CreditIllustration.String .CreditAudio.String $scener}} {{- $cardClass := "h-100"}} {{- $forClass := " border border-1 border-info"}} {{if $forApproval}}{{$cardClass = print $cardClass print $forClass}}{{end}} {{- $removedClass := " border border-2 border-danger"}} {{- $removed := and (eq .Deletedat.IsZero false) (ne .Deletedby.String "")}} {{if $removed}}{{$cardClass = print $cardClass print $removedClass}}{{end}} {{- $unwantedClass := " border border-1 border-warning"}} {{- $unwanted := (ne .FileSecurityAlertURL.String "")}} {{if $unwanted}}{{$cardClass = print $cardClass print $unwantedClass}}{{end}}
{{$filename}}

{{linkRelrs .GroupBrandFor .GroupBrandBy }}

{{subTitle .Section .RecordTitle}}

{{describe .Platform .Section .DateIssuedYear .DateIssuedMonth}}

{{lastUpdated .Updatedat}}

{{- if ne $attr ""}}

{{$attr}}

{{- end}} {{- if eq $editor true}} {{- /* TODO use a template to only render for /editor/for-approval */ -}}

{{- demozooGetLink .Filename .Filesize .WebIDDemozoo .UUID }} {{- end}} {{- linkPage .ID}} {{- linkDownload .ID .FileSecurityAlertURL.String }}{{ downloadB .Filesize}} {{- linkPreview .ID .Filename.String .Platform.String}}
{{thumb .UUID.String .Filename.String true }}
{{- /* End of the iteration of the records */}} {{- end}}
{{- end}}