TelegramPWA/src/components/common/ProfileInfo.scss
2022-10-17 17:35:03 +02:00

192 lines
3.2 KiB
SCSS

.ProfileInfo {
aspect-ratio: 1 / 1;
position: relative;
@supports not (aspect-ratio: 1 / 1) {
&::before {
float: left;
padding-top: 100%;
content: "";
}
&::after {
display: block;
content: "";
clear: both;
}
}
.photo-wrapper {
width: 100%;
position: absolute;
left: 0;
top: 0;
bottom: 0;
> .Transition {
width: 100%;
height: 100%;
}
}
.photo-dashes {
position: absolute;
width: 100%;
height: 0.125rem;
padding: 0 0.375rem;
z-index: 1;
display: flex;
top: 0.5rem;
left: 0;
}
.photo-dash {
flex: 1 1 auto;
background-color: var(--color-white);
opacity: 0.25;
border-radius: 0.125rem;
margin: 0 0.125rem;
transition: opacity 300ms ease;
&.current {
opacity: 0.75;
}
}
.navigation {
position: absolute;
top: 0;
bottom: 0;
width: 25%;
border: none;
padding: 0;
margin: 0;
appearance: none;
background: transparent no-repeat;
background-size: 1.25rem;
opacity: 0.25;
transition: opacity 0.15s;
outline: none;
cursor: pointer;
z-index: 1;
&:hover,
.is-touch-env & {
opacity: 1;
}
&.prev {
left: 0;
background-image: url("../../assets/media_navigation_previous.svg");
background-position: 1.25rem 50%;
}
&.next {
right: 0;
background-image: url("../../assets/media_navigation_next.svg");
background-position: calc(100% - 1.25rem) 50%;
}
}
.info {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
min-height: 100px;
padding: 0 1.5rem 0.5rem;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
color: var(--color-white);
display: flex;
flex-direction: column;
justify-content: flex-end;
pointer-events: none;
&:dir(rtl) {
.status {
text-align: right;
unicode-bidi: plaintext;
}
}
&[dir="rtl"] {
.status {
text-align: right;
unicode-bidi: plaintext;
}
}
}
.title {
.fullName {
font-weight: 500;
font-size: 1.25rem;
line-height: 1.375rem;
white-space: pre-wrap;
word-break: break-word;
margin-bottom: 0;
}
.VerifiedIcon, .PremiumIcon {
z-index: 2;
--color-fill: var(--color-white);
--color-checkmark: var(--color-primary);
opacity: 0.8;
}
.emoji:not(.custom-emoji) {
width: 1.5rem;
height: 1.5rem;
background-size: 1.5rem;
}
.custom-emoji {
pointer-events: auto;
cursor: pointer;
--custom-emoji-size: 1.5rem;
&.custom-color {
--emoji-status-color: var(--color-white);
}
}
}
.status {
font-size: 0.875rem;
opacity: 0.5;
}
&[dir="rtl"] {
.navigation.prev {
left: auto;
right: 0;
transform: scaleX(-1);
}
.navigation.next {
left: 0;
right: auto;
transform: scaleX(-1);
}
}
&.self {
margin: 0 -0.5rem 0.75rem;
overflow: hidden;
&.ghost {
margin: 0;
}
.info {
padding-bottom: 0.75rem;
}
.status {
line-height: 1rem;
}
}
}