This commit is contained in:
tatianamac
2019-11-26 14:50:43 -08:00
parent 8a55660ed0
commit 6d5445ecc5
13894 changed files with 2233957 additions and 0 deletions

1
node_modules/liquidjs/demo/browser/date.html generated vendored Normal file
View File

@ -0,0 +1 @@
access time: {{date|date: "%Y-%m-%d %H:%M:%S"}}

1
node_modules/liquidjs/demo/browser/hello.html generated vendored Normal file
View File

@ -0,0 +1 @@
<h2>Welcome to {{ name | capitalize}}, {% include 'date.html' %}</h2>

31
node_modules/liquidjs/demo/browser/index.html generated vendored Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>liquidjs for the browser</title>
<script src="../../dist/liquid.js"></script>
</head>
<body>
<script>
var engine = window.Liquid({
extname: '.html',
cache: true
});
var src = '<h2>Welcome to {{ name | capitalize}}, ' +
'access time: {{date|date: "%Y-%m-%d %H:%M:%S"}}&lt;/h2>';
var ctx = {
name: 'Liquid',
date: new Date()
};
engine.parseAndRender(src, ctx)
.then(function(html) {
return engine.renderFile('hello', ctx);
})
.then(function(html) {
document.body.innerHTML += html
});
</script>
</body>
</html>