Changed route ids to be more explicit.

This commit is contained in:
Mike Cao 2024-01-29 14:47:52 -08:00
parent 1a70350936
commit 18e36aa7b3
105 changed files with 86 additions and 76 deletions

View file

@ -0,0 +1,12 @@
.footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
font-size: var(--font-size-sm);
height: 100px;
}
.footer a {
color: var(--font-color100);
}

View file

@ -0,0 +1,15 @@
'use client';
import { CURRENT_VERSION, HOMEPAGE_URL } from 'lib/constants';
import styles from './Footer.module.css';
export function Footer() {
return (
<footer className={styles.footer}>
<a href={HOMEPAGE_URL}>
<b>umami</b> {`v${CURRENT_VERSION}`}
</a>
</footer>
);
}
export default Footer;

View file

@ -0,0 +1,41 @@
.header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
height: 100px;
}
.row {
align-items: center;
}
.title {
display: flex;
flex-direction: row;
align-items: center;
gap: 10px;
font-size: var(--font-size-lg);
font-weight: 700;
color: var(--font-color100) !important;
}
.buttons {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
@media only screen and (max-width: 992px) {
.header .buttons {
flex: 1;
}
.links {
order: 2;
margin: 20px 0;
min-width: 100%;
}
}

View file

@ -0,0 +1,30 @@
'use client';
import { Icon, Text } from 'react-basics';
import Link from 'next/link';
import LanguageButton from 'components/input/LanguageButton';
import ThemeButton from 'components/input/ThemeButton';
import SettingsButton from 'components/input/SettingsButton';
import Icons from 'components/icons';
import styles from './Header.module.css';
export function Header() {
return (
<header className={styles.header}>
<div>
<Link href="https://umami.is" target="_blank" className={styles.title}>
<Icon size="lg">
<Icons.Logo />
</Icon>
<Text>umami</Text>
</Link>
</div>
<div className={styles.buttons}>
<ThemeButton />
<LanguageButton />
<SettingsButton />
</div>
</header>
);
}
export default Header;

View file

@ -0,0 +1,4 @@
.container {
flex: 1;
min-height: calc(100vh - 200px);
}

View file

@ -0,0 +1,25 @@
'use client';
import WebsiteDetails from '../../(main)/websites/[websiteId]/WebsiteDetails';
import { useShareToken } from 'components/hooks';
import styles from './Share.module.css';
import Page from 'components/layout/Page';
import Header from './Header';
import Footer from './Footer';
export default function Share({ shareId }) {
const { shareToken, isLoading } = useShareToken(shareId);
if (isLoading || !shareToken) {
return null;
}
return (
<div className={styles.container}>
<Page>
<Header />
<WebsiteDetails websiteId={shareToken.websiteId} />
<Footer />
</Page>
</div>
);
}

View file

@ -0,0 +1,10 @@
import Share from './Share';
import { Metadata } from 'next';
export default function ({ params: { shareId } }) {
return <Share shareId={shareId[0]} />;
}
export const metadata: Metadata = {
title: 'umami',
};