From 5e0dd5c63b39b0ff235aa86e92656634f60a1b9d Mon Sep 17 00:00:00 2001 From: Varun Dhand Date: Tue, 31 Oct 2023 18:56:18 +0530 Subject: [PATCH] feat: mobile responsive hero page --- frontend/src/Hero.tsx | 178 +++++++++++++++++++++++++++++++++--------- 1 file changed, 139 insertions(+), 39 deletions(-) diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index b62823aa..406e48f8 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -1,34 +1,81 @@ +import { useMediaQuery } from './hooks'; import DocsGPT3 from './assets/cute_docsgpt3.svg'; export default function Hero({ className = '' }: { className?: string }) { + // const isMobile = window.innerWidth <= 768; + const { isMobile } = useMediaQuery(); return ( -
-
+
+

DocsGPT

DocsGPT
-

- Welcome to DocsGPT, your technical documentation assistant! -

-

- Enter a query related to the information in the documentation you - selected to receive -
and we will provide you with the most relevant answers. -

-

- Start by entering your query in the input field below and we will do the - rest! -

-
-
-
- lock -

Chat with Your Data

-

+ {isMobile ? ( +

+ Welcome to DocsGPT, your technical + documentation assistant! Start by entering your query in the input + field below, and we'll provide you with the most relevant + answers. +

+ ) : ( + <> +

+ Welcome to DocsGPT, your technical documentation assistant! +

+

+ Enter a query related to the information in the documentation you + selected to receive +
and we will provide you with the most relevant answers. +

+

+ Start by entering your query in the input field below and we will do + the rest! +

+ + )} +
+ {/* first */} +
+
+ {/* Add Mobile check here */} + {isMobile ? ( +
+ lock +

+ Chat with Your Data +

+
+ ) : ( + <> + lock +

+ Chat with Your Data +

+ + )} +

DocsGPT will use your data to answer questions. Whether its documentation, source code, or Microsoft files, DocsGPT allows you to have interactive conversations and find answers based on the @@ -36,12 +83,36 @@ export default function Hero({ className = '' }: { className?: string }) {

- -
-
- lock -

Secure Data Storage

-

+ {/* second */} +

+
+ {/* Add Mobile check here */} + {isMobile ? ( +
+ lock +

+ Secure Data Storage +

+
+ ) : ( + <> + lock +

+ Secure Data Storage +

+ + )} +

The security of your data is our top priority. DocsGPT ensures the utmost protection for your sensitive information. With secure data storage and privacy measures in place, you can trust that your @@ -49,15 +120,44 @@ export default function Hero({ className = '' }: { className?: string }) {

-
-
- lock -

Open Source Code

-

+ {/* third */} +

+
+ {/* Add Mobile check here */} + {isMobile ? ( +
+ lock +

+ Open Source Code +

+
+ ) : ( + <> + lock +

+ Open Source Code +

+ + )} +

DocsGPT is built on open source principles, promoting transparency and collaboration. The source code is freely available, enabling developers to contribute, enhance, and customize the app to meet