user-card fixes
This commit is contained in:
parent
9440d35266
commit
67f606a3b0
3 changed files with 56 additions and 11 deletions
|
|
@ -111,15 +111,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-overlay,
|
.header-overlay {
|
||||||
.banner-image {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
right: -1.2em;
|
right: -1.2em;
|
||||||
left: -1.2em;
|
left: -1.2em;
|
||||||
top: -1.4em;
|
top: -1.4em;
|
||||||
padding: 0;
|
|
||||||
mask: linear-gradient(to top, transparent 0, white 5em) bottom no-repeat;
|
mask: linear-gradient(to top, transparent 0, white 5em) bottom no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-overlay,
|
||||||
|
.banner-image {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
padding: 0;
|
||||||
border-top-left-radius: calc(var(--roundness) - 1px);
|
border-top-left-radius: calc(var(--roundness) - 1px);
|
||||||
border-top-right-radius: calc(var(--roundness) - 1px);
|
border-top-right-radius: calc(var(--roundness) - 1px);
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +141,7 @@
|
||||||
|
|
||||||
.banner-overlay {
|
.banner-overlay {
|
||||||
background-color: var(--profileTint);
|
background-color: var(--profileTint);
|
||||||
|
opacity: 0.5;
|
||||||
pointer-events: none; // let user copy bg url
|
pointer-events: none; // let user copy bg url
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
37
src/components/user_card/user_card.style.js
Normal file
37
src/components/user_card/user_card.style.js
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
export default {
|
||||||
|
name: 'UserCard',
|
||||||
|
selector: '.user-card',
|
||||||
|
notEditable: true,
|
||||||
|
validInnerComponents: [
|
||||||
|
'Text',
|
||||||
|
'Link',
|
||||||
|
'Icon',
|
||||||
|
],
|
||||||
|
defaultRules: [
|
||||||
|
{
|
||||||
|
directives: {
|
||||||
|
background: '--bg',
|
||||||
|
opacity: 0,
|
||||||
|
roundness: 3,
|
||||||
|
shadow: [{
|
||||||
|
x: 1,
|
||||||
|
y: 1,
|
||||||
|
blur: 4,
|
||||||
|
spread: 0,
|
||||||
|
color: '#000000',
|
||||||
|
alpha: 0.6
|
||||||
|
}],
|
||||||
|
'--profileTint': 'color | $alpha(--background 1)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
parent: {
|
||||||
|
component: 'UserCard'
|
||||||
|
},
|
||||||
|
component: 'RichContent',
|
||||||
|
directives: {
|
||||||
|
opacity: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -3,16 +3,18 @@
|
||||||
<div class="user-card-inner">
|
<div class="user-card-inner">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<div class="user-identity">
|
<div class="user-identity">
|
||||||
<div class="banner-image">
|
<div class="header-overlay">
|
||||||
<img
|
<div class="banner-image">
|
||||||
:src="bannerImgSrc"
|
<img
|
||||||
|
:src="bannerImgSrc"
|
||||||
|
:class="{ 'hide-bio': hideBio }"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="banner-overlay"
|
||||||
:class="{ 'hide-bio': hideBio }"
|
:class="{ 'hide-bio': hideBio }"
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="banner-overlay"
|
|
||||||
:class="{ 'hide-bio': hideBio }"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
v-if="avatarAction === 'zoom'"
|
v-if="avatarAction === 'zoom'"
|
||||||
class="user-info-avatar -link"
|
class="user-info-avatar -link"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue