Files: ca718f616a051e93adeb22faa3fc06646f667973 / profiles / view.js
533 bytesRaw
1 | const html = require('inu/html') |
2 | const css = require('sheetify') |
3 | |
4 | module.exports = ProfileView |
5 | |
6 | css` |
7 | .avatar { |
8 | position: fixed; |
9 | left: 10px; |
10 | bottom: 10px; |
11 | color: #fff; |
12 | } |
13 | |
14 | .avatar .image { |
15 | max-height: 160px; |
16 | } |
17 | ` |
18 | |
19 | function ProfileView (config) { |
20 | return (profile, dispatch) => { |
21 | if (profile === undefined) return |
22 | const { name, image } = profile |
23 | |
24 | return html` |
25 | <div class="profile"> |
26 | <img class="image" src=${image} /> |
27 | <div class="name">${name}</div> |
28 | </div> |
29 | ` |
30 | } |
31 | } |
32 |
Built with git-ssb-web