WIP: further refinement
This commit is contained in:
parent
9b5de2eafd
commit
56be76b443
@ -2,7 +2,9 @@
|
|||||||
date: "Thu May 08 2025 19:41:30.000000000"
|
date: "Thu May 08 2025 19:41:30.000000000"
|
||||||
}
|
}
|
||||||
|
|
||||||
$list3{ limit = 2 }[[<section><h3>$title</h3></section>]]
|
$list3{ limit = 2 }[[
|
||||||
|
<section><h3>$title</h3></section>
|
||||||
|
]]
|
||||||
<hr />
|
<hr />
|
||||||
$each{list3{ limit = 2 }, "post"}[[$post]]
|
$each{list3{ limit = 2 }, "post"}[[$post]]
|
||||||
|
|
||||||
|
@ -136,14 +136,9 @@ list3 = (args={}, has_block) =>
|
|||||||
title = title or titleize_slug id
|
title = title or titleize_slug id
|
||||||
url = rootname page\url_for!
|
url = rootname page\url_for!
|
||||||
vals = { title: title, publish_date: pub_date, blurb: blurb, url: url }
|
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
|
return result unless has_block
|
||||||
cosmo.yield vals
|
|
||||||
nil
|
|
||||||
else
|
|
||||||
common.fill_ignoring_pre template, vals
|
|
||||||
|
|
||||||
unless has_block then return result
|
|
||||||
|
|
||||||
-- use in templates
|
-- use in templates
|
||||||
-- $list2{[[<p>$title</p>]], limit = 2}
|
-- $list2{[[<p>$title</p>]], limit = 2}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user