Refactored to use app folder.

This commit is contained in:
Mike Cao 2023-09-29 05:29:22 -07:00
parent 40cfcd41e9
commit 9a52cdd2e1
258 changed files with 2025 additions and 2258 deletions

View file

@ -0,0 +1,14 @@
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,12 @@
.footer {
display: flex;
flex-direction: row;
justify-content: flex-end;
font-size: var(--font-size-sm);
line-height: 30px;
margin: 40px 0;
}
.footer a {
color: var(--font-color100);
}

View file

@ -0,0 +1,29 @@
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 tooltipPosition="bottom" />
<LanguageButton tooltipPosition="bottom" menuPosition="bottom" />
<SettingsButton />
</div>
</header>
);
}
export default Header;

View file

@ -0,0 +1,47 @@
.header {
display: flex;
flex-direction: row;
align-items: center;
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%;
}
}
@media only screen and (max-width: 768px) {
.buttons,
.links {
display: none;
}
}

View file

@ -0,0 +1,17 @@
import Page from 'components/layout/Page';
import WebsiteDetails from 'app/(app)/websites/[id]/WebsiteDetails';
import useShareToken from 'components/hooks/useShareToken';
export default function SharePage({ params }) {
const shareToken = useShareToken(params.id);
if (!shareToken) {
return null;
}
return (
<Page>
<WebsiteDetails websiteId={shareToken.websiteId} />
</Page>
);
}