Size mobile payment sheet to fit the form instead of 50vh.
Deploy Ladill Mini / deploy (push) Successful in 25s
Deploy Ladill Mini / deploy (push) Successful in 25s
Use a flex column layout so the bottom sheet hugs amount, Pay, and footer while branding fills the space above. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -56,10 +56,9 @@
|
||||
}
|
||||
}">
|
||||
|
||||
{{-- Mobile: Ladill Mini branding above + half-height payment sheet --}}
|
||||
<div class="md:hidden relative min-h-screen bg-slate-50">
|
||||
<div class="flex flex-col items-center justify-end px-6 pb-8 text-center"
|
||||
style="height: 50dvh; min-height: 12rem; padding-top: max(2.5rem, env(safe-area-inset-top))">
|
||||
{{-- Mobile: Ladill Mini branding + content-sized payment sheet --}}
|
||||
<div class="md:hidden flex min-h-[100dvh] flex-col bg-slate-50">
|
||||
<div class="flex flex-1 flex-col items-center justify-center px-6 pb-6 text-center pt-[max(2.5rem,env(safe-area-inset-top))]">
|
||||
<img src="{{ asset('images/launcher-icons/mini.svg') }}?v={{ @filemtime(public_path('images/launcher-icons/mini.svg')) ?: '1' }}"
|
||||
alt="Ladill Mini" class="h-14 w-14 object-contain">
|
||||
<h1 class="mt-4 text-xl font-bold text-slate-900">{{ $businessName }}</h1>
|
||||
@@ -68,36 +67,31 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="fixed inset-x-0 bottom-0 z-10 flex flex-col overflow-hidden rounded-t-3xl border-t border-slate-200/80 bg-white shadow-[0_-12px_40px_rgba(15,23,42,0.12)]"
|
||||
style="height: 50dvh; min-height: 22rem; padding-bottom: env(safe-area-inset-bottom, 0px)">
|
||||
<div class="mx-auto mt-3 h-1 w-10 shrink-0 rounded-full bg-slate-200"></div>
|
||||
<div class="shrink-0 rounded-t-3xl border-t border-slate-200/80 bg-white px-5 pb-[max(1.25rem,env(safe-area-inset-bottom))] pt-3 shadow-[0_-12px_40px_rgba(15,23,42,0.12)]">
|
||||
<div class="mx-auto mb-4 h-1 w-10 rounded-full bg-slate-200"></div>
|
||||
|
||||
<div class="flex min-h-0 flex-1 flex-col overflow-y-auto px-5 pb-5 pt-4">
|
||||
<div x-show="errorMsg" x-cloak class="rounded-xl bg-red-50 px-4 py-3 text-sm text-red-700" x-text="errorMsg"></div>
|
||||
<div x-show="errorMsg" x-cloak class="mb-4 rounded-xl bg-red-50 px-4 py-3 text-sm text-red-700" x-text="errorMsg"></div>
|
||||
|
||||
<div class="flex min-h-0 flex-1 flex-col justify-end" :class="errorMsg ? 'mt-4' : ''">
|
||||
<label for="amount-mobile" class="sr-only">Amount ({{ $currency }})</label>
|
||||
<div class="relative">
|
||||
<span class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-4 text-lg font-semibold text-slate-400">{{ $currency }}</span>
|
||||
<input type="number" id="amount-mobile" x-model="amount" step="0.01" min="0.01" required autofocus
|
||||
inputmode="decimal"
|
||||
@keydown.enter.prevent="submitPay()"
|
||||
class="w-full rounded-2xl border-slate-200 py-4 pl-16 pr-4 text-3xl font-bold tracking-tight text-slate-900 focus:border-indigo-500 focus:ring-indigo-500"
|
||||
placeholder="0.00">
|
||||
</div>
|
||||
|
||||
<button type="button" @click="submitPay()" :disabled="loading"
|
||||
class="mt-4 flex w-full shrink-0 items-center justify-center gap-2 rounded-2xl bg-indigo-600 py-4 text-base font-semibold text-white hover:bg-indigo-700 disabled:opacity-60">
|
||||
<svg x-show="loading" x-cloak class="h-4 w-4 animate-spin" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path>
|
||||
</svg>
|
||||
<span x-text="loading ? 'Opening payment…' : 'Pay'">Pay</span>
|
||||
</button>
|
||||
|
||||
<p class="mt-3 shrink-0 text-center text-[11px] text-slate-400">Secured by Paystack · Powered by Ladill Mini</p>
|
||||
</div>
|
||||
<label for="amount-mobile" class="sr-only">Amount ({{ $currency }})</label>
|
||||
<div class="relative">
|
||||
<span class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-4 text-lg font-semibold text-slate-400">{{ $currency }}</span>
|
||||
<input type="number" id="amount-mobile" x-model="amount" step="0.01" min="0.01" required autofocus
|
||||
inputmode="decimal"
|
||||
@keydown.enter.prevent="submitPay()"
|
||||
class="w-full rounded-2xl border-slate-200 py-4 pl-16 pr-4 text-3xl font-bold tracking-tight text-slate-900 focus:border-indigo-500 focus:ring-indigo-500"
|
||||
placeholder="0.00">
|
||||
</div>
|
||||
|
||||
<button type="button" @click="submitPay()" :disabled="loading"
|
||||
class="mt-4 flex w-full items-center justify-center gap-2 rounded-2xl bg-indigo-600 py-4 text-base font-semibold text-white hover:bg-indigo-700 disabled:opacity-60">
|
||||
<svg x-show="loading" x-cloak class="h-4 w-4 animate-spin" fill="none" viewBox="0 0 24 24">
|
||||
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
||||
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path>
|
||||
</svg>
|
||||
<span x-text="loading ? 'Opening payment…' : 'Pay'">Pay</span>
|
||||
</button>
|
||||
|
||||
<p class="mt-3 text-center text-[11px] text-slate-400">Secured by Paystack · Powered by Ladill Mini</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user