{{ define "title" }}Archive{{ end }}
{{ define "content" }}

<h1>Archive</h1>

{{ range .V.archive }}
	<div class="card mb-4">
		<div class="card-header">
			<h3>{{ .Date.Format "January, 2006" }}</h3>
		</div>
		<div class="card-body">
			<div class="row">
				{{ range .Posts }}
				<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-4">
					<div class="card bg-secondary"
						style="height: auto; min-height: 150px;
						{{ if .Thumbnail }}background-image: url({{ .Thumbnail }}); background-size: cover{{ end }}
						"
						title="{{ .Title }}">
						<span class="p-1" style="background-color: RGBA(255, 255, 255, 0.8)">
							<a href="/{{ .Fragment }}">{{ .Title }}</a><br>
							<small class="blog-meta">
								{{ .CreatedAt.Format "Jan 02 2006" }}
								{{ if ne .Privacy "public" }}
									<span class="blog-{{ .Privacy }}">[{{ .Privacy }}]</span>
								{{ end }}
							</small>
						</span>
					</div>
				</div>
				{{ end }}
			</div>
		</div>
	</div>
{{ end }}

{{ end }}
