Tooltip kustom premium via Alpine directive x-tooltip

- Directive global di app.js: satu tooltip singleton di body, posisi dari
  getBoundingClientRect (fixed, tidak terpotong overflow-hidden), animasi
  fade + slide halus, delay 120ms anti-kedip, fallback ke bawah jika di
  tepi atas viewport, clamp ke viewport
- Tooltip gelap glass: bg-slate-900/95 + ring + shadow + backdrop-blur
- Badge kalender pelanggaran ('X pelanggaran') & presensi ('X siswa, Y
  alpha') beralih dari :title native ke x-tooltip
- Sembunyi otomatis saat scroll/resize/klik
This commit is contained in:
Novy San87
2026-08-03 18:08:57 +07:00
parent 349ebb2b30
commit 3169c636c5
3 changed files with 85 additions and 2 deletions
+1 -1
View File
@@ -132,7 +132,7 @@
<template x-if="day.total > 0 && day.isCurrentMonth">
<span class="absolute bottom-1.5 right-1.5 inline-flex items-center justify-center min-w-[28px] h-[28px] text-xs font-extrabold text-white rounded-full shadow-lg transition-transform hover:scale-110"
:class="day.alpha > 0 ? 'bg-gradient-to-br from-red-500 to-rose-600 shadow-red-500/30' : 'bg-gradient-to-br from-emerald-500 to-emerald-600 shadow-emerald-500/30'"
:title="day.total + ' siswa, ' + day.alpha + ' alpha'"
x-tooltip="day.total + ' siswa, ' + day.alpha + ' alpha'"
x-text="day.total">
</span>
</template>