diff options
| author | Henry Jameson <me@hjkos.com> | 2019-09-15 02:14:40 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-09-15 02:14:40 +0300 |
| commit | d2fe79782119c061173c1b07753f634f0766bae9 (patch) | |
| tree | 4a98219e74b45b85e4b21b2995ed751989fca785 /src/components/user_card/user_card.js | |
| parent | f0cb6fe03faa1994fb667255d4051fe611b2afbc (diff) | |
update status/user card to use same gradient mask fading effect instead of
background hack
Diffstat (limited to 'src/components/user_card/user_card.js')
| -rw-r--r-- | src/components/user_card/user_card.js | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 82d3b835..e41a3180 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -38,19 +38,10 @@ export default { const rgb = (typeof color === 'string') ? hex2rgb(color) : color const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)` - const gradient = [ - [tintColor, this.hideBio ? '60%' : ''], - this.hideBio ? [ - color, '100%' - ] : [ - tintColor, '' - ] - ].map(_ => _.join(' ')).join(', ') - return { backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`, backgroundImage: [ - `linear-gradient(to bottom, ${gradient})`, + `linear-gradient(to bottom, ${tintColor}, ${tintColor})`, `url(${this.user.cover_photo})` ].join(', ') } |
