From 2b712539fc09cb87817cec1afa832362447cacaf Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 16 Jun 2025 20:18:05 -0700 Subject: [PATCH] WIP: further refinement --- index.html | 4 +++- site.moon | 9 ++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index e5f61f7..0157105 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,9 @@ date: "Thu May 08 2025 19:41:30.000000000" } -$list3{ limit = 2 }[[

$title

]] +$list3{ limit = 2 }[[ +

$title

+]]
$each{list3{ limit = 2 }, "post"}[[$post]] diff --git a/site.moon b/site.moon index 775ad4b..1413a48 100644 --- a/site.moon +++ b/site.moon @@ -136,14 +136,9 @@ list3 = (args={}, has_block) => title = title or titleize_slug id url = rootname page\url_for! vals = { title: title, publish_date: pub_date, blurb: blurb, url: url } + if has_block then cosmo.yield vals else common.fill_ignoring_pre template, vals - if has_block - cosmo.yield vals - nil - else - common.fill_ignoring_pre template, vals - - unless has_block then return result + return result unless has_block -- use in templates -- $list2{[[

$title

]], limit = 2}