From 2108ff0c8e95c537d03dad0c9859aec4cbc16ee7 Mon Sep 17 00:00:00 2001 From: Arnab Chakraborty <11457760+Rocky43007@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:51:27 -0400 Subject: [PATCH] New Navbar & Banner --- .../src/app/{NewBanner.tsx => Banner.tsx} | 10 +- apps/landing/src/app/Downloads/Platform.tsx | 2 +- apps/landing/src/app/NavBar/index.tsx | 132 ++++++++++++------ apps/landing/src/app/blog/[slug]/page.tsx | 2 +- apps/landing/src/app/blog/page.tsx | 2 +- apps/landing/src/app/docs/Markdown.tsx | 2 +- apps/landing/src/app/layout.tsx | 10 +- apps/landing/src/app/page.tsx | 15 +- apps/landing/src/app/roadmap/page.tsx | 2 +- apps/landing/src/components/Markdown.tsx | 2 +- packages/ui/style/tailwind.js | 2 +- 11 files changed, 113 insertions(+), 68 deletions(-) rename apps/landing/src/app/{NewBanner.tsx => Banner.tsx} (61%) diff --git a/apps/landing/src/app/NewBanner.tsx b/apps/landing/src/app/Banner.tsx similarity index 61% rename from apps/landing/src/app/NewBanner.tsx rename to apps/landing/src/app/Banner.tsx index 7c120234d..99f4b4d9b 100644 --- a/apps/landing/src/app/NewBanner.tsx +++ b/apps/landing/src/app/Banner.tsx @@ -1,15 +1,15 @@ -import { Newspaper } from '@phosphor-icons/react/dist/ssr'; +import { Star } from '@phosphor-icons/react/dist/ssr'; import clsx from 'clsx'; import Link from 'next/link'; -export interface NewBannerProps { +export interface BannerProps { headline: string; href?: string; link?: string; className?: string; } -export function NewBanner(props: NewBannerProps) { +export function Banner(props: BannerProps) { const { headline, href, link } = props; return ( @@ -17,11 +17,11 @@ export function NewBanner(props: NewBannerProps) { href={href ?? '/'} className={clsx( props.className, - 'news-banner-border-gradient news-banner-glow animation-delay-1 fade-in-whats-new z-10 mb-5 flex w-fit flex-row rounded-full bg-black/10 px-5 py-2.5 text-xs backdrop-blur-md transition hover:bg-purple-900/20 sm:w-auto sm:text-base' + 'animation-delay-1 fade-in-whats-new z-10 mb-5 flex w-fit flex-row rounded-full border-[1.5px] border-yellow-700 bg-yellow-600 px-5 py-2.5 text-xs backdrop-blur-md transition sm:w-auto sm:text-base' )} >
- +

{headline}

{link && ( diff --git a/apps/landing/src/app/Downloads/Platform.tsx b/apps/landing/src/app/Downloads/Platform.tsx index 69d7473e2..be65681e8 100644 --- a/apps/landing/src/app/Downloads/Platform.tsx +++ b/apps/landing/src/app/Downloads/Platform.tsx @@ -8,7 +8,7 @@ import { Tooltip } from '@sd/ui'; export type Platform = { name: string; os?: string; - icon: Icon | FunctionComponent; + icon: React.ElementType | Icon; version?: string; links?: Array<{ name: string; arch: string }>; disabled?: boolean; diff --git a/apps/landing/src/app/NavBar/index.tsx b/apps/landing/src/app/NavBar/index.tsx index 7b91946ed..2fde75116 100644 --- a/apps/landing/src/app/NavBar/index.tsx +++ b/apps/landing/src/app/NavBar/index.tsx @@ -1,3 +1,4 @@ +import { Cloud } from '@phosphor-icons/react/dist/ssr'; import { Discord, Github } from '@sd/assets/svgs/brands'; import Image from 'next/image'; import Link from 'next/link'; @@ -9,54 +10,87 @@ import { MobileDropdown } from './MobileDropdown'; export function NavBar() { return ( -
-
- - Spacedrive logo -

Spacedrive

- + //
+ //
+ // + // Spacedrive logo + //

Spacedrive

+ // -
- Roadmap - Team - {/* Pricing */} - Blog - Docs -
- Careers - {positions.length > 0 ? ( - - {` ${positions.length} `} - - ) : null} + //
+ // Roadmap + // Team + // {/* Pricing */} + // Blog + // Docs + //
+ // Careers + // {positions.length > 0 ? ( + // + // {` ${positions.length} `} + // + // ) : null} + //
+ //
+ //
+ // + //
+ // + // + // + // + // + // + //
+ //
+ //
+ //
+ //
+ //
+ //
+ ); } @@ -65,10 +99,18 @@ function NavLink(props: PropsWithChildren<{ link?: string }>) { {props.children} ); } + +function NewIcon() { + return ( +
+ NEW +
+ ); +} diff --git a/apps/landing/src/app/blog/[slug]/page.tsx b/apps/landing/src/app/blog/[slug]/page.tsx index e22b8a3e4..d7fa954b4 100644 --- a/apps/landing/src/app/blog/[slug]/page.tsx +++ b/apps/landing/src/app/blog/[slug]/page.tsx @@ -43,7 +43,7 @@ export default function Page({ params }: Props) { const MDXContent = useMDXComponent(post.body.code); return ( -
+
<>
+

Blog

Get the latest from Spacedrive.

diff --git a/apps/landing/src/app/docs/Markdown.tsx b/apps/landing/src/app/docs/Markdown.tsx index 148637e3a..304438a6f 100644 --- a/apps/landing/src/app/docs/Markdown.tsx +++ b/apps/landing/src/app/docs/Markdown.tsx @@ -12,7 +12,7 @@ export function Markdown(props: PropsWithChildren) {
diff --git a/apps/landing/src/app/layout.tsx b/apps/landing/src/app/layout.tsx index cd427dc10..08dff7058 100644 --- a/apps/landing/src/app/layout.tsx +++ b/apps/landing/src/app/layout.tsx @@ -26,12 +26,12 @@ export const metadata: Metadata = { }; export const viewport: Viewport = { - themeColor: { color: '#E751ED', media: 'not screen' } + themeColor: { color: '#0E0E12', media: 'not screen' } }; export default function Layout({ children }: PropsWithChildren) { return ( - + -
+
-
- {children} -
+
{children}
diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx index c98385bcc..a270e565e 100644 --- a/apps/landing/src/app/page.tsx +++ b/apps/landing/src/app/page.tsx @@ -5,8 +5,8 @@ import { toTitleCase } from '~/utils/util'; import { getLatestRelease, getReleaseFrontmatter, githubFetch } from './api/github'; import { Background } from './Background'; +import { Banner } from './Banner'; import { Downloads } from './Downloads'; -import { NewBanner } from './NewBanner'; export const metadata = { title: 'Spacedrive — A file manager from the future.', @@ -27,22 +27,27 @@ export default async function Page() { return ( <> - - */} + {/* l + /> */}