{{ define "main" }}
<style>
  .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    vertical-align: middle;
  }


  .project-date {
    font-size: 0.85rem;
    color: var(--light-secondary-color);
    margin-left: 0.5rem;
  }
</style>

<div class="container">
  <h1 class="page-title">{{ .Title }}</h1>

  {{ .Content }}

  <div class="posts-list">
    {{ range .Pages }}
    <article class="post-entry">
      <header class="entry-header">
        <h3 class="entry-title">
          <a href="{{ .Permalink }}" rel="bookmark">{{ .Title }}</a>
          {{ $page := . }}
          {{ with .Params.status }}
          {{ $color := $page.Params.statusColor | default "#9e9e9e" }}
          <span class="status-badge" style="color: {{ $color }}; border: 1px solid {{ $color }}; background-color: {{ $color }}20;">{{ . }}</span>
          {{ end }}
          <span class="project-date">Updated {{ .Lastmod.Format "Jan 2, 2006" }}</span>
        </h3>
      </header>
      {{ with .Description }}
      <div class="entry-summary">{{ . }}</div>
      {{ end }}
    </article>
    {{ end }}
  </div>

  {{ if eq (len .Pages) 0 }}
  <p>No projects yet.</p>
  {{ end }}
</div>
{{ end }}
