From ca55cf1baee6b72a29109d4327e19146b06c2a93 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 5 Jun 2020 02:30:01 +1200 Subject: [PATCH 01/35] Rewrite watch-video-info --- .../watch-video-info/watch-video-info.css | 132 ---------------- .../watch-video-info/watch-video-info.sass | 74 +++++++++ .../watch-video-info/watch-video-info.vue | 148 ++++++++++-------- 3 files changed, 155 insertions(+), 199 deletions(-) delete mode 100644 src/renderer/components/watch-video-info/watch-video-info.css create mode 100644 src/renderer/components/watch-video-info/watch-video-info.sass diff --git a/src/renderer/components/watch-video-info/watch-video-info.css b/src/renderer/components/watch-video-info/watch-video-info.css deleted file mode 100644 index 316666038..000000000 --- a/src/renderer/components/watch-video-info/watch-video-info.css +++ /dev/null @@ -1,132 +0,0 @@ -.relative { - position: relative; -} - -.watchVideoInfo { - min-height: 130px; -} - -.videoTitle { - font-size: 22px; - max-width: 45%; -} - -.channelInformation { - position: absolute; - bottom: 10px; - width: 350px; -} - -.channelThumbnail { - cursor: pointer; - border-radius: 200px 200px 200px 200px; - -webkit-border-radius: 200px 200px 200px 200px; -} - -.channelName { - position: absolute; - top: 0px; - left: 55px; - font-weight: bold; - font-size: 15px; - cursor: pointer; -} - -.subscribeButton { - height: 20px; - position: absolute; - top: 20px; - left: 50px; - line-height: 1px; - font-size: 0.8rem; -} - -.viewCount { - position: absolute; - right: 15px; - bottom: 30px; -} - -.likeBarContainer { - position: absolute; - right: 15px; - bottom: 35px; - width: 300px; - height: 5px; -} - -.likeBar { - background-color: var(--accent-color); - height: 100%; - position: absolute; - top: 0px; - left: 0px; - z-index: 1; - border-radius: 200px 200px 200px 200px; - -webkit-border-radius: 200px 200px 200px 200px; -} - -.dislikeBar { - background-color: #9E9E9E; - height: 100%; - width: 100%; - position: absolute; - top: 0px; - left: 0px; - border-radius: 200px 200px 200px 200px; - -webkit-border-radius: 200px 200px 200px 200px; -} - -.likeCountContainer { - position: absolute; - right: 15px; - bottom: 0px; - font-size: 12px; - color: var(--tertiary-text-color); -} - -.videoOptions { - position: absolute; - right: 15px; - top: 20px; - width: 550px; -} - -.theatreModeButton { - height: 30px; - line-height: 10px; - position: relative; - bottom: 5px; -} - -.formatTypeDropdown { - width: 150px; -} - -.shareDropdown { - width: 175px; -} - -@media only screen and (max-width: 1500px) { - .videoOptions { - width: 350px; - } - - .watchVideoInfo { - min-height: 150px; - } -} - -@media only screen and (max-width: 1350px) { - .theatreModeButton { - display: none; - } - - .watchVideoInfo { - min-height: 130px; - } - - .videoOptions { - width: 350px; - } -} diff --git a/src/renderer/components/watch-video-info/watch-video-info.sass b/src/renderer/components/watch-video-info/watch-video-info.sass new file mode 100644 index 000000000..694a0d79c --- /dev/null +++ b/src/renderer/components/watch-video-info/watch-video-info.sass @@ -0,0 +1,74 @@ +.watchVideoInfo + display: grid + grid-template-columns: 2fr 1fr + padding: 16px + + @media screen and (max-width: 680px) + grid-template-columns: auto + +.videoTitle + font-size: 20px + margin: 0 0 20px + +.channelInformation + .profileRow + display: flex + + .channelThumbnail + border-radius: 50% + margin-right: 8px + + .channelName + margin-left: 6px + margin-bottom: 4px + + .subscribeButton + padding: 6px + font-size: 14px + +.viewCount + margin: 4px 0px 0px + text-align: right + + @media screen and (max-width: 680px) + margin-top: 16px + text-align: left + +.likeSection + margin-top: 16px + font-size: 14px + display: grid + grid-template-columns: auto auto + justify-content: space-between + margin-left: auto + max-width: 250px + + @media screen and (max-width: 680px) + margin-left: 0 + + .likeBar + height: 8px + border-radius: 4px + background: red + grid-column: 1 / 3 + margin-bottom: 4px + +.optionsContainer + margin-top: 16px + display: flex + justify-content: flex-end + + @media screen and (max-width: 680px) + justify-content: flex-start + + .option + width: 36px + height: 36px + border-radius: 50% + background-color: rgba(255, 255, 255, 0.15) + display: flex + align-items: center + justify-content: center + + &:not(:last-child) + margin-right: 4px diff --git a/src/renderer/components/watch-video-info/watch-video-info.vue b/src/renderer/components/watch-video-info/watch-video-info.vue index 43ad7c087..c6d348668 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.vue +++ b/src/renderer/components/watch-video-info/watch-video-info.vue @@ -1,75 +1,89 @@