-
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
3 changed files
with
70 additions
and
57 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
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,54 @@ | ||
<section aria-labelledby="collections-heading" class="bg-gray-100 dark:bg-gray-900"> | ||
|
||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | ||
<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"> | ||
<h2 id="collections-playlists" class="text-2xl font-extrabold text-gray-900 dark:text-gray-100"> | ||
<%= title %> | ||
</h2> | ||
<div class="flex items-center space-x-2"> | ||
<button data-action="click->scroll#scrollBackward" class="text-sm font-medium text-brand-600 hover:text-brand-500 md:block"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 12h-15m0 0l6.75 6.75M4.5 12l6.75-6.75"></path> | ||
</svg> | ||
</button> | ||
<button data-action="click->scroll#scrollForward" class="text-sm font-medium text-brand-600 hover:text-brand-500 md:block"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75"></path> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="relative"> | ||
<div class="overflow-auto no-scrollbar relative" data-scroll-target="scrollContainer"> | ||
<div class="grid grid-cols-1- grid-flow-col grid-rows-1- sm:gap-x-2 md:grid-cols-4- md:gap-y-0- lg:gap-x-8"> | ||
<% Playlist.published.latests.where(playlist_type: playlist_type).limit(limit).each do |playlist| %> | ||
<div class="w-64 m-4"> | ||
<%= link_to playlist_path(playlist) do %> | ||
<div class="group group-hover relative"> | ||
<div class="relative w-full h-80 bg-white dark:bg-black rounded-lg overflow-hidden group-hover:opacity-75 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"> | ||
<h3 class="font-medium leading-none"> | ||
<%= playlist.title %> | ||
</h3> | ||
<p class="text-xs text-slate-500 dark:text-slate-400"> | ||
<%= 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