|
6 | 6 | </x-slot> |
7 | 7 |
|
8 | 8 | <!-- Main column --> |
9 | | - <div class="lg:pl-64 flex flex-col" x-data="{likes:false}"> |
| 9 | + <div class="lg:pl-64 flex flex-col" x-data="{likes:false, commented:true}"> |
| 10 | + |
| 11 | + @if(session()->has('commented')) |
| 12 | + <!-- Global notification live region, render this permanently at the end of the document --> |
| 13 | + <div aria-live="assertive" class="pointer-events-none fixed inset-0 flex items-end px-4 py-6 sm:items-start sm:p-6" x-show="commented"> |
| 14 | + <div class="flex w-full flex-col items-center space-y-4 sm:items-end"> |
| 15 | + <!-- |
| 16 | + Notification panel, dynamically insert this into the live region when it needs to be displayed |
| 17 | +
|
| 18 | + Entering: "transform ease-out duration-300 transition" |
| 19 | + From: "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2" |
| 20 | + To: "translate-y-0 opacity-100 sm:translate-x-0" |
| 21 | + Leaving: "transition ease-in duration-100" |
| 22 | + From: "opacity-100" |
| 23 | + To: "opacity-0" |
| 24 | + --> |
| 25 | + <div class="pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white shadow-lg ring-1 ring-black ring-opacity-5"> |
| 26 | + <div class="p-4"> |
| 27 | + <div class="flex items-start"> |
| 28 | + <div class="flex-shrink-0"> |
| 29 | + <!-- Heroicon name: outline/check-circle --> |
| 30 | + <svg class="h-6 w-6 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> |
| 31 | + <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 32 | + </svg> |
| 33 | + </div> |
| 34 | + <div class="ml-3 w-0 flex-1 pt-0.5"> |
| 35 | + <p class="text-sm font-medium text-gray-900">Created comment</p> |
| 36 | + <p class="mt-1 text-sm text-gray-500">Anyone who looks at this post can see your comment now.</p> |
| 37 | + </div> |
| 38 | + <div class="ml-4 flex flex-shrink-0"> |
| 39 | + <button @click="commented = false" type="button" class="inline-flex rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"> |
| 40 | + <span class="sr-only">Close</span> |
| 41 | + <!-- Heroicon name: mini/x-mark --> |
| 42 | + <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"> |
| 43 | + <path d="M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" /> |
| 44 | + </svg> |
| 45 | + </button> |
| 46 | + </div> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + @endif |
10 | 53 |
|
11 | 54 |
|
12 | 55 | <div x-show="likes" x-cloak class="relative z-10" aria-labelledby="slide-over-title" role="dialog" aria-modal="true"> |
|
0 commit comments