From 45c5632d81073a9d2bf514d6e4f40a5d3e7e3d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Fri, 17 Jun 2022 16:45:28 +0200 Subject: [PATCH] Improve Margins and add Theater Mode --- src/App.vue | 20 ++++++++++++++++++++ src/components/CommentItem.vue | 6 +++--- src/components/PreferencesPage.vue | 13 +++++++++++++ src/components/VideoItem.vue | 4 ++-- src/components/WatchVideo.vue | 26 ++++++++++++++++++++++---- src/locales/en.json | 5 ++++- src/main.js | 2 ++ 7 files changed, 66 insertions(+), 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index a19259d7..e375ac4f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,6 +63,21 @@ export default { } })(); }, + watch: { + $route: { + handler(to) { + console.log(to.name); + // Pages that should be displayed without margin at the sides + if ( + ["Trending", "SearchResults", "Playlist", "Channel", "Feed", "Watch History", "Playlists"].includes( + to.name, + ) + ) + document.body.classList.add("wide"); + else document.body.classList.remove("wide"); + }, + }, + }, }; @@ -207,4 +222,9 @@ h2 { .auto .link-secondary { @apply dark:(text-gray-300 hover:(text-gray-400 underline underline-gray-400)); } + +body:not(.wide) { + max-width: 1250px; + margin: 0 auto; +} diff --git a/src/components/CommentItem.vue b/src/components/CommentItem.vue index 36e805b2..f485c374 100644 --- a/src/components/CommentItem.vue +++ b/src/components/CommentItem.vue @@ -1,8 +1,8 @@