WIP: Still working, looking better

This commit is contained in:
Pablu23
2025-10-08 11:41:43 +02:00
parent f99eb3fc01
commit d9a946d9ca

View File

@@ -348,22 +348,16 @@
</div> </div>
<!-- Game area --> <!-- Game area -->
<div class="flex-1 flex flex-col"> <div class="flex-1 flex flex-col md:items-center">
<!-- Card placement area - using horizontal scrolling for many cards --> <!-- Card placement area - using horizontal scrolling for many cards -->
<div class="relative py-10 mb-12"> <div class="relative py-10 mb-12">
<div class="overflow-x-auto pb-4"> <div class="overflow-x-auto pb-4">
<div class="flex space-x-6 min-w-full px-6"> <div class="flex space-x-6 min-w-full px-6">
<div
class="card-slot relative flex-shrink-0 w-48 h-64 border-2 border-dashed border-gray-200 rounded-lg {dragTargetIndex ===
0
? 'highlight'
: ''}"
></div>
{#each placedCards as card, index} {#each placedCards as card, index}
<!-- Adding card-slot class for drop target detection --> <!-- Adding card-slot class for drop target detection -->
<div <div
class="card-slot relative flex-shrink-0 w-48 h-64 rounded-lg overflow-hidden shadow-md border border-gray-200 transition-all {dragTargetIndex === class="card-slot relative flex-shrink-0 w-48 h-64 rounded-lg overflow-hidden shadow-md border border-gray-200 transition-all {dragTargetIndex ===
index + 1 index
? 'highlight' ? 'highlight'
: ''}" : ''}"
> >
@@ -384,7 +378,7 @@
<!-- Add an extra slot at the end --> <!-- Add an extra slot at the end -->
<div <div
class="card-slot relative flex-shrink-0 w-48 h-64 border-2 border-dashed border-gray-200 rounded-lg {dragTargetIndex === class="card-slot relative flex-shrink-0 w-48 h-64 border-2 border-dashed border-gray-200 rounded-lg {dragTargetIndex ===
placedCards.length + 1 placedCards.length
? 'highlight' ? 'highlight'
: ''}" : ''}"
></div> ></div>