You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
614 B
20 lines
614 B
!!! 5
|
|
html
|
|
head
|
|
body
|
|
textarea#input(placeholder='write pug here', style='width: 100%; min-height: 400px;').
|
|
p
|
|
author
|
|
!= myName
|
|
pre(style='background: #ECECEC;width: 100%; min-height: 400px;')
|
|
code#output
|
|
script(src='../../pug.js')
|
|
script.
|
|
var input = document.getElementById('input');
|
|
var output = document.getElementById('output');
|
|
setInterval(function () {
|
|
pug.render(input.value, {myName: 'Forbes Lindesay', pretty: true}, function (err, res) {
|
|
if (err) throw err;
|
|
output.textContent = res;
|
|
})
|
|
}, 500)
|