diff --git a/assets/css/default.css b/assets/css/default.css index 19dcf3b7..465ee886 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -631,3 +631,20 @@ p, display: none; } } + +.category { + margin: 3em 0px 4em 0px; +} + +.category .heading > p { + display: inline-block; +} + +.category .badge.featured { + background: #005aa7; + color: white; + padding: 3px 4px 1px 4px; + border-radius: 5px; + font-size: 14px; + margin-left: 10px; +} \ No newline at end of file diff --git a/src/invidious/trending.cr b/src/invidious/trending.cr index 25bab4d2..3352a143 100644 --- a/src/invidious/trending.cr +++ b/src/invidious/trending.cr @@ -16,7 +16,7 @@ def fetch_trending(trending_type, region, locale) client_config = YoutubeAPI::ClientConfig.new(region: region) initial_data = YoutubeAPI.browse("FEtrending", params: params, client_config: client_config) - trending = extract_videos(initial_data) + trending = extract_items(initial_data) return {trending, plid} end diff --git a/src/invidious/views/feeds/trending.ecr b/src/invidious/views/feeds/trending.ecr index b32243a1..c75c992f 100644 --- a/src/invidious/views/feeds/trending.ecr +++ b/src/invidious/views/feeds/trending.ecr @@ -37,7 +37,36 @@
<%= category.title %>
+ <% if (badges = category.badges).is_a? Array %> + <% badges.each do | badge |%> + <% if badge[0] == "BADGE_STYLE_TYPE_FEATURED" %> +