blob: 71df6074e9bbe57e51f6bdaba0745fab7addf7dc [file] [log] [blame]
<!--
Copyright 2021 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
{{define "vuln-message"}}
<div class="go-Message go-Message--alert">
<img
class="go-Icon"
height="24"
width="24"
src="/static/shared/icon/alert_gm_grey_24dp.svg"
alt="Alert"
/>&nbsp;
<a href="/vuln/{{.ID}}">{{.ID}}</a>: {{.Details}}
</div>
{{end}}
{{define "vuln-chip"}}
<span class="go-Chip go-Chip--alert">{{.}}</span>
{{end}}
{{define "vuln-chip-first"}}
{{template "vuln-chip" (index . 0).ID}}
{{end}}
{{define "vuln-chip-more"}}
{{$more := (subtract (len .) 1)}}
{{template "vuln-chip" (printf "+%d more" $more)}}
{{end}}
{{define "vuln-chip-condensed"}}
{{if .}}
{{template "vuln-chip-first" .}}
{{end}}
{{if (gt (len .) 1)}}
{{template "vuln-chip-more" .}}
{{end}}
{{end}}
{{define "vuln-chip-condensed-div"}}
{{if .}}
<div>{{template "vuln-chip-first" .}}</div>
{{end}}
{{if (gt (len .) 1)}}
<div>{{template "vuln-chip-more" .}}</div>
{{end}}
{{end}}