Skip to content

Commit

Permalink
webview: Style inline videos to show what they are
Browse files Browse the repository at this point in the history
Fixes: zulip#5781
  • Loading branch information
gnprice committed Nov 14, 2023
1 parent c56822d commit df57212
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/webview/static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,27 @@ time {
object-fit: contain;
}

.message_inline_video {
position: relative;
}
.message_inline_video video {
width: 240px;
height: 160px;
background: black;
}
.message_inline_video::after {
content: "";
background-image: url("images/play_button.svg");
display: block;
width: 32px;
height: 32px;
position: absolute;
top: calc(50% - 16px);
left: calc(50% - 16px);
border-radius: 100%;
transform: scale(0.8);
}

.twitter-tweet {
border: 2px solid hsla(203, 89%, 53%, 0.5);
background: hsla(203, 89%, 53%, 0.1);
Expand Down
4 changes: 4 additions & 0 deletions src/webview/static/images/play_button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tools/build-webview
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,7 @@ sync "src/webview/static" "${dest}" <<EOF
-,r /katex
+ /base.css
+ /images/
+ /images/play_button.svg
- *
EOF

0 comments on commit df57212

Please sign in to comment.