|
@@ -1,15 +1,31 @@
|
1
|
1
|
<dialog id="allguestbook" class="modal">
|
2
|
2
|
<div class="modal-box w-11/12 max-w-5xl">
|
3
|
|
- <h3 class="text-lg font-bold">Semua Ucapan</h3>
|
4
|
|
- @foreach ($allguestbooks as $allguestbook)
|
5
|
|
- <p>{{$allguestbook->name}}</p>
|
6
|
|
- <p>{{$allguestbook->speech}}</p>
|
7
|
|
- <hr class="border-t-1 border-gray-300 my-5 w-4/5 self-center ">
|
8
|
|
- @endforeach
|
9
|
|
- <div class="modal-action">
|
10
|
|
- <form method="dialog">
|
11
|
|
- <button class="btn">Tutup</button>
|
12
|
|
- </form>
|
13
|
|
- </div>
|
|
3
|
+ <h3 class="text-lg font-bold pb-2">Semua Ucapan</h3>
|
|
4
|
+ <div id="scrollableContent" class="max-h-96 overflow-auto">
|
|
5
|
+ @foreach ($allguestbooks as $allguestbook)
|
|
6
|
+ <p class="font-semibold">{{$allguestbook->name}}</p>
|
|
7
|
+ <p>{{$allguestbook->speech}}</p>
|
|
8
|
+ <hr class="border-t-1 border-gray-300 my-5 w-full self-center">
|
|
9
|
+ @endforeach
|
|
10
|
+ </div>
|
|
11
|
+ <div class="modal-action">
|
|
12
|
+ <form method="dialog">
|
|
13
|
+ <button class="btn">Tutup</button>
|
|
14
|
+ </form>
|
|
15
|
+ </div>
|
14
|
16
|
</div>
|
15
|
|
-</dialog>
|
|
17
|
+</dialog>
|
|
18
|
+
|
|
19
|
+@push('script')
|
|
20
|
+<script>
|
|
21
|
+ document.addEventListener('DOMContentLoaded', function () {
|
|
22
|
+ var dialog = document.getElementById('allguestbook');
|
|
23
|
+ if (dialog) {
|
|
24
|
+ dialog.addEventListener('show', function () {
|
|
25
|
+ var scrollableContent = document.getElementById('scrollableContent');
|
|
26
|
+ scrollableContent.scrollTop = scrollableContent.scrollHeight;
|
|
27
|
+ });
|
|
28
|
+ }
|
|
29
|
+ });
|
|
30
|
+</script>
|
|
31
|
+@endpush
|