Card-Fix für Counter und Berechnungs-Fix
All checks were successful
release-tag / release-image (push) Successful in 2m8s
All checks were successful
release-tag / release-image (push) Successful in 2m8s
This commit is contained in:
@@ -101,14 +101,6 @@ func main() {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
for a, b := range articles {
|
||||
articles[a].Counter = getTick(b.Slug)
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
staticPages, err := article.LoadStatic(pagesDir)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
@@ -122,6 +114,15 @@ func main() {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
for a, b := range articles {
|
||||
articles[a].Counter = getTick(b.Slug)
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
if err := tplList.ExecuteTemplate(w, "layout", article.ListPage{
|
||||
Title: "Startseite",
|
||||
Description: "Alle Artikel im Überblick",
|
||||
|
@@ -128,6 +128,7 @@ footer {
|
||||
.card h2 { margin: .25rem 0 .5rem; font-size: 1.25rem; line-height: 1.3; }
|
||||
.card time { color: var(--text-muted); font-size: .85rem; }
|
||||
.card-count { color: var(--text-muted); font-size: .85rem; }
|
||||
.card-meta { display: flex; gap: 1rem; /* optionaler Abstand zwischen den Elementen */}
|
||||
|
||||
/* ---------- Artikel ---------- */
|
||||
.hero {
|
||||
|
@@ -10,8 +10,10 @@
|
||||
{{ end }}
|
||||
<div class="card-content">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
|
||||
<p class="card-count">{{ .Counter }}</p>
|
||||
<div class="card-meta">
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
|
||||
<p class="card-count">{{ .Counter }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user