-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<section aria-labelledby="collections-heading" class="bg-gray-100 dark:bg-gray-900"> | ||
|
||
<div class="max-w-2xl mx-auto py-16 sm:py-24 lg:py-32 lg:max-w-none"> | ||
<div data-controller="scroll"> | ||
|
||
<div class="flex justify-between mx-auto container px-2 lg:px-0"> | ||
<h2 id="collections-playlists" class="text-2xl font-extrabold text-gray-900 dark:text-gray-100"> | ||
<%= title %> | ||
</h2> | ||
</div> | ||
|
||
<div class="relative mx-2"> | ||
<div class="overflow-auto no-scrollbar relative"> | ||
|
||
<div class="container mx-auto p-4-"> | ||
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"> | ||
|
||
<% Playlist.published.latests.where(playlist_type: playlist_type).order("release_date desc, id desc").limit(limit).each_with_index do |playlist, index| %> | ||
<div class=" <%= index == 0 ? "col-span-1 sm:col-span-2 sm:row-span-2 bg-brand-600" : "bg-default" %> "> | ||
<%= link_to playlist_path(playlist) do %> | ||
<div class="relative"> | ||
<div class="relative w-full h-80 bg-default overflow-hidden sm:aspect-w-2 sm:aspect-h-1 sm:h-64 lg:aspect-w-1 lg:aspect-h-1"> | ||
<%= image_tag(playlist.cover_url, | ||
class: "w-full h-full object-center object-cover" | ||
) %> | ||
</div> | ||
<div class="space-y-1 text-sm text-left mt-2 p-2"> | ||
<h3 class="font-medium leading-none"> | ||
<%= playlist.title %> | ||
</h3> | ||
<p class="text-xs text-default dark:text-default/40"> | ||
<%= t(:by, name: playlist.user.username) %> | ||
</p> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters