From 35d94f9ed30c34d936ac0cd8eaa4dcb24fffe9f4 Mon Sep 17 00:00:00 2001 From: syeopite Date: Fri, 16 Apr 2021 00:27:37 -0700 Subject: [PATCH] Change channel banner to be CSS background image This is to allow for contents to be placed on the channel banner itself; something that is required for the links widget shown on Youtube. --- assets/css/default.css | 10 ++++++++++ src/invidious.cr | 1 - src/invidious/channels.cr | 2 +- src/invidious/views/components/channel-information.ecr | 5 +++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/assets/css/default.css b/assets/css/default.css index d9f95529..b28519e8 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -15,6 +15,16 @@ body { background-color: rgb(255, 0, 0, 0.5); } +#channel-banner-container { + margin-bottom: 1em; +} + +#banner { + height: calc(100vw / 6.2 - 1px); + background-size: cover !important; + background-repeat: no-repeat !important; +} + .channel-profile > * { font-size: 1.17em; font-weight: bold; diff --git a/src/invidious.cr b/src/invidious.cr index 7cefc52c..9b74fb42 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -3906,7 +3906,6 @@ get "/fetch_link_favicon" do |env| env.response.headers["Access-Control-Allow-Origin"] = "*" proxy_file(favicon_response, env) end - rescue ex end end diff --git a/src/invidious/channels.cr b/src/invidious/channels.cr index e6a0748f..cba5577c 100644 --- a/src/invidious/channels.cr +++ b/src/invidious/channels.cr @@ -959,7 +959,7 @@ def get_about_info(ucid, locale) allowed_regions: allowed_regions, related_channels: related_channels, tabs: tabs, - links: links + links: links, }) end diff --git a/src/invidious/views/components/channel-information.ecr b/src/invidious/views/components/channel-information.ecr index a756a446..a3c7a9f0 100644 --- a/src/invidious/views/components/channel-information.ecr +++ b/src/invidious/views/components/channel-information.ecr @@ -4,8 +4,9 @@ <% end %> <% if channel.banner %> -
- "> +
+