{ category }
--
- for _, article := range articles {
- if !article.Draft {
-
- { article.Title } - } +
- { article.Title } } -
{ category }
+-
+ for _, article := range articles {
+ if !article.Draft {
+
diff --git a/templates.go b/templates.go index 224c48e47c4ae020b90560310bb6a01f9d88385a..e8b8b3a12605f00a6ac32be4939ca46426bb898c 100644 --- a/templates.go +++ b/templates.go @@ -93,16 +93,6 @@ } return true } -func Published(articles []Article) int { - var num int - for _, a := range articles { - if !a.Draft { - num++ - } - } - return num -} - var ( opts = []chromahtml.Option{ chromahtml.WithClasses(true), diff --git a/templates.templ b/templates.templ index 00a0b9bdb66eba2b0398e66c8b2149c410204659..7d1bbcfdd525bbf3bacc5465bfeb82682ad0e9ff 100644 --- a/templates.templ +++ b/templates.templ @@ -30,16 +30,14 @@
Just a guy living in the middle of nowhere who likes to hack on open-source.
{ article.Category }
{ article.Date.Format("Mon, 02 Jan 2006") }
-Just a guy living in the middle of nowhere who likes to hack on open-source.
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var6 := `Just a guy living in the middle of nowhere who likes to hack on open-source.` + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var6) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
")
+ var templ_7745c5c3_Var13 string = article.Title
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var13 string
- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(article.Category)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates.templ`, Line: 55, Col: 48}
+ return templ_7745c5c3_Err
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
+ var templ_7745c5c3_Var14 string = article.Category
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -230,12 +225,8 @@ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
- var templ_7745c5c3_Var14 string
- templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(article.Date.Format("Mon, 02 Jan 2006"))
- if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates.templ`, Line: 56, Col: 71}
- }
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
+ var templ_7745c5c3_Var15 string = article.Date.Format("Mon, 02 Jan 2006")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -251,12 +242,21 @@ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}