aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/style.css1
-rw-r--r--render.js14
-rw-r--r--views.js6
3 files changed, 13 insertions, 8 deletions
diff --git a/css/style.css b/css/style.css
index 4726e84..fad1090 100644
--- a/css/style.css
+++ b/css/style.css
@@ -202,6 +202,7 @@ form.search {
text-decoration: none;
}
+.profileAvatar { width: 75px; vertical-align: top; border-radius: 5px; margin-right: .25em; margin-bottom: .25em;}
.avatar { width: 25px; height: 25px; vertical-align: middle; border-radius: 5px; margin-right: .2em; }
button {
diff --git a/render.js b/render.js
index f7031d0..8ed5cba 100644
--- a/render.js
+++ b/render.js
@@ -145,16 +145,16 @@ function render (msg, keys, preview) {
}
}
} else if (msg.type == 'name') {
- message.appendChild(getHeader(msg, keys))
- message.appendChild(h('span', ['identified ', h('a', {href: '#' + msg.named }, [msg.named.substring(0, 10) + '...']), ' as ' + msg.name]))
+ var mini = h('span', [' identified ', h('a', {href: '#' + msg.named }, [msg.named.substring(0, 10) + '...']), ' as ' + msg.name])
+ message.appendChild(getHeader(msg, keys, mini))
} else if (msg.type == 'image') {
- message.appendChild(getHeader(msg, keys))
- message.appendChild(h('span', [
- 'identified ',
+ var mini = h('span', [
+ ' identified ',
h('a', { href: '#' + msg.imaged }, [msg.imaged.substring(0, 10) + '...']),
' as ',
- h('img', {src: msg.image})
- ]))
+ h('img', {src: msg.image, classList: 'avatar'})
+ ])
+ message.appendChild(getHeader(msg, keys, mini))
}
messageDiv.appendChild(message)
diff --git a/views.js b/views.js
index 0d8a532..018802d 100644
--- a/views.js
+++ b/views.js
@@ -21,7 +21,11 @@ function profilePage (src, keys) {
sync(subs, keys)
- profile.appendChild(h('a', {href: '#' + src}, [getName(src, keys)]))
+ profile.appendChild(h('a', {href: '#' + src}, [
+ getImage(src, keys, 'profileAvatar'),
+ getName(src, keys)
+ ]))
+
profile.appendChild(h('br'))
var mentionsButton = h('button', {