diff options
| author | Ev Bogue <ev@evbogue.com> | 2020-01-11 06:13:44 -0600 | 
|---|---|---|
| committer | Ev Bogue <ev@evbogue.com> | 2020-01-11 06:13:44 -0600 | 
| commit | dac0064cf55e6a3f9321ea78875bfe8ca9952fc3 (patch) | |
| tree | 733e599998b83f9b811cac668561eabb2006507c | |
| parent | cb59e302155933359a8500b3094b1fb495c89afb (diff) | |
finish adding backgrounds to profiles
| -rw-r--r-- | css/style.css | 4 | ||||
| -rw-r--r-- | gossip.js | 4 | ||||
| -rw-r--r-- | identify.js | 6 | ||||
| -rw-r--r-- | views.js | 12 | 
4 files changed, 13 insertions, 13 deletions
| diff --git a/css/style.css b/css/style.css index df53ffe..26784e7 100644 --- a/css/style.css +++ b/css/style.css @@ -56,6 +56,8 @@ hr {  .right { float: right;} +.banner {height: 10px; } +  .message, .profile {    border: 1px solid #ddd;    background: white; @@ -67,8 +69,6 @@ hr {    border-radius: 5px;  } -.banner { height: 275px; } -  #scroller:last-child { margin-bottom: 10em; }  .message, .message > *, .navbar, .navbar > *, #ad, #ad > *, #viewer > * { @@ -49,7 +49,7 @@ function processreq (req, pubkey, connection, keys) {                  var src = window.location.hash.substring(1)                  if ((src === msg.author) || (src === '')) {                    var scroller = document.getElementById('scroller') -                  scroller.insertBefore(render(opened, keys), scroller.childNodes[2]) +                  scroller.insertBefore(render(opened, keys), scroller.childNodes[1])                  }                  if (opened.seq === req.length) {                    localforage.setItem('log', log) @@ -71,7 +71,7 @@ function processreq (req, pubkey, connection, keys) {                      var src = window.location.hash.substring(1)                      if ((src === msg.author) || (src === '')) {                        var scroller = document.getElementById('scroller') -                      scroller.insertBefore(render(opened, keys), scroller.childNodes[2]) +                      scroller.insertBefore(render(opened, keys), scroller.childNodes[1])                      }                      if (req.length + lastmsg.seq === opened.seq) {                        localforage.setItem('log', log) diff --git a/identify.js b/identify.js index eb8827c..f56a0f9 100644 --- a/identify.js +++ b/identify.js @@ -1,4 +1,4 @@ -function identify (src, profile, keys) { +function identify (src, profile, keys, name) {    var identifyDiv = h('div') @@ -213,7 +213,6 @@ function identify (src, profile, keys) {        identifyButtons.parentNode.removeChild(identifyButtons)      }    }, ['Cancel'])) -    if (src[0] == '@') {      var identifyButton = h('button', {        onclick: function () { @@ -221,7 +220,7 @@ function identify (src, profile, keys) {          profile.appendChild(identifyButtons)          identifyButton.parentNode.removeChild(identifyButton)        } -    }, ['Identify ' + src.substring(0, 10) + '...']) +    }, ['Identify ' + name])    } else {      var identifyButton = h('button', {        onclick: function () { @@ -231,6 +230,7 @@ function identify (src, profile, keys) {        }      }, ['Add to ' + src.substring(0, 10) + '...'])    } +     return identifyButton  } @@ -8,6 +8,7 @@ function profilePage (src, keys) {    var msg = {}    msg.author = src +  var profileDiv = h('div')    var profile = h('div', {classList: 'profile'})    var banner = h('div', {classList: 'banner'}) @@ -16,7 +17,8 @@ function profilePage (src, keys) {        if (log) {          for (var i = 0; i < log.length; i++) {            if ((log[i].backgrounded === src) && (log[i].author === src)) { -            // if you've identified someone as something else show that something else +            // if you've identified someone as something else show that something else   +            banner.style.height = '300px'              return banner.style.background = 'fixed top/680px no-repeat url(' + log[i].background + ')'            }          } @@ -26,9 +28,9 @@ function profilePage (src, keys) {    getBg(src, profile) -  scroller.appendChild(banner) -  scroller.appendChild(profile) -  //scroller.appendChild(h('div')) +  profileDiv.appendChild(banner) +  profileDiv.appendChild(profile) +  scroller.appendChild(profileDiv)    var subs = [src] @@ -45,8 +47,6 @@ function profilePage (src, keys) {    profile.appendChild(h('a', {href: '#' + src}, [      getImage(src, keys, 'profileAvatar'),      getName(src, keys), -    h('br'), -    h('br')    ]))    profile.appendChild(h('br')) | 
