mirror of
https://git.aramjonghu.dev/AramJonghu/aramjonghu-site.git
synced 2026-09-10 16:53:30 +02:00
chore(mobile view): more mobile view improvements e.g. item sizes
This commit is contained in:
@@ -44,7 +44,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ui-btn {
|
.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 {
|
.ui-btn:hover {
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ interface NavItem {
|
|||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface PageItem {
|
||||||
|
label: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface HeaderTheme {
|
interface HeaderTheme {
|
||||||
theme: string;
|
theme: string;
|
||||||
toggleTheme: () => void;
|
toggleTheme: () => void;
|
||||||
@@ -21,11 +26,15 @@ export default function Header({ theme }: HeaderProps) {
|
|||||||
{ label: "Nextcloud", url: "https://nextcloud.aramjonghu.dev" },
|
{ label: "Nextcloud", url: "https://nextcloud.aramjonghu.dev" },
|
||||||
{ label: "Navidrome", url: "https://music.aramjonghu.dev" },
|
{ label: "Navidrome", url: "https://music.aramjonghu.dev" },
|
||||||
{ label: "Forgejo Git", url: "https://git.aramjonghu.dev" },
|
{ label: "Forgejo Git", url: "https://git.aramjonghu.dev" },
|
||||||
{ label: "Stream", url: "/stream" },
|
|
||||||
{ label: "Omnisearch", url: "https://xng.aramjonghu.dev" },
|
{ label: "Omnisearch", url: "https://xng.aramjonghu.dev" },
|
||||||
{ label: "Gitea zach-dev", url: "https://git.zach-dev.cc" },
|
{ label: "Gitea zach-dev", url: "https://git.zach-dev.cc" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const pageItems: PageItem[] = [
|
||||||
|
{ label: "Stream", url: "/stream" },
|
||||||
|
{ label: "Contact", url: "/contact" },
|
||||||
|
];
|
||||||
|
|
||||||
const goHome = () => {
|
const goHome = () => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
};
|
};
|
||||||
@@ -39,21 +48,32 @@ export default function Header({ theme }: HeaderProps) {
|
|||||||
onClick={goHome}
|
onClick={goHome}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<nav className="flex flex-wrap justify-end gap-2 md:gap-3 items-center">
|
<nav className="flex flex-wrap gap-2 md:gap-3 items-start">
|
||||||
{navItems.map((item) => (
|
{navItems.map((nav) => (
|
||||||
<a
|
<a
|
||||||
key={item.label}
|
key={nav.label}
|
||||||
href={item.url}
|
href={nav.url}
|
||||||
className="ui-btn ui-btn:hover px-2 py-1 md:px-3 md:py-1"
|
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>
|
</a>
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
className="ui-btn ui-btn:hover text-lg font-[NerdFontSymbols]"
|
className="theme-ui-btn ui-btn:hover text-lg font-[NerdFontSymbols]"
|
||||||
onClick={toggleTheme}
|
onClick={toggleTheme}
|
||||||
>
|
>
|
||||||
{currentTheme === "macchiato" ? "" : ""}
|
{currentTheme === "macchiato" ? "" : ""}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function ProjectInfo(): ReactElement {
|
|||||||
>
|
>
|
||||||
◀︎ Prev
|
◀︎ Prev
|
||||||
</button>
|
</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})
|
{projects[projIdx].name} ({projIdx + 1}/{projects.length})
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user