aboutsummaryrefslogtreecommitdiff
path: root/views/includes/card.html
blob: a96cb49fbed60bc0d89d93afcfd5fe17dec9f1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{{ define "card" }}
{{ $card := . }}
<div class="col s12 m6 l4">
	<div class="card white">
		<div class="card-content black-text">
			{{ if $card.Image }}
			<div class="center-align" style="padding-top: 8px">
				<img class="circle responsive-img card-image" src="{{ $card.Image }}" />
			</div>
			{{ end }}
			<span class="card-title">{{ $card.Title | html }}</span>
			<p>{{ $card.Description | html }}</p>
		</div>
		<div class="card-action">
			{{ range $action := $card.Actions }}
				{{ if $action.Disabled }}
					<span>{{ $action.Name | html }}</span>
				{{ else }}
					<a {{ if $action.Target }} target="{{ $action.Target }}" {{ end }} class="purple-text text-lighten-2" href="{{ $action.Link }}">{{ $action.Name | html }}</a>
				{{ end }}
			{{ end }}
		</div>
	</div>
</div>
{{ end }}