我正在努力处理grunt-assemble grunt任务配置,如下所示:
assemble: {
options: {
flatten: false,
expand: true,
assets: '',
layout: 'default.hbs',
layoutdir: 'templates/layouts',
partials: ['templates/includes/*.hbs'],
helpers: ['templates/helpers/*.js'],
data: ['templates/data/*.{json,yml}']
},
dev: {
src: 'templates/pages/**/*.hbs',
dest: 'build/'
}
Run Code Online (Sandbox Code Playgroud)
assemble.io项目模板的脚手架如下所示:
templates
??? helpers
??? includes
? ??? page-footer.hbs
? ??? page-header.hbs
? ??? scripts.hbs
??? layouts
? ??? default.hbs
??? pages
??? en
? ??? index.hbs
??? fr
? ??? index.hbs
??? index.hbs
Run Code Online (Sandbox Code Playgroud)
我希望得到类似的东西:
build
??? en
? ??? index.html
??? fr
? ??? index.html
??? index.html
Run Code Online (Sandbox Code Playgroud)
但相反,我得到类似的东西: …
当表具有空tbody时,Firefox无法正确呈现表格单元格边框.
但是如果你使用伪选择器 tbody:empty {display:none;}
隐藏tbody元素,则所有内容都按预期呈现.
table {
border-collapse: collapse;
}
th,
td {
border: 1px solid #000;
}
.fixed tbody:empty {
display: none;
}
Run Code Online (Sandbox Code Playgroud)
<table class="broken">
<thead>
<tr>
<th>1</th>
<td>2</td>
<td>3</td>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>1</th>
<td>2</td>
<td>3</td>
</tr>
</tfoot>
</table>
<hr />
<table class="fixed">
<thead>
<tr>
<th>1</th>
<td>2</td>
<td>3</td>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>1</th>
<td>2</td>
<td>3</td>
</tr>
</tfoot>
</table>
Run Code Online (Sandbox Code Playgroud)