fosscat-site/layouts/projects/list.html

63 lines
1.4 KiB
HTML

{{ 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;
}
.status-active {
background-color: rgba(76, 175, 80, 0.15);
color: #4caf50;
border: 1px solid #4caf50;
}
.status-inactive {
background-color: rgba(158, 158, 158, 0.15);
color: #9e9e9e;
border: 1px solid #9e9e9e;
}
.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>
{{ if .Params.active }}
<span class="status-badge status-active">Active</span>
{{ else }}
<span class="status-badge status-inactive">Inactive</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 }}