diff --git a/app/views/home/_playlist_section_wide.erb b/app/views/home/_playlist_section_wide.erb new file mode 100644 index 0000000..6f4e68e --- /dev/null +++ b/app/views/home/_playlist_section_wide.erb @@ -0,0 +1,49 @@ +
+ +
+
+ +
+

+ <%= title %> +

+
+ +
+
+ +
+
+ + <% Playlist.published.latests.where(playlist_type: playlist_type).order("release_date desc, id desc").limit(limit).each_with_index do |playlist, index| %> +
"> + <%= link_to playlist_path(playlist) do %> +
+
+ <%= image_tag(playlist.cover_url, + class: "w-full h-full object-center object-cover" + ) %> +
+
+

+ <%= playlist.title %> +

+

+ <%= t(:by, name: playlist.user.username) %> +

+
+
+ <% end %> +
+ <% end %> + +
+
+ +
+
+
+
+ + +
\ No newline at end of file diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 5209632..bef1d5b 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -123,6 +123,13 @@ %> + <%= render "home/playlist_section_wide", + playlist_type: ["ep", "album"], + limit: 10, + title: "EP & Album Releases" + %> + +
@@ -160,12 +167,6 @@
- <%= render "home/playlist_section", - playlist_type: ["ep", "album"], - limit: 10, - title: "EP & Album Releases" - %> - <%= render "home/playlist_section", playlist_type: ["playlist"], limit: 10,