logs, logs-content: Added basic view of logs and added characters to logs

This commit is contained in:
2018-09-29 13:38:18 +02:00
parent 35cee41d3a
commit ed01006b21
27 changed files with 442 additions and 13 deletions
@@ -0,0 +1,17 @@
const moment = require("moment")
module.exports = class {
onCreate(input) {
this.state = {
log: input.log
}
}
get title() {
if (this.state.log.title) {
return this.state.log.title
}
return `${this.state.log.channel.name} – ${moment(this.state.log.date).format("MMMM D, YYYY")}`
}
}
@@ -0,0 +1,7 @@
<logs-content-menu user=input.user log=state.log />
<main>
<div class="logs-content">
<h1 class="color-primary">${component.title}</h1>
<post for(post in state.log.posts) post=post characters=state.log.characters />
</div>
</main>
@@ -0,0 +1,10 @@
div.logs-content {
width: 90%;
max-width: 75ch;
margin: auto;
h1 {
font-weight: 200;
text-align: center;
}
}