使用Ghost的车把按所需顺序选择帖子

时间:2018-08-20 13:41:26

标签: handlebars.js ghost-blog

我要按以下顺序选择元素:

1

2, 3, 7, 8, 12, 13, 17, 18 ...

4, 5, 6, 9, 10, 11, 14, 15, 16 ...

CSS中,我将执行以下操作:

:first-of-type

:nth-of-type(5n + 2),
:nth-of-type(5n + 3)

:nth-of-type(5n + 4),
:nth-of-type(5n + 5),
:nth-of-type(5n + 6)

================  <- 1
=======  =======  <- 2, 3
====  ====  ====  <- 4, 5, 6
=======  =======  <- 7, 8
====  ====  ====  <- 9, 10, 11
=======  =======  <- 12, 13
====  ====  ====  <- 14, 15, 16

如何使用Ghost的{​​{1}}来做到这一点?我在docs中找到了:

handlebars

似乎我需要单独选择第一项,因为它不适合使用{{#has number="nth:3"}} 可以完成的顺序。

0 个答案:

没有答案