Extract html into separate module (#103)

This commit is contained in:
Todd Kennedy
2016-07-02 12:55:41 +02:00
committed by Yoshua Wuyts
parent d0920f153f
commit 8f8df602c5
19 changed files with 61 additions and 52 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
const dateformat = require('dateformat')
const choo = require('../../../')
const html = require('../../../html')
module.exports = function (params, state, send) {
const mailbox = params.mailbox
const messages = state[mailbox].messages
return choo.view`
return html`
<div>
<div class="db cf w-100">
<div class="fl mb3 w-25 mt0 b">Date</th>
@@ -20,7 +20,7 @@ module.exports = function (params, state, send) {
}
function createMessage (message, mailbox) {
return choo.view`
return html`
<div class="db cf w-100">
<a href="${'/' + mailbox + '/' + message.id}">
<div class="fl mb3 w-25 f6 link">