mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Added failing test for https://github.com/raptorjs/marko-layout/issues/2
This commit is contained in:
parent
4596c93668
commit
11190d3db6
1
test/fixtures/templates/layout-use-html-ext/expected.html
vendored
Normal file
1
test/fixtures/templates/layout-use-html-ext/expected.html
vendored
Normal file
@ -0,0 +1 @@
|
||||
<h1>DEFAULT TITLE</h1><div>BODY CONTENT</div>FOOTER CONTENT
|
||||
9
test/fixtures/templates/layout-use-html-ext/layout-default.html
vendored
Normal file
9
test/fixtures/templates/layout-use-html-ext/layout-default.html
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<h1>
|
||||
<layout-placeholder name="header">
|
||||
DEFAULT TITLE
|
||||
</layout-placeholder>
|
||||
</h1>
|
||||
<div>
|
||||
<layout-placeholder name="body"/>
|
||||
</div>
|
||||
<layout-placeholder name="footer"/>
|
||||
38
test/fixtures/templates/layout-use-html-ext/layout-default.html.js
vendored
Normal file
38
test/fixtures/templates/layout-use-html-ext/layout-default.html.js
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
function create(__helpers) {
|
||||
var str = __helpers.s,
|
||||
empty = __helpers.e,
|
||||
notEmpty = __helpers.ne,
|
||||
__renderer = __helpers.r,
|
||||
____________node_modules_marko_layout_placeholder_tag_js = __renderer(require("marko-layout/placeholder-tag")),
|
||||
__tag = __helpers.t;
|
||||
|
||||
return function render(data, out) {
|
||||
out.w('<h1>');
|
||||
__tag(out,
|
||||
____________node_modules_marko_layout_placeholder_tag_js,
|
||||
{
|
||||
"name": "header",
|
||||
"content": data.layoutContent
|
||||
},
|
||||
function(out) {
|
||||
out.w('DEFAULT TITLE');
|
||||
});
|
||||
|
||||
out.w('</h1><div>');
|
||||
__tag(out,
|
||||
____________node_modules_marko_layout_placeholder_tag_js,
|
||||
{
|
||||
"name": "body",
|
||||
"content": data.layoutContent
|
||||
});
|
||||
|
||||
out.w('</div>');
|
||||
__tag(out,
|
||||
____________node_modules_marko_layout_placeholder_tag_js,
|
||||
{
|
||||
"name": "footer",
|
||||
"content": data.layoutContent
|
||||
});
|
||||
};
|
||||
}
|
||||
(module.exports = require("marko").c(__filename)).c(create);
|
||||
4
test/fixtures/templates/layout-use-html-ext/template.marko
vendored
Normal file
4
test/fixtures/templates/layout-use-html-ext/template.marko
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<layout-use template="./layout-default.html">
|
||||
<layout-put into="body">BODY CONTENT</layout-put>
|
||||
<layout-put into="footer">FOOTER CONTENT</layout-put>
|
||||
</layout-use>
|
||||
1
test/fixtures/templates/layout-use-html-ext/test.js
vendored
Normal file
1
test/fixtures/templates/layout-use-html-ext/test.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
exports.templateData = {};
|
||||
Loading…
x
Reference in New Issue
Block a user