logs, logs-content: Added basic view of logs and added characters to logs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user