Skip to content

Commit

Permalink
Fixed Minor UI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lianmaymesi committed Mar 26, 2024
1 parent e4624f1 commit 3ef6aaf
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/vendor/laravel-backend/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"file": "assets/w3c-keyname-a25e4cc1.js"
},
"resources/css/app.css": {
"file": "assets/app-7ce1f91c.css",
"file": "assets/app-120acf28.css",
"isEntry": true,
"src": "resources/css/app.css"
},
Expand Down
7 changes: 4 additions & 3 deletions resources/views/components/card.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
@props(['title' => '', 'noBackground' => false])
@props(['title' => '', 'noBackground' => false, 'sticky' => false])
<div @class([
'lg:rounded-lg w-full shadow border',
'lg:rounded-lg w-full border',
'bg-white' => !$noBackground,
'sticky bottom-0' => $sticky,
])>
@if ($title)
<header class="sticky top-0 z-10 px-6 py-4 text-lg font-semibold bg-white border-b lg:rounded-t-lg">
{{ $title }}
</header>
@endif
<div class="relative z-0 grid grid-cols-1 gap-6 p-6 lg:grid-cols-2">
<div @class(['relative z-0 grid grid-cols-1 gap-6 p-6 lg:grid-cols-2'])>
{{ $slot }}
</div>
</div>
33 changes: 33 additions & 0 deletions resources/views/components/form/layout/flex-col-sticky.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@props([
'maxWidth' => null,
'sticky' => false,
])
@php
$maxWidth = [
'xs' => 'md:max-w-xs',
'sm' => 'md:max-w-sm',
'md' => 'md:max-w-md',
'lg' => 'md:max-w-lg',
'xl' => 'md:max-w-xl',
'2xl' => 'md:max-w-2xl',
'3xl' => 'md:max-w-3xl',
'4xl' => 'md:max-w-4xl',
'5xl' => 'md:max-w-5xl',
'full' => 'max-w-full',
][$maxWidth ?? '2xl'];
@endphp
<div @class([
'relative w-full',
$maxWidth,
'sticky top-0 md:h-[calc(100vh-181px)] overflow-hidden overflow-y-auto lm-scroll-hidden' => $sticky,
])>
<div @class([
'flex flex-col gap-y-4 w-full mb-2',
'sticky top-0 md:h-[calc(100vh-189px)] overflow-hidden overflow-y-auto lm-scroll-hidden' => $sticky,
])>
{{ $slot }}
</div>
@if (isset($stickyContent))
{{ $stickyContent }}
@endif
</div>
2 changes: 1 addition & 1 deletion resources/views/components/form/layout/flex-col.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
][$maxWidth ?? '2xl'];
@endphp
<div @class([
'flex flex-col gap-y-4 w-full mb-2',
'flex flex-col gap-y-4 w-full',
$maxWidth,
'sticky top-0 md:h-[calc(100vh-197px)] overflow-hidden overflow-y-auto lm-scroll-hidden' => $sticky,
])>
Expand Down

0 comments on commit 3ef6aaf

Please sign in to comment.