diff options
| author | Henry Jameson <me@hjkos.com> | 2018-05-12 16:07:18 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-05-12 16:17:04 +0300 |
| commit | dc33c0aaacd56d0854418829fdbc1c32a70ef0f7 (patch) | |
| tree | ae2401a3c998a99d8de3fa608f04716816963ebf /src/components/user_card_content/user_card_content.js | |
| parent | 4c3d62da04e56651d0f9f68c43d90848702a6f51 (diff) | |
alternate usercard
Diffstat (limited to 'src/components/user_card_content/user_card_content.js')
| -rw-r--r-- | src/components/user_card_content/user_card_content.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index 4ee84b0e..4d4266cb 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -8,10 +8,18 @@ export default { const color = this.$store.state.config.colors.bg if (color) { const rgb = hex2rgb(color) + const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)` console.log(rgb) + console.log([ + `url(${this.user.cover_photo})`, + `linear-gradient(to bottom, ${tintColor}, ${tintColor})` + ].join(', ')) return { - backgroundColor: `rgb(${Math.floor(rgb[0] * 0.53)}, ${Math.floor(rgb[1] * 0.56)}, ${Math.floor(rgb[2] * 0.59)})`, - backgroundImage: `url(${this.user.cover_photo})` + 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, ${tintColor}, ${tintColor})`, + `url(${this.user.cover_photo})` + ].join(', ') } } }, |
