Layout updates.

This commit is contained in:
Mike Cao 2023-08-02 00:56:52 -07:00
parent 64ebe8b307
commit d573def802
9 changed files with 19 additions and 52 deletions

View File

@ -1,6 +1,5 @@
import { Container } from 'react-basics'; import { Container } from 'react-basics';
import Head from 'next/head'; import Head from 'next/head';
import { useRouter } from 'next/router';
import NavBar from 'components/layout/NavBar'; import NavBar from 'components/layout/NavBar';
import UpdateNotice from 'components/common/UpdateNotice'; import UpdateNotice from 'components/common/UpdateNotice';
import useRequireLogin from 'hooks/useRequireLogin'; import useRequireLogin from 'hooks/useRequireLogin';

View File

@ -18,4 +18,5 @@
min-height: 0; min-height: 0;
height: calc(100vh - 60px); height: calc(100vh - 60px);
overflow-y: auto; overflow-y: auto;
padding-bottom: 60px;
} }

View File

@ -1,31 +1,12 @@
import { Row, Column } from 'react-basics'; import { CURRENT_VERSION, HOMEPAGE_URL } from 'lib/constants';
import { FormattedMessage } from 'react-intl';
import { CURRENT_VERSION, HOMEPAGE_URL, REPO_URL } from 'lib/constants';
import { labels } from 'components/messages';
import styles from './Footer.module.css'; import styles from './Footer.module.css';
export function Footer() { export function Footer() {
return ( return (
<footer className={styles.footer}> <footer className={styles.footer}>
<Row>
<Column defaultSize={12} lg={11} xl={11}>
<div>
<FormattedMessage
{...labels.poweredBy}
values={{
name: (
<a href={HOMEPAGE_URL}> <a href={HOMEPAGE_URL}>
<b>umami</b> <b>umami</b> {`v${CURRENT_VERSION}`}
</a> </a>
),
}}
/>
</div>
</Column>
<Column className={styles.version} defaultSize={12} lg={1} xl={1}>
<a href={REPO_URL}>{`v${CURRENT_VERSION}`}</a>
</Column>
</Row>
</footer> </footer>
); );
} }

View File

@ -1,16 +1,12 @@
.footer { .footer {
display: flex;
flex-direction: row;
justify-content: flex-end;
font-size: var(--font-size-sm); font-size: var(--font-size-sm);
text-align: center;
line-height: 30px; line-height: 30px;
margin: 60px 0; margin: 40px 0;
} }
.footer a { .footer a {
color: var(--font-color100); color: var(--font-color100);
} }
.version {
text-align: right;
padding-right: 10px;
white-space: nowrap;
}

View File

@ -9,7 +9,7 @@ import styles from './Header.module.css';
export function Header() { export function Header() {
return ( return (
<header className={styles.header}> <header className={styles.header}>
<Row> <Row className={styles.row}>
<Column> <Column>
<Link href="https://umami.is" target="_blank" className={styles.title}> <Link href="https://umami.is" target="_blank" className={styles.title}>
<Icon size="lg"> <Icon size="lg">

View File

@ -1,8 +1,13 @@
.header { .header {
display: flex; display: flex;
flex-direction: row;
align-items: center; align-items: center;
width: 100%; width: 100%;
padding: 30px 30px 0 30px; height: 100px;
}
.row {
align-items: center;
} }
.title { .title {
@ -35,18 +40,8 @@
} }
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
.header {
padding: 0 30px;
}
.buttons, .buttons,
.links { .links {
display: none; display: none;
} }
.title {
flex: 1;
padding: 0.5rem;
margin-bottom: 0.5rem;
}
} }

View File

@ -4,11 +4,4 @@
flex-direction: column; flex-direction: column;
background: var(--base50); background: var(--base50);
position: relative; position: relative;
padding: 30px;
}
@media only screen and (max-width: 768px) {
.page {
padding: 10px 0;
}
} }

View File

@ -1,10 +1,12 @@
.header { .header {
display: flex; display: flex;
flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
align-content: center; align-content: center;
align-self: stretch; align-self: stretch;
flex-wrap: wrap; flex-wrap: wrap;
height: 100px;
} }
.header a { .header a {

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "2.4.0", "version": "2.4.1",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.", "description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",