wip 9
This commit is contained in:
@@ -37,11 +37,11 @@ export default function HamburgerMenu() {
|
||||
const isAdmin = user?.is_admin ?? false;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col z-40 relative ml-6">
|
||||
<div className="relative z-40 ml-6 flex flex-col">
|
||||
{/* Checkbox input for state management */}
|
||||
<input
|
||||
type="checkbox"
|
||||
className="absolute lg:hidden z-50 -top-2 w-7 h-7 flex cursor-pointer opacity-0"
|
||||
className="absolute -top-2 z-50 flex size-7 cursor-pointer opacity-0 lg:hidden"
|
||||
id="mobile-nav-checkbox"
|
||||
checked={isOpen}
|
||||
onChange={(e) => setIsOpen(e.target.checked)}
|
||||
@@ -49,7 +49,7 @@ export default function HamburgerMenu() {
|
||||
|
||||
{/* Hamburger icon lines with CSS animations - hidden on desktop */}
|
||||
<span
|
||||
className="lg:hidden bg-black w-7 h-0.5 z-40 mt-0.5 dark:bg-white transition-transform transition-background transition-opacity duration-500"
|
||||
className="transition-background z-40 mt-0.5 h-0.5 w-7 bg-black transition-opacity transition-transform duration-500 lg:hidden dark:bg-white"
|
||||
style={{
|
||||
transformOrigin: '5px 0px',
|
||||
transition: 'transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease',
|
||||
@@ -57,7 +57,7 @@ export default function HamburgerMenu() {
|
||||
}}
|
||||
/>
|
||||
<span
|
||||
className="lg:hidden bg-black w-7 h-0.5 z-40 mt-1 dark:bg-white transition-transform transition-background transition-opacity duration-500"
|
||||
className="transition-background z-40 mt-1 h-0.5 w-7 bg-black transition-opacity transition-transform duration-500 lg:hidden dark:bg-white"
|
||||
style={{
|
||||
transformOrigin: '0% 100%',
|
||||
transition: 'transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease',
|
||||
@@ -66,7 +66,7 @@ export default function HamburgerMenu() {
|
||||
}}
|
||||
/>
|
||||
<span
|
||||
className="lg:hidden bg-black w-7 h-0.5 z-40 mt-1 dark:bg-white transition-transform transition-background transition-opacity duration-500"
|
||||
className="transition-background z-40 mt-1 h-0.5 w-7 bg-black transition-opacity transition-transform duration-500 lg:hidden dark:bg-white"
|
||||
style={{
|
||||
transformOrigin: '0% 0%',
|
||||
transition: 'transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease',
|
||||
@@ -77,7 +77,7 @@ export default function HamburgerMenu() {
|
||||
{/* Navigation menu with slide animation */}
|
||||
<div
|
||||
id="menu"
|
||||
className="fixed -ml-6 h-full w-56 lg:w-48 bg-white dark:bg-gray-700 shadow-lg"
|
||||
className="fixed -ml-6 h-full w-56 bg-white shadow-lg lg:w-48 dark:bg-gray-700"
|
||||
style={{
|
||||
top: 0,
|
||||
paddingTop: 'env(safe-area-inset-top)',
|
||||
@@ -96,8 +96,8 @@ export default function HamburgerMenu() {
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
<div className="h-16 flex justify-end lg:justify-around">
|
||||
<p className="text-xl font-bold dark:text-white text-right my-auto pr-8 lg:pr-0">
|
||||
<div className="flex h-16 justify-end lg:justify-around">
|
||||
<p className="my-auto pr-8 text-right text-xl font-bold lg:pr-0 dark:text-white">
|
||||
AnthoLume
|
||||
</p>
|
||||
</div>
|
||||
@@ -107,7 +107,7 @@ export default function HamburgerMenu() {
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
onClick={() => setIsOpen(false)}
|
||||
className={`flex items-center justify-start w-full p-2 pl-6 my-2 transition-colors duration-200 border-l-4 ${
|
||||
className={`my-2 flex w-full items-center justify-start border-l-4 p-2 pl-6 transition-colors duration-200 ${
|
||||
location.pathname === item.path
|
||||
? 'border-purple-500 dark:text-white'
|
||||
: 'border-transparent text-gray-400 hover:text-gray-800 dark:hover:text-gray-100'
|
||||
@@ -120,7 +120,7 @@ export default function HamburgerMenu() {
|
||||
|
||||
{/* Admin section - only visible for admins */}
|
||||
{isAdmin && (
|
||||
<div className={`flex flex-col gap-4 p-2 pl-6 my-2 transition-colors duration-200 border-l-4 ${
|
||||
<div className={`my-2 flex flex-col gap-4 border-l-4 p-2 pl-6 transition-colors duration-200 ${
|
||||
hasPrefix(location.pathname, '/admin')
|
||||
? 'border-purple-500 dark:text-white'
|
||||
: 'border-transparent text-gray-400'
|
||||
@@ -129,7 +129,7 @@ export default function HamburgerMenu() {
|
||||
<Link
|
||||
to="/admin"
|
||||
onClick={() => setIsOpen(false)}
|
||||
className={`flex justify-start w-full ${
|
||||
className={`flex w-full justify-start ${
|
||||
location.pathname === '/admin' && !hasPrefix(location.pathname, '/admin/')
|
||||
? 'dark:text-white'
|
||||
: 'text-gray-400 hover:text-gray-800 dark:hover:text-gray-100'
|
||||
@@ -146,7 +146,7 @@ export default function HamburgerMenu() {
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
onClick={() => setIsOpen(false)}
|
||||
className={`flex justify-start w-full ${
|
||||
className={`flex w-full justify-start ${
|
||||
location.pathname === item.path
|
||||
? 'dark:text-white'
|
||||
: 'text-gray-400 hover:text-gray-800 dark:hover:text-gray-100'
|
||||
@@ -162,9 +162,9 @@ export default function HamburgerMenu() {
|
||||
)}
|
||||
</nav>
|
||||
<a
|
||||
className="flex flex-col gap-2 justify-center items-center p-6 w-full absolute bottom-0 text-black dark:text-white"
|
||||
className="absolute bottom-0 flex w-full flex-col items-center justify-center gap-2 p-6 text-black dark:text-white"
|
||||
target="_blank"
|
||||
href="https://gitea.va.reichard.io/evan/AnthoLume"
|
||||
href="https://gitea.va.reichard.io/evan/AnthoLume" rel="noreferrer"
|
||||
>
|
||||
<span className="text-xs">v1.0.0</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user