|
25 | 25 | <!-- Search Form --> |
26 | 26 | <div class="w-full"> |
27 | 27 | <%= form_tag(workshops_path, method: :get, |
28 | | - data: {turbo_stream: true, turbo_frame: "frame_list", |
29 | | - controller: "collection share-url"}, class: "space-y-6") do %> |
| 28 | + data: {turbo_stream: true, turbo_frame: "workshop_results", |
| 29 | + controller: "collection share-url"}, autocomplete: "off", class: "space-y-6") do %> |
30 | 30 | <%= render "filters" %> |
31 | 31 | <div><hr class="border-gray-300 my-6"></div> |
32 | 32 |
|
|
46 | 46 | <% end %> |
47 | 47 |
|
48 | 48 | <!-- Workshops List --> |
49 | | - <%= turbo_frame_tag "frame_list" do %> |
50 | | - <%= turbo_stream.replace("filters_applied", partial: "filters_applied") %> |
51 | | - <%= turbo_stream.replace("workshops_count", partial: "workshops_count") %> |
52 | | - <%= turbo_stream.replace("copy_url", partial: "shared/copy_url") %> |
| 49 | + <%= turbo_frame_tag "workshop_results", src: workshops_path do %> |
| 50 | + <%= render "workshops_count" %> |
53 | 51 | <div class="mt-6"> |
54 | | - <% if @workshops.any? %> |
55 | | - <div id="workshops-list" class="space-y-4 animate-fade"> |
56 | | - <% @workshops.each do |workshop| %> |
57 | | - <%= render "workshops/index_row", workshop: workshop.decorate, |
58 | | - breadcrumb: "Workshops", link_route: workshop_path(workshop) %> |
59 | | - <% end %> |
60 | | - </div> |
61 | | - <div class="pagination flex justify-center mt-12"><%= tailwind_paginate @workshops %></div> |
62 | | - <% else %> |
63 | | - <p class="text-gray-600"> |
64 | | - Your search returned no results. Please try again. |
65 | | - </p> |
66 | | - <% end %> |
| 52 | + <div class="space-y-4 animate-pulse"> |
| 53 | + <% 3.times do %> |
| 54 | + <div class="flex flex-col sm:flex-row border-b border-gray-200 bg-white gap-4 p-4"> |
| 55 | + <!-- 1️⃣ Image skeleton --> |
| 56 | + <div class="flex-shrink-0 w-full sm:w-32 h-32 sm:h-24 bg-gray-200 rounded"></div> |
| 57 | + |
| 58 | + <!-- Content --> |
| 59 | + <div class="flex flex-col sm:flex-row gap-4 flex-1"> |
| 60 | + <!-- Title / metadata --> |
| 61 | + <div class="flex flex-1 gap-4"> |
| 62 | + <!-- Bookmark placeholder --> |
| 63 | + <div class="flex-shrink-0 pt-1 w-6"> |
| 64 | + <div class="w-5 h-5 bg-gray-200 rounded"></div> |
| 65 | + </div> |
| 66 | + |
| 67 | + <!-- Title + metadata --> |
| 68 | + <div class="flex flex-col gap-2 flex-1 min-w-0"> |
| 69 | + <!-- Badge --> |
| 70 | + <div class="h-5 w-32 bg-gray-200 rounded-full"></div> |
| 71 | + |
| 72 | + <!-- Title --> |
| 73 | + <div class="h-6 w-3/4 bg-gray-300 rounded"></div> |
| 74 | + |
| 75 | + <!-- Author + date --> |
| 76 | + <div class="h-4 w-1/2 bg-gray-200 rounded"></div> |
| 77 | + |
| 78 | + <!-- Bookmark count --> |
| 79 | + <div class="h-4 w-40 bg-gray-200 rounded"></div> |
| 80 | + |
| 81 | + <!-- Age ranges --> |
| 82 | + <div class="h-4 w-48 bg-gray-200 rounded"></div> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + <!-- Description --> |
| 87 | + <div class="flex flex-1 gap-4 pr-4 sm:pr-3"> |
| 88 | + <!-- Empty bookmark spacer --> |
| 89 | + <div class="w-6 flex-shrink-0"></div> |
| 90 | + |
| 91 | + <!-- Description text --> |
| 92 | + <div class="flex-1 space-y-2"> |
| 93 | + <div class="h-4 w-full bg-gray-200 rounded"></div> |
| 94 | + |
| 95 | + <div class="h-4 w-5/6 bg-gray-200 rounded"></div> |
| 96 | + |
| 97 | + <div class="h-4 w-2/3 bg-gray-200 rounded"></div> |
| 98 | + |
| 99 | + <!-- Tags --> |
| 100 | + <div class="mt-3 h-4 w-1/2 bg-gray-200 rounded"></div> |
| 101 | + </div> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | + <% end %> |
| 106 | + </div> |
67 | 107 | </div> |
68 | 108 | <% end %> |
69 | 109 | </div> |
|
0 commit comments