chore(mobile view): more mobile view improvements e.g. item sizes

This commit is contained in:
2026-07-31 20:23:38 +02:00
parent 9edde535bb
commit 5d07d33eaa
3 changed files with 33 additions and 9 deletions
+5 -1
View File
@@ -44,7 +44,11 @@
}
.ui-btn {
@apply text-ctp-text border border-ctp-text rounded px-3 py-1 cursor-pointer transition-colors;
@apply text-ctp-text border border-ctp-text rounded px-3 py-1 min-w-8 2xl:min-w-36 text-center cursor-pointer transition-colors;
}
.theme-ui-btn {
@apply text-ctp-text border border-ctp-text rounded px-3 py-1 min-w-10 text-center cursor-pointer transition-colors;
}
.ui-btn:hover {
+27 -7
View File
@@ -5,6 +5,11 @@ interface NavItem {
url: string;
}
interface PageItem {
label: string;
url: string;
}
interface HeaderTheme {
theme: string;
toggleTheme: () => void;
@@ -21,11 +26,15 @@ export default function Header({ theme }: HeaderProps) {
{ label: "Nextcloud", url: "https://nextcloud.aramjonghu.dev" },
{ label: "Navidrome", url: "https://music.aramjonghu.dev" },
{ label: "Forgejo Git", url: "https://git.aramjonghu.dev" },
{ label: "Stream", url: "/stream" },
{ label: "Omnisearch", url: "https://xng.aramjonghu.dev" },
{ label: "Gitea zach-dev", url: "https://git.zach-dev.cc" },
];
const pageItems: PageItem[] = [
{ label: "Stream", url: "/stream" },
{ label: "Contact", url: "/contact" },
];
const goHome = () => {
window.location.href = "/";
};
@@ -39,21 +48,32 @@ export default function Header({ theme }: HeaderProps) {
onClick={goHome}
/>
<nav className="flex flex-wrap justify-end gap-2 md:gap-3 items-center">
{navItems.map((item) => (
<nav className="flex flex-wrap gap-2 md:gap-3 items-start">
{navItems.map((nav) => (
<a
key={item.label}
href={item.url}
key={nav.label}
href={nav.url}
className="ui-btn ui-btn:hover px-2 py-1 md:px-3 md:py-1"
>
{item.label}
{nav.label}
</a>
))}
</nav>
<nav className="flex flex-wrap gap-2 md:gap-3 items-end">
{pageItems.map((page) => (
<a
key={page.label}
href={page.url}
className="ui-btn ui-btn:hover px-2 py-1 md:px-3 md:py-1"
>
{page.label}
</a>
))}
</nav>
<div>
<button
className="ui-btn ui-btn:hover text-lg font-[NerdFontSymbols]"
className="theme-ui-btn ui-btn:hover text-lg font-[NerdFontSymbols]"
onClick={toggleTheme}
>
{currentTheme === "macchiato" ? "" : ""}
+1 -1
View File
@@ -17,7 +17,7 @@ export default function ProjectInfo(): ReactElement {
>
Prev
</button>
<span className="self-center min-w-0 truncate mx-2 md:mx-6 text-ctp-mauve text-xl md:text-2xl font-bold">
<span className="self-center min-w-0 truncate mx-2 md:mx-6 text-ctp-mauve lg:text-xl text-l font-bold">
{projects[projIdx].name} ({projIdx + 1}/{projects.length})
</span>
<button