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 @@