<%= content_for :page_meta do %>
  <%= render "podcast_episodes/meta" %>
<% end %>
<% if @podcast %>
  <div class="user-profile-header tag-header podcast-header" style="background:#<%= @podcast.main_color_hex %> url(<%= cl_image_path(@podcast.pattern_image_url || "https://i.imgur.com/fKYKgo4.png",
                                                                                                                                     type: "fetch",
                                                                                                                                     quality: "auto",
                                                                                                                                     sign_url: true,
                                                                                                                                     flags: "progressive",
                                                                                                                                     fetch_format: "jpg") %>);">
    <div class="tag-or-query-header-container">
      <h1><img class="record" src="<%= cl_image_path(@podcast.image_url,
                                                     type: "fetch",
                                                     crop: "fill",
                                                     width: 420,
                                                     height: 420,
                                                     quality: "auto",
                                                     sign_url: true,
                                                     flags: "progressive",
                                                     fetch_format: "auto",
                                                     class: "main-image") %>"
               alt="<%= @podcast.title %>" /> <%= @podcast.title %>
               <button id="user-follow-butt" class="cta follow-action-button user-profile-follow-button" data-info='{"id":<%= @podcast.id %>,"className":"<%= @podcast.class.name %>"}'>&nbsp;</button>
</h1>
    </div>
  </div>
<% end %>

<div class="home" id="index-container"
     data-params="<%= params.to_json(only: %i[tag username q]) %>" data-which="<%= @list_of %>"
     data-tag=""
     data-feed="<%= params[:timeframe] || "base-feed" %>"
     data-articles-since="<%= Timeframer.new(params[:timeframe]).datetime&.iso8601 %>">
  <%= render "podcast_episodes/sidebar" %>
  <div class="articles-list" id="articles-list">
    <div class="substories" id="substories">
      <% if @podcast_episodes %>
        <%= render "podcast_episodes/episodes_feed" %>
      <% end %>
    </div>
    <div class="loading-articles" id="loading-articles">
      loading...
    </div>
  </div>
  <%= render "podcast_episodes/sidebar_additional" %>
</div>

<%= render "stories/narrow_nav_menu" %>
<%= render "stories/stories_list_script" %>
