feat(string coder) implementation

This commit is contained in:
lumither committed 2024-10-15 01:48:25 -07:00
1 parent b84f81611a
commit efdea9872f
7 files changed
+222 -11

No files matched your search

+20 -4
View File
@@ -1,24 +1,40 @@
'use client';
import React from 'react';
import ThemeSwitcher from '@/Components/ThemeSwitcher';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { urlList } from '@/app/urlList';
const searchPageName = (url: string) => {
const page = urlList.find((it) => it.url === url);
return page && page.name;
};
const Header = () => {
const path = usePathname();
const currModule = searchPageName(path);
return (
<div>
<div className={ 'z-50' }>
<div
className={ 'h-16 fixed backdrop-blur w-full z-50 transition-colors border-b-[1px] border-neutral-200 dark:border-neutral-700' }
>
<div className={ 'p-3 px-5' }>
<div className={ 'flex flex-row items-center justify-between align-baseline' }>
<div className={ 'grid grid-cols-2 md:grid-cols-3 items-center justify-between' }>
<Link
className={ 'font-bold text-2xl' }
href={ '/' }
>
LMTLab
</Link>
<ThemeSwitcher />
<p className={ 'hidden md:block text-2xl text-weak justify-self-center' }>
{ currModule }
</p>
<div className={ 'justify-self-end' }>
<ThemeSwitcher />
</div>
</div>
</div>