0
0
Fork 0

Change media modals look in web UI (#15217)

- Change overlay background to match color of viewed image
- Add interactive reply/boost/favourite buttons to footer of modal
- Change ugly "View context" link to button among the action bar
This commit is contained in:
Eugen Rochko 2020-11-27 03:24:11 +01:00 committed by GitHub
parent cb7bd8ee03
commit 1e89e2ed98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 339 additions and 146 deletions

File diff suppressed because one or more lines are too long

View file

@ -1652,11 +1652,11 @@ a.account__display-name {
}
}
.star-icon.active {
.icon-button.star-icon.active {
color: $gold-star;
}
.bookmark-icon.active {
.icon-button.bookmark-icon.active {
color: $red-bookmark;
}
@ -3007,7 +3007,6 @@ button.icon-button i.fa-retweet {
&::before {
display: none !important;
}
}
button.icon-button.active i.fa-retweet {
@ -4487,16 +4486,19 @@ a.status-card.compact:hover {
height: 100%;
position: relative;
.extended-video-player {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
&__close,
&__zoom-button {
color: rgba($white, 0.7);
video {
max-width: $media-modal-media-max-width;
max-height: $media-modal-media-max-height;
&:hover,
&:focus,
&:active {
color: $white;
background-color: rgba($white, 0.15);
}
&:focus {
background-color: rgba($white, 0.3);
}
}
}
@ -4533,10 +4535,10 @@ a.status-card.compact:hover {
}
.media-modal__nav {
background: rgba($base-overlay-background, 0.5);
background: transparent;
box-sizing: border-box;
border: 0;
color: $primary-text-color;
color: rgba($primary-text-color, 0.7);
cursor: pointer;
display: flex;
align-items: center;
@ -4547,6 +4549,12 @@ a.status-card.compact:hover {
position: absolute;
top: 0;
bottom: 0;
&:hover,
&:focus,
&:active {
color: $primary-text-color;
}
}
.media-modal__nav--left {
@ -4557,58 +4565,86 @@ a.status-card.compact:hover {
right: 0;
}
.media-modal__pagination {
width: 100%;
text-align: center;
.media-modal__overlay {
max-width: 600px;
position: absolute;
left: 0;
bottom: 20px;
pointer-events: none;
}
right: 0;
bottom: 0;
margin: 0 auto;
.media-modal__meta {
text-align: center;
position: absolute;
left: 0;
bottom: 20px;
width: 100%;
pointer-events: none;
.picture-in-picture__footer {
border-radius: 0;
background: transparent;
padding: 20px 0;
&--shifted {
bottom: 62px;
}
.icon-button {
color: $white;
a {
pointer-events: auto;
text-decoration: none;
font-weight: 500;
color: $ui-secondary-color;
&:hover,
&:focus,
&:active {
color: $white;
background-color: rgba($white, 0.15);
}
&:hover,
&:focus,
&:active {
text-decoration: underline;
&:focus {
background-color: rgba($white, 0.3);
}
&.active {
color: $highlight-text-color;
&:hover,
&:focus,
&:active {
background: rgba($highlight-text-color, 0.15);
}
&:focus {
background: rgba($highlight-text-color, 0.3);
}
}
&.star-icon.active {
color: $gold-star;
&:hover,
&:focus,
&:active {
background: rgba($gold-star, 0.15);
}
&:focus {
background: rgba($gold-star, 0.3);
}
}
}
}
}
.media-modal__page-dot {
display: inline-block;
.media-modal__pagination {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.media-modal__button {
background-color: $primary-text-color;
height: 12px;
width: 12px;
border-radius: 6px;
margin: 10px;
.media-modal__page-dot {
flex: 0 0 auto;
background-color: $white;
opacity: 0.4;
height: 6px;
width: 6px;
border-radius: 50%;
margin: 0 4px;
padding: 0;
border: 0;
font-size: 0;
}
transition: opacity .2s ease-in-out;
.media-modal__button--active {
background-color: $highlight-text-color;
&.active {
opacity: 1;
}
}
.media-modal__close {