diff --git a/src/ui/App.tsx b/src/ui/App.tsx index 30d933ea..6bdd6617 100644 --- a/src/ui/App.tsx +++ b/src/ui/App.tsx @@ -43,15 +43,18 @@ function AnimatedRoutes(props: ParentProps) { }, ]; + const properties: KeyframeAnimationOptions = { + duration: 100, + easing: 'cubic-bezier(0.22, 1, 0.36, 1)', + }; + return ( { const animation = element.animate( keyframesEnter, - { - duration: 100, - }, + properties, ); animation.onfinish = done; @@ -59,9 +62,7 @@ function AnimatedRoutes(props: ParentProps) { onExit={(element, done) => { const animation = element.animate( keyframesExit, - { - duration: 100, - }, + properties, ); animation.onfinish = done; diff --git a/src/ui/components/Navbar.tsx b/src/ui/components/Navbar.tsx index 453e1297..4d9a0d1a 100644 --- a/src/ui/components/Navbar.tsx +++ b/src/ui/components/Navbar.tsx @@ -22,7 +22,7 @@ function NavbarButton(props: NavbarButtonProps) { function Navbar() { return (
-
+
diff --git a/src/ui/components/base/Button.module.scss b/src/ui/components/base/Button.module.scss index 3985e6e5..e2d1367c 100644 --- a/src/ui/components/base/Button.module.scss +++ b/src/ui/components/base/Button.module.scss @@ -8,6 +8,7 @@ &__secondary { @apply border border-gray-.5; + @apply text-fg-primary hover:text-fg-primary-hover active:text-fg-primary-pressed disabled:text-fg-primary-disabled; @apply bg-component-bg hover:bg-component-bg-hover active:bg-component-bg-pressed disabled:bg-component-bg-disabled; } diff --git a/src/ui/components/base/TextField.module.scss b/src/ui/components/base/TextField.module.scss new file mode 100644 index 00000000..f90ad672 --- /dev/null +++ b/src/ui/components/base/TextField.module.scss @@ -0,0 +1,21 @@ +.textfield { + @apply bg-component-bg [&:not(:focus-within)]:hover:bg-component-bg-hover focus-within:bg-component-bg-pressed disabled:bg-component-bg-disabled; + @apply border border-gray-.5 text-fg-primary fill-fg-primary; + @apply rounded-lg px-2.5 py-1; + @apply flex flex-row gap-x-1.5; + + + & input { + &::selection { + @apply bg-brand/30; + } + + @apply bg-transparent outline-none appearance-none p-0 m-0 box-border w-full; + } + + & span { + & * { + @apply w-4; + } + } +} \ No newline at end of file diff --git a/src/ui/components/base/TextField.tsx b/src/ui/components/base/TextField.tsx new file mode 100644 index 00000000..0d7d89ac --- /dev/null +++ b/src/ui/components/base/TextField.tsx @@ -0,0 +1,21 @@ +import { JSX, splitProps } from 'solid-js'; +import styles from './TextField.module.scss'; + +type TextFieldProps = { + iconLeft?: JSX.Element; + iconRight?: JSX.Element; +} & JSX.InputHTMLAttributes; + +function TextField(props: TextFieldProps) { + const [fieldProps, rest] = splitProps(props, ['iconLeft', 'iconRight']); + + return ( +
+ {fieldProps.iconLeft && {fieldProps.iconLeft}} + + {fieldProps.iconRight && {fieldProps.iconRight}} +
+ ); +} + +export default TextField; diff --git a/src/ui/pages/Home.tsx b/src/ui/pages/Home.tsx index 8116d431..6e0b92b9 100644 --- a/src/ui/pages/Home.tsx +++ b/src/ui/pages/Home.tsx @@ -1,8 +1,12 @@ -import { CheckIcon, DotsVerticalIcon, PlayIcon } from '@untitled-theme/icons-solid'; +import { + CheckIcon, DotsVerticalIcon, Download01Icon, PlayIcon, PlusIcon, SearchMdIcon, +} from '@untitled-theme/icons-solid'; import image from '../../assets/images/header.png'; import Button from '../components/base/Button'; import Tag from '../components/base/Tag'; +import TextField from '../components/base/TextField'; +// TODO: Replace this into it's own component function OneConfigLogo() { return ( @@ -16,31 +20,28 @@ function OneConfigLogo() { - ); } -function HomePage() { +function Banner() { return ( -
-
- -
-
-

Building worlds

-

A description would go here if I was smart

+
+ +
+
+

Building worlds

+

A description would go here if I was smart

+
+
+
+ +
-
-
- - -
-
- } /> - }>Verified -
+
+ } /> + }>Verified
@@ -48,4 +49,21 @@ function HomePage() { ); } +function HomePage() { + return ( +
+ +
+
+ } placeholder="Search for something..." /> +
+
+ + +
+
+
+ ); +} + export default HomePage; diff --git a/tailwind.config.js b/tailwind.config.js index de4aac9a..63c9def1 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -83,6 +83,10 @@ export default { 3: 3, }, + backgroundColor: { + transparent: 'transparent', + }, + animation: { 'fade-in': 'fadeIn 150ms easeOutExpo forwards', 'fade-out': 'fadeOut 150ms easeOutExpo forwards',