diff --git a/assets/css/default.css b/assets/css/default.css index 1d62bc01..06a2f07f 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -282,6 +282,21 @@ input[type="search"]::-webkit-search-cancel-button { } } + +/* + * Video "cards" (results/playlist/channel videos) + */ + +.video-card-row { margin: 15px 0; } + +.flexible { display: flex; } +.flex-left { flex: 1 1 100%; flex-wrap: wrap; } +.flex-right { flex: 1 0 max-content; flex-wrap: nowrap; } + +p.channel-name { margin: 0; } +p.video-data { margin: 0; font-weight: bold; font-size: 80%; } + + /* * Footer */ @@ -492,11 +507,6 @@ hr { } /* Description Expansion Styling*/ -#description-box { - display: flex; - flex-direction: column; -} - #descexpansionbutton { display: none } @@ -511,7 +521,24 @@ hr { height: 100%; } -#descexpansionbutton + label { +#descexpansionbutton ~ label { order: 1; margin-top: 20px; } + +/* Bidi (bidirectional text) support */ +h1, +h2, +h3, +h4, +h5, +p, +#descriptionWrapper, +#description-box { + unicode-bidi: plaintext; + text-align: start; +} + +#descriptionWrapper { + max-width: 600px; +} diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr index 21038394..dd2807de 100644 --- a/src/invidious/views/channel.ecr +++ b/src/invidious/views/channel.ecr @@ -21,14 +21,16 @@
<%= channel.description_html %>
+<%= channel.description_html %>
+<%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content %>
+<%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content %>
+<%= item.author %>
+<%= HTML.escape(item.author) %>
<%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %>
<% if !item.auto_generated %><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %>
<% end %> @@ -27,15 +27,13 @@<%= number_with_separator(item.video_count) %> videos
<%= item.title %>
+<%= HTML.escape(item.title) %>
+ + +<%= HTML.escape(item.author) %>
-- - <%= item.author %> - -
<% when MixVideo %> - + <% if !env.get("preferences").as(Preferences).thin_mode %><%= HTML.escape(item.title) %>
+<%= HTML.escape(item.title) %>
+ + +<%= HTML.escape(item.author) %>
-- - <%= item.author %> - -
<% when PlaylistVideo %> <% if !env.get("preferences").as(Preferences).thin_mode %> @@ -76,30 +72,33 @@ <% end %><%= HTML.escape(item.title) %>
+<%= HTML.escape(item.title) %>
-- - <%= item.author %> - -
-<%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %>
+ <% elsif Time.utc - item.published > 1.minute %> +<%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %>
+ <% end %><%= translate(locale, "`x` views", number_to_short_text(item.views || 0)) %>
+<%= translate(locale, "LIVE") %>
+<%= translate(locale, "LIVE") %>
<% elsif item.length_seconds != 0 %><%= recode_length_seconds(item.length_seconds) %>
<% end %><%= HTML.escape(item.title) %>
-<%= playlist.description_html %>
+<%= playlist.description_html %>
+<%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content if !channel.description_html.empty? %>
+<%= XML.parse_html(channel.description_html).xpath_node(%q(.//pre)).try &.content if !channel.description_html.empty? %>
+