| @@ -1,4 +1,5 @@ | |||
| .chat { | |||
| z-index: 999; | |||
| background-color: rgba(255, 255, 255, 0.95); | |||
| position: fixed; | |||
| height: 140px; | |||
| @@ -6,6 +7,15 @@ | |||
| right: 0; | |||
| top: 0; | |||
| } | |||
| .not-chat { | |||
| z-index: 999; | |||
| background-color: rgba(0, 0, 0, 0.8); | |||
| position: fixed; | |||
| height: 100vh; | |||
| width: 100vw; | |||
| right: 0; | |||
| top: 0; | |||
| } | |||
| .chat .actions { | |||
| display: grid; | |||
| grid-template-columns: 1fr auto; | |||
| @@ -120,9 +120,12 @@ const Chat = { | |||
| }) | |||
| }, | |||
| view() { | |||
| return ChatConfig.isOn ? m('.chat', | |||
| m('.posts', this.posts.map(post => m(Post, {post}))), | |||
| m(TextBox), | |||
| ) : null | |||
| return ChatConfig.isOn ? [ | |||
| m('.not-chat', {onclick: () => ChatConfig.isOn = false}), | |||
| m('.chat', | |||
| m('.posts', this.posts.map(post => m(Post, {post}))), | |||
| m(TextBox), | |||
| ) | |||
| ] : null | |||
| }, | |||
| } | |||