nueroplastic til post

This commit is contained in:
2026-02-24 00:37:11 -07:00
parent a47a28e074
commit 60c4ab4137
14 changed files with 293 additions and 136 deletions
+36 -12
View File
@@ -38,22 +38,46 @@
{{ if isset .Site.Params "showpostsonhomepage" }}
<div class="home-posts list-posts">
<h2>Recent Posts</h2>
<div class="home-grid">
<div class="home-posts-column home-posts list-posts">
<h2>Recent Posts</h2>
{{ $posts := where .Site.Pages "Params.type" "post" }}
{{ $posts := where .Site.Pages "Params.type" "post" }}
{{ if eq .Site.Params.ShowPostsOnHomePage "popular" }}
{{ range $posts.ByWeight | first (or .Site.Params.NumberPostsOnHomePage 4) }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ else if eq .Site.Params.ShowPostsOnHomePage "recent" }}
{{ range $posts.ByDate.Reverse | first (or .Site.Params.NumberPostsOnHomePage 4) }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ if eq .Site.Params.ShowPostsOnHomePage "popular" }}
{{ range $posts.ByWeight | first (or .Site.Params.NumberPostsOnHomePage 4) }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ else if eq .Site.Params.ShowPostsOnHomePage "recent" }}
{{ range $posts.ByDate.Reverse | first (or .Site.Params.NumberPostsOnHomePage 4) }}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ end }}
</div>
{{ $projects := where .Site.RegularPages "Params.type" "projects" }}
{{ if gt (len $projects) 0 }}
<div class="home-projects-card">
<h2>Project Updates</h2>
{{ range $projects.ByLastmod.Reverse | first (or $.Site.Params.NumberProjectsOnHomePage 3) }}
{{ $project := . }}
<div class="home-project-entry">
<a href="{{ .Permalink }}">{{ .Title }}</a>
<div class="home-project-meta">
{{ with .Params.status }}
{{ $color := $project.Params.statusColor | default "#9e9e9e" }}
<span class="home-project-status" style="color: {{ $color }}; border: 1px solid {{ $color }}; background-color: {{ $color }}20;">{{ . }}</span>
&middot;
{{ end }}
Updated {{ $project.Lastmod.Format "Jan 2, 2006" }}
</div>
</div>
{{ end }}
<a class="view-all" href="/projects/">View all projects &rarr;</a>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ end }}