|
17 | 17 |
|
18 | 18 | <% @documents.each do |document| %> |
19 | 19 |
|
20 | | - <a href="<%= document_path(document) %>" style="text-decoration: none; color: inherit; display: block; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; transition: box-shadow 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);" onmouseover="this.style.boxShadow='0 4px 12px rgba(0,0,0,0.15)'" onmouseout="this.style.boxShadow='0 2px 5px rgba(0,0,0,0.05)'"> |
| 20 | + <div style="position: relative; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: white; transition: box-shadow 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);" onmouseover="this.style.boxShadow='0 4px 12px rgba(0,0,0,0.15)'" onmouseout="this.style.boxShadow='0 2px 5px rgba(0,0,0,0.05)'"> |
21 | 21 |
|
22 | | - <div style="height: 160px; background-color: #f8f9fa; border-bottom: 1px solid #ddd; display: flex; align-items: center; justify-content: center; overflow: hidden;"> |
23 | | - <% if document.image_url.present? %> |
24 | | - <img src="<%= document.image_url %>" style="width: 100%; height: 100%; object-fit: cover; object-position: top;" alt="Thumbnail"> |
25 | | - <% else %> |
26 | | - <span style="font-size: 40px; color: #ccc;">📄</span> |
27 | | - <% end %> |
| 22 | + <div style="position: absolute; top: 10px; right: 10px; z-index: 10;"> |
| 23 | + <%= button_to "🗑️", document_path(document), method: :delete, data: { turbo_confirm: "Are you sure you want to permanently delete this document and all its pins?" }, style: "background: white; border: 1px solid #ff4d4f; color: #ff4d4f; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); font-size: 16px; transition: transform 0.1s;", onmouseover: "this.style.transform='scale(1.1)'", onmouseout: "this.style.transform='scale(1)'" %> |
28 | 24 | </div> |
29 | 25 |
|
30 | | - <div style="padding: 15px; display: flex; align-items: center; gap: 10px;"> |
31 | | - <div style="background-color: #4285f4; color: white; width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; border-radius: 3px; font-size: 12px;"> |
32 | | - ≡ |
| 26 | + <a href="<%= document_path(document) %>" style="text-decoration: none; color: inherit; display: block;"> |
| 27 | + |
| 28 | + <div style="height: 160px; background-color: #f8f9fa; border-bottom: 1px solid #ddd; display: flex; align-items: center; justify-content: center; overflow: hidden;"> |
| 29 | + <% if document.image_url.present? %> |
| 30 | + <img src="<%= document.image_url %>" style="width: 100%; height: 100%; object-fit: cover; object-position: top;" alt="Thumbnail"> |
| 31 | + <% else %> |
| 32 | + <span style="font-size: 40px; color: #ccc;">📄</span> |
| 33 | + <% end %> |
33 | 34 | </div> |
34 | | - <div style="overflow: hidden;"> |
35 | | - <h3 style="margin: 0 0 4px 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><%= document.title %></h3> |
36 | | - <p style="margin: 0; font-size: 12px; color: #5f6368;">Opened <%= time_ago_in_words(document.updated_at) %> ago</p> |
| 35 | + |
| 36 | + <div style="padding: 15px; display: flex; align-items: center; gap: 10px;"> |
| 37 | + <div style="background-color: #4285f4; color: white; width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; border-radius: 3px; font-size: 12px;"> |
| 38 | + ≡ |
| 39 | + </div> |
| 40 | + <div style="overflow: hidden;"> |
| 41 | + <h3 style="margin: 0 0 4px 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><%= document.title %></h3> |
| 42 | + <p style="margin: 0; font-size: 12px; color: #5f6368;">Opened <%= time_ago_in_words(document.updated_at) %> ago</p> |
| 43 | + </div> |
37 | 44 | </div> |
38 | | - </div> |
39 | 45 |
|
40 | | - </a> |
| 46 | + </a> |
| 47 | + </div> |
41 | 48 |
|
42 | 49 | <% end %> |
43 | 50 |
|
|
0 commit comments