mirror of
https://github.com/twinpath/app.git
synced 2026-01-26 21:32:02 +07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<div>
|
||||
<div class="absolute right-0 top-0 -z-1 w-full max-w-[250px] xl:max-w-[450px]">
|
||||
<img src="/images/shape/grid-01.svg" alt="grid" />
|
||||
</div>
|
||||
<div class="absolute bottom-0 left-0 -z-1 w-full max-w-[250px] rotate-180 xl:max-w-[450px]">
|
||||
<img src="/images/shape/grid-01.svg" alt="grid" />
|
||||
</div>
|
||||
</div>
|
||||
29
resources/views/components/common/component-card.blade.php
Normal file
29
resources/views/components/common/component-card.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
@props([
|
||||
'title',
|
||||
'desc' => '',
|
||||
])
|
||||
|
||||
<div {{ $attributes->merge(['class' => 'rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]']) }}>
|
||||
<!-- Card Header -->
|
||||
<div class="px-6 py-5">
|
||||
@isset($header)
|
||||
{{ $header }}
|
||||
@else
|
||||
<h3 class="text-base font-medium text-gray-800 dark:text-white/90">
|
||||
{{ $title }}
|
||||
</h3>
|
||||
@if($desc)
|
||||
<p class="mt-1 text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ $desc }}
|
||||
</p>
|
||||
@endif
|
||||
@endisset
|
||||
</div>
|
||||
|
||||
<!-- Card Body -->
|
||||
<div class="p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6">
|
||||
<div class="space-y-6">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
22
resources/views/components/common/dropdown-menu.blade.php
Normal file
22
resources/views/components/common/dropdown-menu.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
@props(['items' => ['View More','Delete']])
|
||||
<div x-data="{openDropDown: false}" class="relative h-fit">
|
||||
<button
|
||||
@click="openDropDown = !openDropDown"
|
||||
:class="openDropDown ? 'text-gray-700 dark:text-white' : 'text-gray-400 hover:text-gray-700 dark:hover:text-white'"
|
||||
>
|
||||
<svg class="fill-current" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2441 6C10.2441 5.0335 11.0276 4.25 11.9941 4.25H12.0041C12.9706 4.25 13.7541 5.0335 13.7541 6C13.7541 6.9665 12.9706 7.75 12.0041 7.75H11.9941C11.0276 7.75 10.2441 6.9665 10.2441 6ZM10.2441 18C10.2441 17.0335 11.0276 16.25 11.9941 16.25H12.0041C12.9706 16.25 13.7541 17.0335 13.7541 18C13.7541 18.9665 12.9706 19.75 12.0041 19.75H11.9941C11.0276 19.75 10.2441 18.9665 10.2441 18ZM11.9941 10.25C11.0276 10.25 10.2441 11.0335 10.2441 12C10.2441 12.9665 11.0276 13.75 11.9941 13.75H12.0041C12.9706 13.75 13.7541 12.9665 13.7541 12C13.7541 11.0335 12.9706 10.25 12.0041 10.25H11.9941Z" fill=""/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div x-show="openDropDown" @click.outside="openDropDown = false"
|
||||
class="absolute right-0 z-40 w-40 p-2 space-y-1 bg-white border border-gray-200 shadow-theme-lg dark:bg-gray-dark top-full rounded-2xl dark:border-gray-800">
|
||||
@forelse($items as $item)
|
||||
<button class="flex w-full px-3 py-2 font-medium text-left text-gray-500 rounded-lg text-theme-xs hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300">
|
||||
{{ $item }}
|
||||
</button>
|
||||
@empty
|
||||
{{ $slot }}
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
38
resources/views/components/common/page-breadcrumb.blade.php
Normal file
38
resources/views/components/common/page-breadcrumb.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@props(['pageTitle' => 'Page'])
|
||||
|
||||
<div class="flex flex-wrap items-center justify-between gap-3 mb-6">
|
||||
<h2 class="text-xl font-semibold text-gray-800 dark:text-white/90">
|
||||
{{ $pageTitle }}
|
||||
</h2>
|
||||
<nav>
|
||||
<ol class="flex items-center gap-1.5">
|
||||
<li>
|
||||
<a
|
||||
class="inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400"
|
||||
href="{{ url('/') }}"
|
||||
>
|
||||
Home
|
||||
<svg
|
||||
class="stroke-current"
|
||||
width="17"
|
||||
height="16"
|
||||
viewBox="0 0 17 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M6.0765 12.667L10.2432 8.50033L6.0765 4.33366"
|
||||
stroke=""
|
||||
stroke-width="1.2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li class="text-sm text-gray-800 dark:text-white/90">
|
||||
{{ $pageTitle }}
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
9
resources/views/components/common/preloader.blade.php
Normal file
9
resources/views/components/common/preloader.blade.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div
|
||||
x-show="loaded"
|
||||
x-init="window.addEventListener('DOMContentLoaded', () => {setTimeout(() => loaded = false, 350)})"
|
||||
class="fixed left-0 top-0 z-999999 flex h-screen w-screen items-center justify-center bg-white dark:bg-black"
|
||||
>
|
||||
<div
|
||||
class="h-16 w-16 animate-spin rounded-full border-4 border-solid border-brand-500 border-t-transparent"
|
||||
></div>
|
||||
</div>
|
||||
39
resources/views/components/common/table-dropdown.blade.php
Normal file
39
resources/views/components/common/table-dropdown.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<div x-data="{
|
||||
isOpen: false,
|
||||
popperInstance: null,
|
||||
init() {
|
||||
this.$nextTick(() => {
|
||||
this.popperInstance = createPopper(this.$refs.button, this.$refs.content, {
|
||||
placement: 'bottom-end',
|
||||
strategy: 'fixed',
|
||||
modifiers: [
|
||||
{
|
||||
name: 'offset',
|
||||
options: {
|
||||
offset: [0, 4],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
},
|
||||
toggle() {
|
||||
this.isOpen = !this.isOpen;
|
||||
if (this.popperInstance) {
|
||||
this.popperInstance.update();
|
||||
}
|
||||
}
|
||||
}"
|
||||
@click.away="isOpen = false">
|
||||
<div @click="toggle()" x-ref="button" class="cursor-pointer">
|
||||
{{ $button }}
|
||||
</div>
|
||||
|
||||
<div class="z-50 fixed" x-ref="content">
|
||||
<div x-show="isOpen" x-cloak class="p-2 bg-white border border-gray-200 rounded-2xl shadow-lg dark:border-gray-800 dark:bg-gray-dark w-40">
|
||||
<div class="space-y-1" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
|
||||
{{ $content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
30
resources/views/components/common/theme-toggle.blade.php
Normal file
30
resources/views/components/common/theme-toggle.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<button
|
||||
x-data="{ theme: localStorage.getItem('theme') || 'light' }"
|
||||
x-init="
|
||||
if (theme === 'dark') {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
"
|
||||
@click="
|
||||
theme = theme === 'light' ? 'dark' : 'light';
|
||||
localStorage.setItem('theme', theme);
|
||||
if (theme === 'dark') {
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
"
|
||||
class="relative flex items-center justify-center text-gray-500 transition-colors bg-white border border-gray-200 rounded-full hover:text-dark-900 h-11 w-11 hover:bg-gray-100 hover:text-gray-700 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white"
|
||||
>
|
||||
<!-- Dark Icon -->
|
||||
<svg x-show="theme === 'dark'" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20" width="20" height="20">
|
||||
<path fill="currentColor" d="M9.99998 1.5415C10.4142 1.5415 10.75 1.87729 10.75 2.2915V3.5415C10.75 3.95572 10.4142 4.2915 9.99998 4.2915C9.58577 4.2915 9.24998 3.95572 9.24998 3.5415V2.2915C9.24998 1.87729 9.58577 1.5415 9.99998 1.5415Z" />
|
||||
<!-- (rest of moon icon path here) -->
|
||||
</svg>
|
||||
|
||||
<!-- Light Icon -->
|
||||
<svg x-show="theme === 'light'" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20" width="20" height="20">
|
||||
<path fill="currentColor" d="M17.4547 11.97L18.1799 12.1611C18.265 11.8383 18.1265 11.4982 17.8401 11.3266C17.5538 11.1551 17.1885 11.1934 16.944 11.4207L17.4547 11.97Z" />
|
||||
<!-- (rest of sun icon path here) -->
|
||||
</svg>
|
||||
</button>
|
||||
Reference in New Issue
Block a user