Enhance chan about page to show channel description
parent
4c18ecfcf2
commit
5979e8f114
@ -1,46 +1,50 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= channel.author %> - Invidious</title>
|
||||
<link rel="stylesheet" href="/css/channel.css?v=<%= ASSET_COMMIT %>">
|
||||
|
||||
<!-- Channel description on the header should always be hidden on the about page -->
|
||||
<style>
|
||||
#channel-description-container {
|
||||
display: none
|
||||
}
|
||||
</style>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% content_type = 5 %>
|
||||
<% sort_options = Tuple.new %>
|
||||
<%= rendered "components/channel-information" %>
|
||||
|
||||
<div class="pure-g">
|
||||
<% stats_style_append = ""%>
|
||||
<% if !channel.country.empty? %>
|
||||
<div class="pure-u-1 pure-u-md-3-4">
|
||||
<div class="h-box">
|
||||
<h3> <%= translate(locale, "Details") %> </h3>
|
||||
<p><%= translate(locale, "Country: ") %><%=channel.country%></p> <!-- Translate Country Names -->
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% stats_style_append = "style=\"order: 1;\"" %>
|
||||
<% end %>
|
||||
<div class="pure-g h-box" id="about-content-container">
|
||||
<div class="pure-u-1 pure-u-md-3-4">
|
||||
<h3> <%= translate(locale, "Description") %> </h3>
|
||||
<p id="channel-description" class="pure-u-md-22-24" style="margin: 0"><span style="white-space:pre-wrap"><%= channel.description_html %></span></p>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-4" <%= stats_style_append %>>
|
||||
<div class="h-box">
|
||||
<h3> <%= translate(locale, "Stats") %> </h3>
|
||||
<p> <%= translate(locale, "Joined") %>
|
||||
<time datetime="<%=channel.joined.to_s("%Y-%m-%d")%>">
|
||||
<%= channel.joined.to_s(translate(locale, "%B %-d, %Y")) %>
|
||||
</time>
|
||||
</p>
|
||||
<p><%= channel.total_views ? translate(locale, "`x` views", number_with_separator(channel.total_views || 0)) : "" %></p>
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-4">
|
||||
<h3> <%= translate(locale, "Stats") %> </h3>
|
||||
<p> <%= translate(locale, "Joined") %>
|
||||
<time datetime="<%=channel.joined.to_s("%Y-%m-%d")%>">
|
||||
<%= channel.joined.to_s(translate(locale, "%B %-d, %Y")) %>
|
||||
</time>
|
||||
</p>
|
||||
<p><%= channel.total_views ? translate(locale, "`x` views", number_with_separator(channel.total_views || 0)) : "" %></p>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-4">
|
||||
<h3> <%= translate(locale, "Details") %> </h3>
|
||||
<p><%= translate(locale, "Country: ") %><%=channel.country%></p> <!-- Translate Country Names -->
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3" id="external-links">
|
||||
<div class="h-box">
|
||||
<% if !channel.links.empty? %>
|
||||
<div class="pure-u-1 pure-u-md-2-3" id="external-links">
|
||||
<h3> <%= translate(locale, "Links") %> </h3>
|
||||
<% channel.links.each do |link_tuple| %>
|
||||
<div class="pure-u-11-24" style="margin-bottom: 2em;">
|
||||
<img src="/fetch_link_favicon?url=<%=link_tuple[2]%>">
|
||||
<a href="<%=link_tuple[1]%>"><%=link_tuple[0]%></a>
|
||||
<a href="<%=link_tuple[1]%>"><%=HTML.escape(link_tuple[0])%></a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue