|
4 | 4 | {{ object.name }} |
5 | 5 | {% endblock title %} |
6 | 6 | {% block content %} |
7 | | - <!-- Back Button --> |
8 | | - <a href="javascript:history.back()" class="btn btn-outline mb-4 text-xs"> |
9 | | - <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
10 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" /> |
11 | | - </svg> |
12 | | - Back |
13 | | - </a> |
| 7 | + <!-- Back Button and Entity Type Badge --> |
| 8 | + <div class="flex items-center justify-between mb-4"> |
| 9 | + <a href="javascript:history.back()" class="btn btn-outline text-xs"> |
| 10 | + <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 11 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" /> |
| 12 | + </svg> |
| 13 | + Back |
| 14 | + </a> |
| 15 | + <span class="badge text-black" style="background-color: {{ object.COLOR }};">{{ object|verbosename }}</span> |
| 16 | + </div> |
14 | 17 |
|
15 | 18 | <div class="flex flex-col md:flex-row gap-6"> |
16 | 19 | <!-- Left Column: Image and Find It On --> |
17 | 20 | <div class="flex flex-col gap-4 md:w-64 shrink-0"> |
18 | 21 | <!-- Image with neobrutalist border --> |
19 | | - <div class="relative flex justify-center"> |
| 22 | + <div class="relative flex justify-center w-fit self-center"> |
20 | 23 | <div class="absolute -right-2 -top-2 w-4 h-4 bg-neo-yellow border-2 border-black"></div> |
21 | 24 | <div class="absolute -left-2 -bottom-2 w-4 h-4 bg-neo-pink border-2 border-black"></div> |
22 | 25 | <figure class="border-3 border-black overflow-hidden bg-white inline-block max-w-full"> |
@@ -49,12 +52,18 @@ <h3 class="font-bold text-xs uppercase mb-3">Find It On</h3> |
49 | 52 |
|
50 | 53 | <!-- Right Column: Main Content --> |
51 | 54 | <div class="flex-1"> |
52 | | - <!-- Entity Type Badge and Edit Button --> |
53 | | - <div class="flex items-center gap-2 mb-3"> |
54 | | - <span class="badge badge-primary">{{ object|verbosename }}</span> |
| 55 | + <!-- Edit and Share Buttons --> |
| 56 | + <div class="flex items-center gap-2 mb-3" x-data="{ copied: false }"> |
55 | 57 | {% if user.is_staff %} |
56 | 58 | <a href="{{ edit_url }}" class="btn btn-outline text-xs py-1 px-2">Edit</a> |
57 | 59 | {% endif %} |
| 60 | + <button @click="navigator.clipboard.writeText(window.location.href); copied = true; setTimeout(() => copied = false, 2000)" |
| 61 | + class="btn btn-outline text-xs py-1 px-2 flex items-center gap-1"> |
| 62 | + <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" viewBox="0 0 24 24"> |
| 63 | + <path fill="currentColor" d="M17 22q-1.25 0-2.125-.875T14 19q0-.15.075-.7L7.05 14.2q-.4.375-.925.588T5 15q-1.25 0-2.125-.875T2 12t.875-2.125T5 9q.6 0 1.125.213t.925.587l7.025-4.1q-.05-.175-.062-.337T14 5q0-1.25.875-2.125T17 2t2.125.875T20 5t-.875 2.125T17 8q-.6 0-1.125-.213T14.95 7.2l-7.025 4.1q.05.175.063.338T8 12t-.012.363t-.063.337l7.025 4.1q.4-.375.925-.587T17 16q1.25 0 2.125.875T20 19t-.875 2.125T17 22" /> |
| 64 | + </svg> |
| 65 | + <span x-text="copied ? 'Copied!' : 'Share'"></span> |
| 66 | + </button> |
58 | 67 | </div> |
59 | 68 |
|
60 | 69 | <!-- Title --> |
|
0 commit comments