我试图弄清楚如何适当地使用 Liquidcycle
和 html blelow。这是一个永无止境的行,最大 3 列 ( float:left
) 布局。
<!-- row -->
<div class="single-post-container">
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
</div>
<!-- row -->
<div class="single-post-container">
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
<div class="single-post-item">
<div class="single-post-head">
<a href="{{ post.url }}" />
<h6>{{ post.title }}</h6>
</div>
</div>
</div>
我能够用这个丑陋的东西让它半工半读({{ post.title }}
字面上显示而不是实际的标题):
{% for post in site.posts %}
column {%cycle '<div class="single-post-container"><div class="single-post-item"><div class="single-post-head"><a href="{{ post.url }}" /><h6>{{ post.title }}</h6></div></div>', '<div class="single-post-item"><div class="single-post-head"><a href="{{ post.url }}" /><h6>{{ post.title }}</h6></div></div>', '<div class="single-post-item"><div class="single-post-head"><a href="{{ post.url }}" /><h6>{{ post.title }}</h6></div></div></div>'%}
{% endfor %}
请帮忙!也许有更好的方法?