signal-desktop/stylesheets/components/StoryViewer.scss

360 lines
6.8 KiB
SCSS
Raw Normal View History

2022-03-04 21:14:52 +00:00
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
.StoryViewer {
&__overlay {
2022-04-22 18:36:34 +00:00
background-size: contain;
2022-08-02 17:05:51 +00:00
height: 100%;
2022-03-04 21:14:52 +00:00
left: 0;
position: absolute;
2022-08-02 17:05:51 +00:00
top: 0;
2022-03-04 21:14:52 +00:00
width: 100%;
z-index: $z-index-popup-overlay;
}
&__content {
align-items: center;
2022-04-22 18:36:34 +00:00
backdrop-filter: blur(90px);
background: $color-black-alpha-20;
2022-03-04 21:14:52 +00:00
display: flex;
flex-direction: column;
2022-08-02 17:05:51 +00:00
height: 100%;
2022-03-04 21:14:52 +00:00
justify-content: center;
left: 0;
position: absolute;
2022-08-02 17:05:51 +00:00
top: 0;
2022-03-04 21:14:52 +00:00
width: 100%;
z-index: $z-index-popup-overlay;
}
&__close-button {
@include button-reset;
@include modal-close-button;
@include light-theme {
@include color-svg('../images/icons/v2/x-24.svg', $color-gray-15);
}
top: var(--title-bar-drag-area-height);
2022-04-22 18:36:34 +00:00
right: 28px;
2022-05-05 17:09:15 +00:00
z-index: $z-index-above-above-base;
2022-03-04 21:14:52 +00:00
}
&__container {
flex-grow: 1;
overflow: hidden;
}
&__story {
max-height: 100%;
outline: none;
width: auto;
&__image {
object-fit: contain;
}
2022-03-04 21:14:52 +00:00
}
&__meta {
bottom: 0;
left: 50%;
min-width: 284px;
2022-04-22 18:36:34 +00:00
padding: 0 16px;
2022-03-04 21:14:52 +00:00
position: absolute;
transform: translateX(-50%);
width: clamp(0vh, 56.25vh, 100vw);
2022-07-22 01:38:27 +00:00
z-index: $z-index-story-meta;
2022-03-04 21:14:52 +00:00
&__list {
@include font-body-2;
align-items: center;
display: flex;
color: $color-white-alpha-80;
margin-left: 8px;
&::before {
@include color-svg(
'../images/icons/v2/lock-solid-24.svg',
$color-white-alpha-80
);
content: '';
display: block;
height: 14px;
margin-right: 6px;
width: 14px;
}
}
2022-03-04 21:14:52 +00:00
&--group-avatar {
margin-left: -8px;
}
&--title {
@include font-body-1-bold;
color: $color-white;
display: inline;
margin: 0 8px;
}
&--timestamp {
@include font-body-2;
color: $color-white-alpha-60;
}
2022-05-06 19:02:44 +00:00
&__playback-bar {
display: flex;
justify-content: space-between;
user-select: none;
&__container {
align-items: center;
display: flex;
}
2022-05-06 19:02:44 +00:00
}
&__playback-controls {
align-items: center;
display: flex;
}
2022-03-04 21:14:52 +00:00
}
2022-04-14 17:02:12 +00:00
&__caption {
2022-05-03 23:50:44 +00:00
@include font-body-1;
color: $color-white;
2022-04-14 17:02:12 +00:00
padding: 4px 0;
2022-04-22 18:36:34 +00:00
margin-bottom: 24px;
2022-04-14 17:02:12 +00:00
&__overlay {
2022-04-22 18:36:34 +00:00
@include button-reset;
2022-04-14 17:02:12 +00:00
background: $color-black-alpha-60;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: $z-index-base;
}
}
2022-03-04 21:14:52 +00:00
&__actions {
2022-04-15 00:08:46 +00:00
display: flex;
justify-content: center;
2022-04-22 18:36:34 +00:00
min-height: 60px;
2022-03-04 21:14:52 +00:00
}
&__reply {
@include button-reset;
2022-04-15 00:08:46 +00:00
color: $color-gray-05;
@include keyboard-mode {
&:focus {
color: $color-ultramarine;
}
}
&__arrow {
display: flex;
align-items: center;
&::before {
content: '';
height: 20px;
margin-right: 12px;
width: 20px;
@include color-svg(
'../images/icons/v2/reply-outline-24.svg',
$color-white
);
}
}
&__chevron::after {
content: '';
display: inline-block;
height: 20px;
margin-left: 6px;
vertical-align: middle;
2022-08-12 20:07:12 +00:00
width: 12px;
@include color-svg(
'../images/icons/v2/chevron-right-20.svg',
$color-white
);
}
2022-03-04 21:14:52 +00:00
}
2022-07-25 18:55:44 +00:00
&__more__button {
display: flex;
justify-content: center;
align-items: center;
2022-05-06 19:02:44 +00:00
height: 24px;
width: 24px;
2022-07-25 18:55:44 +00:00
&::after {
@include color-svg('../images/icons/v2/more-horiz-24.svg', $color-white);
content: '';
height: 20px;
width: 20px;
2022-05-06 19:02:44 +00:00
2022-07-25 18:55:44 +00:00
@include keyboard-mode {
&:focus {
background-color: $color-black;
}
2022-05-06 19:02:44 +00:00
}
}
}
&__mute {
@include button-reset;
height: 20px;
margin: 0 24px;
width: 20px;
@include color-svg('../images/icons/v2/sound-on.svg', $color-white);
2022-05-06 19:02:44 +00:00
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__pause {
@include button-reset;
height: 20px;
width: 20px;
@include color-svg('../images/icons/v2/pause_solid_20.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__play {
@include button-reset;
height: 20px;
width: 20px;
@include color-svg('../images/icons/v2/play_solid_20.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__unmute {
@include button-reset;
height: 20px;
margin: 0 24px;
width: 20px;
@include color-svg('../images/icons/v2/sound-off.svg', $color-white);
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
&__soundless {
@include button-reset;
height: 20px;
margin: 0 24px;
2022-05-06 19:02:44 +00:00
width: 20px;
@include color-svg('../images/icons/v2/sound-none.svg', $color-white);
2022-05-06 19:02:44 +00:00
@include keyboard-mode {
&:focus {
background-color: $color-white-alpha-80;
}
}
}
2022-03-04 21:14:52 +00:00
&__progress {
display: flex;
&--container {
background: $color-white-alpha-40;
border-radius: 2px;
height: 2px;
margin: 12px 1px 0 1px;
overflow: hidden;
width: 100%;
}
&--bar {
background: $color-white;
background-size: 200% 100%;
border-radius: 2px;
display: block;
height: 100%;
}
}
2022-05-03 23:50:44 +00:00
2022-05-04 17:43:22 +00:00
&__animated-emojis {
2022-08-02 17:05:51 +00:00
height: 100%;
2022-05-04 17:43:22 +00:00
position: absolute;
width: 100%;
z-index: $z-index-above-base;
}
2022-05-03 23:50:44 +00:00
&__arrow {
2022-05-04 18:45:32 +00:00
@include button-reset;
2022-05-03 23:50:44 +00:00
align-items: center;
display: flex;
2022-08-02 17:05:51 +00:00
height: 100%;
2022-05-03 23:50:44 +00:00
position: absolute;
width: 25%;
2022-05-04 18:45:32 +00:00
z-index: $z-index-above-above-base;
2022-05-03 23:50:44 +00:00
2022-05-04 18:45:32 +00:00
&::before {
content: '';
2022-05-03 23:50:44 +00:00
height: 24px;
opacity: 0;
width: 24px;
transition: opacity 200ms ease-in-out;
}
&--left {
justify-content: flex-start;
left: 0;
2022-05-04 18:45:32 +00:00
&::before {
2022-05-03 23:50:44 +00:00
margin-left: 24px;
@include color-svg(
2022-05-04 18:45:32 +00:00
'../images/icons/v2/arrow-left-32.svg',
2022-05-03 23:50:44 +00:00
$color-white
);
}
}
&--right {
justify-content: flex-end;
right: 0;
2022-05-04 18:45:32 +00:00
&::before {
2022-05-03 23:50:44 +00:00
margin-right: 24px;
@include color-svg(
2022-05-04 18:45:32 +00:00
'../images/icons/v2/arrow-right-32.svg',
2022-05-03 23:50:44 +00:00
$color-white
);
}
}
2022-05-04 18:45:32 +00:00
&--visible::before {
2022-05-03 23:50:44 +00:00
opacity: 1;
}
}
&__protection {
position: absolute;
width: 100%;
2022-05-04 18:45:32 +00:00
z-index: $z-index-base;
2022-05-03 23:50:44 +00:00
&--top {
background: linear-gradient($color-black-alpha-16, $color-transparent);
top: 0;
height: 80px;
}
&--bottom {
background: linear-gradient($color-transparent, $color-black-alpha-60);
2022-05-03 23:50:44 +00:00
bottom: 0;
height: 256px;
2022-05-03 23:50:44 +00:00
}
}
2022-03-04 21:14:52 +00:00
}