mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-25 04:13:17 +00:00
🛠️ Update window.nostr.min.js with optimized logic and improved syntax for better performance and readability
This commit is contained in:
@@ -15,7 +15,7 @@ new class extends Component {
|
||||
|
||||
<div class="min-w-fit">
|
||||
@php
|
||||
$isCurrentRouteClass = 'pl-4 pr-3 py-2 rounded-lg mb-0.5 last:mb-0 bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-orange-500/[0.12] dark:from-orange-500/[0.24] to-orange-500/[0.04]';
|
||||
$isCurrentRouteClass = 'pl-4 pr-3 py-2 rounded-lg mb-0.5 last:mb-0 bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-orange-500/12 dark:from-orange-500/24 to-orange-500/4';
|
||||
$isNotCurrentRouteClass = 'pl-4 pr-3 py-2 rounded-lg mb-0.5 last:mb-0';
|
||||
$isCurrentSubItem = 'block text-orange-500 transition truncate';
|
||||
$isNotCurrentSubItem = 'block text-gray-500/90 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition truncate';
|
||||
@@ -32,7 +32,7 @@ new class extends Component {
|
||||
<!-- Sidebar -->
|
||||
<div
|
||||
id="sidebar"
|
||||
class="flex flex-col absolute z-40 left-0 top-0 lg:static lg:left-auto lg:top-auto lg:translate-x-0 h-[100dvh] overflow-y-scroll lg:overflow-y-auto no-scrollbar w-64 lg:w-20 lg:sidebar-expanded:!w-64 2xl:!w-64 shrink-0 bg-white dark:bg-[#222222] shadow-sm rounded-r-2xl p-4 transition-all duration-200 ease-in-out"
|
||||
class="flex flex-col absolute z-40 left-0 top-0 lg:static lg:left-auto lg:top-auto lg:translate-x-0 h-dvh overflow-y-scroll lg:overflow-y-auto no-scrollbar w-64 lg:w-20 lg:sidebar-expanded:!w-64 2xl:w-64! shrink-0 bg-white dark:bg-[#222222] shadow-sm rounded-r-2xl p-4 transition-all duration-200 ease-in-out"
|
||||
:class="sidebarOpen ? 'translate-x-0' : '-translate-x-64'"
|
||||
@click.outside="sidebarOpen = false"
|
||||
@keydown.escape.window="sidebarOpen = false"
|
||||
@@ -54,7 +54,7 @@ new class extends Component {
|
||||
</div>
|
||||
|
||||
@php
|
||||
$activeLinkGroupClass = ' bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-amber-500/[0.12] dark:from-amber-500/[0.24] to-amber-500/[0.04]';
|
||||
$activeLinkGroupClass = ' bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-amber-500/12 dark:from-amber-500/24 to-amber-500/4';
|
||||
$activeItemClass = 'block text-amber-500 transition truncate';
|
||||
@endphp
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
</script>
|
||||
<div x-data="nostrLogin"
|
||||
class="flex h-[100dvh] overflow-hidden">
|
||||
class="flex h-dvh overflow-hidden">
|
||||
<livewire:layout.sidebar/>
|
||||
<div
|
||||
class="relative flex flex-col flex-1 overflow-y-auto overflow-x-hidden">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class="lg:hidden lg:sidebar-expanded:block 2xl:block">
|
||||
<ul class="pl-8 mt-1" :class="open ? '!block' : 'hidden'">
|
||||
<ul class="pl-8 mt-1" :class="open ? 'block!' : 'hidden'">
|
||||
<li class="mb-1 last:mb-0">
|
||||
<a class="block text-amber-500 transition truncate" href="index.html">
|
||||
<span
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class="lg:hidden lg:sidebar-expanded:block 2xl:block">
|
||||
<ul class="pl-8 mt-1 hidden" :class="open ? '!block' : 'hidden'">
|
||||
<ul class="pl-8 mt-1 hidden" :class="open ? 'block!' : 'hidden'">
|
||||
<li class="mb-1 last:mb-0">
|
||||
<a class="block text-gray-500/90 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition truncate"
|
||||
href="customers.html">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class="lg:hidden lg:sidebar-expanded:block 2xl:block">
|
||||
<ul class="pl-8 mt-1" :class="open ? '!block' : 'hidden'">
|
||||
<ul class="pl-8 mt-1" :class="open ? 'block!' : 'hidden'">
|
||||
<li class="mb-1 last:mb-0">
|
||||
<a class="block text-amber-500 transition truncate" href="index.html">
|
||||
<span
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class="lg:hidden lg:sidebar-expanded:block 2xl:block">
|
||||
<ul class="pl-8 mt-1 hidden" :class="open ? '!block' : 'hidden'">
|
||||
<ul class="pl-8 mt-1 hidden" :class="open ? 'block!' : 'hidden'">
|
||||
<li class="mb-1 last:mb-0">
|
||||
<a class="block text-gray-500/90 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition truncate"
|
||||
href="customers.html">
|
||||
|
||||
Reference in New Issue
Block a user