From 570f5fe1113fe8e47693cddd172c822594e70fcb Mon Sep 17 00:00:00 2001 From: BFlat Date: Sat, 16 Dec 2023 00:27:44 +0700 Subject: [PATCH] added search and nav --- .../src/components/common/Input/Input.tsx | 11 +++- .../src/components/layout/SideNav/SideNav.tsx | 52 ++++++++++++++----- .../src/components/layout/TopNav/TopNav.tsx | 36 ++++++++++--- packages/fakeyou.com/src/scss/nav.scss | 39 ++++++++++++-- .../fakeyou.com/src/scss/site-refresh.scss | 6 ++- 5 files changed, 117 insertions(+), 27 deletions(-) diff --git a/packages/fakeyou.com/src/components/common/Input/Input.tsx b/packages/fakeyou.com/src/components/common/Input/Input.tsx index 4697f07970..edfaef74c0 100644 --- a/packages/fakeyou.com/src/components/common/Input/Input.tsx +++ b/packages/fakeyou.com/src/components/common/Input/Input.tsx @@ -6,11 +6,18 @@ interface InputProps extends React.InputHTMLAttributes { icon?: IconDefinition; label?: string; textArea?: boolean; + className?: string; } -export default function Input({ label, icon, textArea, ...rest }: InputProps) { +export default function Input({ + label, + icon, + textArea, + className, + ...rest +}: InputProps) { return ( -
+
{label && }
diff --git a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx index 1dc3ea7c5e..ae85d5ddd4 100644 --- a/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx +++ b/packages/fakeyou.com/src/components/layout/SideNav/SideNav.tsx @@ -10,6 +10,8 @@ import { faFaceViewfinder, faCloudUpload, faWandMagicSparkles, + faHome, + faCompass, } from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Button from "components/common/Button/Button"; @@ -231,7 +233,42 @@ export default function SideNav(props: SideNavProps) { className={`sidebar ${shouldShowSidebar ? "visible" : ""}`} >
    -
  • {t("speechTitle")}
  • +
  • + + + Home + +
  • +
  • + + + {t("infoPricing")} + +
  • +
  • + + + Explore + +
  • +
    +
  • AI Tools
  • -
    -
  • {t("videoTitle")}

  • -
  • - - - {t("infoPricing")} - -
  • -
  • {t("queueTitle")}
  • diff --git a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx index 4244c19a49..98605cad6d 100644 --- a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx +++ b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx @@ -1,4 +1,6 @@ -import { Button } from "components/common"; +import { faSearch } from "@fortawesome/pro-solid-svg-icons"; +import { Gravatar } from "@storyteller/components/src/elements/Gravatar"; +import { Button, Input, Select } from "components/common"; import React from "react"; import { Link } from "react-router-dom"; @@ -12,14 +14,36 @@ export default function TopNav(props: TopNavProps) { FakeYou: Cartoon and Celebrity Text to Speech -
    - {/* {userOrLoginButton} + + {/* Search Bar */} +
    +
    + +
    +
    + +
    +
    + {/* {userOrLoginButton} {signupOrLogOutButton} */} -
    +
    + +
    diff --git a/packages/fakeyou.com/src/scss/nav.scss b/packages/fakeyou.com/src/scss/nav.scss index ad81068f29..7da61e472e 100644 --- a/packages/fakeyou.com/src/scss/nav.scss +++ b/packages/fakeyou.com/src/scss/nav.scss @@ -10,7 +10,7 @@ transition: all 0.2s ease; } -$topbar-height: 70px; +$topbar-height: 66px; #sidebar-wrapper { z-index: 1000; @@ -69,7 +69,7 @@ $topbar-height: 70px; background: $panel; border-color: rgba(255, 255, 255, 0.0705882353) !important; border-right: 1px solid; - padding-top: 1.5rem; + padding-top: 1rem; } .sidebar-nav li a { @@ -77,7 +77,7 @@ $topbar-height: 70px; text-decoration: none; color: rgba($white, 0.7); font-weight: 500; - font-size: 16px; + font-size: 15px; margin: 0rem 1rem; padding: 0.5rem 1rem; border-radius: 0.5rem; @@ -170,9 +170,40 @@ $topbar-height: 70px; .topbar-nav { display: flex; align-items: center; - justify-content: space-between; height: 100%; padding: 0 1.5rem; + justify-content: space-between; + align-items: center; +} + +.search-bar-container { + flex-grow: 1; + display: flex; + justify-content: center; +} + +.search-bar { + width: 500px; + + .form-control { + padding: 7px 0.75rem !important; + border-radius: 0.5rem 0 0 0.5rem !important; + + &::placeholder { + color: rgba($white, 0.3) !important; + } + } +} + +.search-bar-button { + border-radius: 0 0.5rem 0.5rem 0 !important; + border-color: lighten($secondary, 5%) !important; + background-color: lighten($secondary, 5%) !important; + + &:hover { + border-color: lighten($secondary, 10%) !important; + background-color: lighten($secondary, 10%) !important; + } } @media (min-width: 992px) { diff --git a/packages/fakeyou.com/src/scss/site-refresh.scss b/packages/fakeyou.com/src/scss/site-refresh.scss index 5858328eea..ac0839aba3 100644 --- a/packages/fakeyou.com/src/scss/site-refresh.scss +++ b/packages/fakeyou.com/src/scss/site-refresh.scss @@ -18,13 +18,17 @@ styles with important tags: } ::-webkit-scrollbar-track { - background-color: rgba($bg, 1) !important; + background-color: $panel !important; } ::-webkit-scrollbar { width: 10px; } + body { + overflow-y: scroll; + } + p { font-weight: 400; margin-bottom: 0;