Files
buuh/examples/http/views/main.js
T

25 lines
568 B
JavaScript
Raw Normal View History

2016-05-12 12:59:27 +07:00
const pathname = require('pathname-match')
const choo = require('../../../')
module.exports = function (nav) {
return function (params, state, send) {
2016-05-12 14:45:20 +07:00
console.log(state)
2016-05-12 12:59:27 +07:00
return choo.view`
<main class="app">
2016-05-12 14:45:20 +07:00
<span>URL: ${'/' + pathname(state.location)}</span>
2016-05-12 12:59:27 +07:00
${nav(params, state, send)}
<section>
<table>
<tr>
<th>Data</th>
<th>Subject</th>
<th>From</th>
<th>To</th>
</tr>
</table>
</section>
</main>
`
}
}