diff --git a/assets/toggle-off.svg b/assets/toggle-off.svg new file mode 100644 index 00000000..c9b7fa1d --- /dev/null +++ b/assets/toggle-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/toggle-on.svg b/assets/toggle-on.svg new file mode 100644 index 00000000..8fbcb384 --- /dev/null +++ b/assets/toggle-on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/components/common/Button.module.css b/components/common/Button.module.css index 351f5ecc..14e12d96 100644 --- a/components/common/Button.module.css +++ b/components/common/Button.module.css @@ -57,7 +57,7 @@ } .light { - background: var(--gray50); + background: transparent; } .light:hover { diff --git a/components/common/UserButton.js b/components/common/UserButton.js index fdcc59fb..4c3ffbe7 100644 --- a/components/common/UserButton.js +++ b/components/common/UserButton.js @@ -4,6 +4,7 @@ import { useSelector } from 'react-redux'; import { useRouter } from 'next/router'; import Menu from './Menu'; import Icon from './Icon'; +import Button from './Button'; import useDocumentClick from 'hooks/useDocumentClick'; import User from 'assets/user.svg'; import Chevron from 'assets/chevron-down.svg'; @@ -49,10 +50,15 @@ export default function UserButton() { return (
-
setShowMenu(state => !state)}> - } size="large" /> +
+ {showMenu && (
-
+
} size="large" className={styles.logo} /> umami
-
-
- {user ? ( - <> - - - - - - - - - - - ) : ( - <> - - - - )} +
+ {user && ( +
+ + + + + + +
+ )} +
+
+
+ + + {user && }
diff --git a/components/layout/Header.module.css b/components/layout/Header.module.css index 6853eeda..3c5155a7 100644 --- a/components/layout/Header.module.css +++ b/components/layout/Header.module.css @@ -13,18 +13,37 @@ .nav { display: flex; - justify-content: flex-end; + justify-content: center; align-items: center; font-size: var(--font-size-normal); font-weight: 600; } .nav > * { - margin-left: 40px; + margin-left: 30px; } -@media only screen and (max-width: 768px) { +.nav > *:first-child { + margin: 0; +} + +.buttons { + display: flex; + justify-content: flex-end; +} + +@media only screen and (max-width: 992px) { .title { text-align: center; } + + .nav { + font-size: var(--font-size-large); + justify-content: center; + padding: 20px 0; + } + + .buttons { + justify-content: center; + } } diff --git a/components/settings/LanguageButton.js b/components/settings/LanguageButton.js index 953204f4..38329c9b 100644 --- a/components/settings/LanguageButton.js +++ b/components/settings/LanguageButton.js @@ -46,8 +46,8 @@ export default function LanguageButton({ menuPosition = 'bottom', menuAlign = 'l )}
- {showMenu && ( {theme}; + return ( +