Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the new front page #108

Open
wants to merge 5 commits into
base: new-landing-page
Choose a base branch
from

Conversation

presi300
Copy link
Contributor

@presi300 presi300 commented May 15, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new section with the catchphrase "write once, access anywhere" and export button.
    • Added a final section with a heading and call-to-action button.
    • Implemented responsive image rendering based on screen size and theme.
    • Displayed showcase images with text and a responsive layout.
    • Added components for rendering specific text content.
    • Introduced a section displaying technology icons and an open-source message.
    • Added versatile button components with customizable properties.
    • Implemented a footer section with copyright information.
    • Created components for feature boxes and a grid layout.
    • Added a theme switcher for toggling between light and dark modes.
    • Introduced a top navigation bar with dynamic appearance based on scroll position.
  • Enhancements

    • Updated the homepage layout with new components and improved styling.
    • Added new CSS classes for custom shadow effects.
    • Extended Tailwind CSS configuration with new screen sizes and color palettes.
  • Dependency Updates

    • Removed several @tiptap-pro extensions.
    • Added @tiptap/extension-code-block-lowlight, @tiptap/extension-image, and @tiptap/extension-link.

Copy link

vercel bot commented May 15, 2024

@presi300 is attempting to deploy a commit to the nayamamarshe's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented May 15, 2024

Walkthrough

The recent updates introduce new React components for the front page, enhancing the layout and functionality, including sections for catchphrases, feature showcases, and technology icons. The package.json has been updated with new @tiptap extensions, and the index.tsx file has been restructured to incorporate these new components. Additionally, new CSS classes and Tailwind configurations have been added to support the updated design and styling requirements.

Changes

File Path Change Summary
components/FrontPage/Combined/WriteOnceAccessAnywhere.jsx Added WriteOnceAccessAnywhere component for exporting notes.
components/FrontPage/Combined/finalSection.jsx Added FinalSection component with a heading and call-to-action button.
components/FrontPage/Combined/frontImage.jsx Added FrontImage component to render images based on screen size and theme.
components/FrontPage/Combined/showcaseImages.jsx Added ShowcaseImages component for displaying showcase images with text and button.
components/FrontPage/Combined/textFields.jsx Added CathPhrase1 and MainTitle components for text content.
components/FrontPage/Combined/usedTechnologies.jsx Added UsedTechnologies component to display technology icons and messages.
components/FrontPage/button.jsx Added Btn component for rendering various button styles.
components/FrontPage/customFooter.jsx Added Footer component for the webpage footer section.
components/FrontPage/featureBox.jsx Added FeatureBox and FeatureBoxGrid components for feature boxes.
components/FrontPage/textbox.jsx Added TBox component for rendering styled text variants.
components/FrontPage/themeSwitcher.jsx Added ThemeSwitcher component for toggling light and dark themes.
components/FrontPage/topbar.jsx Added TopBar component for the top navigation bar with scroll-based appearance changes.
package.json Removed @tiptap-pro extensions and added @tiptap extensions for code block, image, and link.
pages/index.tsx Restructured imports and layout; added new components for enhanced front page design.
styles/globals.css Added .customShadow and .customShadowDark CSS classes for box-shadow properties.
tailwind.config.js Added new screen sizes, color palettes, and adjusted typography settings.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

@@ -0,0 +1,54 @@
import React from "react";
import { children } from "react";
Copy link
Contributor

@coderabbitai coderabbitai bot May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unnecessary import.

The children import from "react" is unnecessary and can be removed as it is not used in the code.

- import { children } from "react";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import { children } from "react";

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, this shouldn't be here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NayamAmarshe, thank you for confirming. The unnecessary children import from "react" will be removed as suggested.

Comment on lines 7 to 54
export default function TBox({ children, variant = "p" }) {
return (
<div>
{variant === "special" && (
<h1
className={`${syne.className} text-center text-[40px] font-bold text-text-light dark:text-text-dark sm:text-[65px]`}
>
{children}
</h1>
)}
{variant === "h1" && (
<h1 className="text-[38px] font-bold text-text-light dark:text-text-dark sm:text-[52px]">
{children}
</h1>
)}
{variant === "h2" && (
<h2 className="text-[32px] font-bold text-text-light dark:text-text-dark sm:text-[42px]">
{children}
</h2>
)}
{variant === "h3" && (
<h3 className="text-[24px] font-semibold text-text-light dark:text-text-dark sm:text-[36px]">
{children}
</h3>
)}{" "}
{variant === "h4" && (
<h4 className="text-[20px] font-medium text-text-light dark:text-text-dark sm:text-[28px]">
{children}
</h4>
)}
{variant === "h5" && (
<h5 className="text-[22px] text-text-light dark:text-text-dark sm:text-[18px]">
{children}
</h5>
)}
{variant === "p" && (
<p className="text-[18px] text-text-light dark:text-text-dark">
{children}
</p>
)}
{variant === "ui" && (
<p className="font-regular text-[16px] text-text-light dark:text-text-dark">
{children}
</p>
)}
</div>
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure consistent variant naming.

The variant names should be consistent. For example, "ui" is not a standard HTML tag. Consider renaming it to something more descriptive like "paragraph" or "text".

- export default function TBox({ children, variant = "p" }) {
+ export default function TBox({ children, variant = "paragraph" }) {

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
export default function TBox({ children, variant = "p" }) {
return (
<div>
{variant === "special" && (
<h1
className={`${syne.className} text-center text-[40px] font-bold text-text-light dark:text-text-dark sm:text-[65px]`}
>
{children}
</h1>
)}
{variant === "h1" && (
<h1 className="text-[38px] font-bold text-text-light dark:text-text-dark sm:text-[52px]">
{children}
</h1>
)}
{variant === "h2" && (
<h2 className="text-[32px] font-bold text-text-light dark:text-text-dark sm:text-[42px]">
{children}
</h2>
)}
{variant === "h3" && (
<h3 className="text-[24px] font-semibold text-text-light dark:text-text-dark sm:text-[36px]">
{children}
</h3>
)}{" "}
{variant === "h4" && (
<h4 className="text-[20px] font-medium text-text-light dark:text-text-dark sm:text-[28px]">
{children}
</h4>
)}
{variant === "h5" && (
<h5 className="text-[22px] text-text-light dark:text-text-dark sm:text-[18px]">
{children}
</h5>
)}
{variant === "p" && (
<p className="text-[18px] text-text-light dark:text-text-dark">
{children}
</p>
)}
{variant === "ui" && (
<p className="font-regular text-[16px] text-text-light dark:text-text-dark">
{children}
</p>
)}
</div>
);
}
export default function TBox({ children, variant = "paragraph" }) {
return (
<div>
{variant === "special" && (
<h1
className={`${syne.className} text-center text-[40px] font-bold text-text-light dark:text-text-dark sm:text-[65px]`}
>
{children}
</h1>
)}
{variant === "h1" && (
<h1 className="text-[38px] font-bold text-text-light dark:text-text-dark sm:text-[52px]">
{children}
</h1>
)}
{variant === "h2" && (
<h2 className="text-[32px] font-bold text-text-light dark:text-text-dark sm:text-[42px]">
{children}
</h2>
)}
{variant === "h3" && (
<h3 className="text-[24px] font-semibold text-text-light dark:text-text-dark sm:text-[36px]">
{children}
</h3>
)}{" "}
{variant === "h4" && (
<h4 className="text-[20px] font-medium text-text-light dark:text-text-dark sm:text-[28px]">
{children}
</h4>
)}
{variant === "h5" && (
<h5 className="text-[22px] text-text-light dark:text-text-dark sm:text-[18px]">
{children}
</h5>
)}
{variant === "p" && (
<p className="text-[18px] text-text-light dark:text-text-dark">
{children}
</p>
)}
{variant === "ui" && (
<p className="font-regular text-[16px] text-text-light dark:text-text-dark">
{children}
</p>
)}
</div>
);
}

@@ -0,0 +1,55 @@
import React from "react";
import Image from "next/image";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimize import statement.

The Image import from "next/image" can be optimized by using named imports to reduce bundle size.

- import Image from "next/image";
+ import { Image } from "next/image";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import Image from "next/image";
import { Image } from "next/image";

Comment on lines 6 to 55
export default function ShowcaseImages() {
return (
<div className="flex w-screen justify-center">
<div className="my-32 grid max-w-[1200px] grid-rows-2 gap-24">
{/* Showcase Image 1 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row">
<div className="mt-7 flex flex-col gap-3 text-center sm:mt-7 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>

<div className="flex w-full justify-center sm:justify-end sm:pr-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
></Image>
</div>
</div>
{/* Showcase Image 2 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row-reverse">
<div className="mr-5 mt-7 flex flex-col gap-3 text-center sm:mt-0 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>

<div className="flex w-full justify-center sm:justify-start sm:pl-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
></Image>
</div>
</div>
</div>
</div>
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure unique alt text for images.

The Image components lack alt attributes, which are important for accessibility and SEO. Ensure each image has a unique and descriptive alt text.

- src={"/Images/showcaseImg1.png"}
+ src={"/Images/showcaseImg1.png"}
+ alt="Showcase image 1"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
export default function ShowcaseImages() {
return (
<div className="flex w-screen justify-center">
<div className="my-32 grid max-w-[1200px] grid-rows-2 gap-24">
{/* Showcase Image 1 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row">
<div className="mt-7 flex flex-col gap-3 text-center sm:mt-7 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>
<div className="flex w-full justify-center sm:justify-end sm:pr-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
></Image>
</div>
</div>
{/* Showcase Image 2 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row-reverse">
<div className="mr-5 mt-7 flex flex-col gap-3 text-center sm:mt-0 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>
<div className="flex w-full justify-center sm:justify-start sm:pl-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
></Image>
</div>
</div>
</div>
</div>
);
}
export default function ShowcaseImages() {
return (
<div className="flex w-screen justify-center">
<div className="my-32 grid max-w-[1200px] grid-rows-2 gap-24">
{/* Showcase Image 1 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row">
<div className="mt-7 flex flex-col gap-3 text-center sm:mt-7 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>
<div className="flex w-full justify-center sm:justify-end sm:pr-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
alt="Showcase image 1"
></Image>
</div>
</div>
{/* Showcase Image 2 */}
<div className="flex w-full flex-col-reverse items-center justify-center sm:flex-row-reverse">
<div className="mr-5 mt-7 flex flex-col gap-3 text-center sm:mt-0 sm:px-6 sm:text-start">
{" "}
<TBox variant="h3">Easy to use, easy to write</TBox>
<TBox variant="p">
With writedown it becomes easier to jot down your thoughts quickly
and in an efficient manner.
</TBox>
<Btn variant="page">Try it out!</Btn>
</div>
<div className="flex w-full justify-center sm:justify-start sm:pl-6">
<Image
width={630}
height={630}
className="customShadow dark:customShadowDark w-[90vw] max-w-[630px] rounded-[33px] sm:w-[50vw] xl:max-w-[550px]"
src={"/Images/showcaseImg1.png"}
alt="Showcase image 1"
></Image>
</div>
</div>
</div>
</div>
);
}

Comment on lines +1 to +4
// import HeroSection from "@/components/home/HeroSection";
// import Features from "@/components/home/Features";
// import Navbar from "@/components/home/Navbar";
// import Footer from "@/components/home/Footer";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out imports.

Remove the commented-out import statements to keep the code clean and maintainable.

- // import HeroSection from "@/components/home/HeroSection";
- // import Features from "@/components/home/Features";
- // import Navbar from "@/components/home/Navbar";
- // import Footer from "@/components/home/Footer";

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
// import HeroSection from "@/components/home/HeroSection";
// import Features from "@/components/home/Features";
// import Navbar from "@/components/home/Navbar";
// import Footer from "@/components/home/Footer";

window.removeEventListener("scroll", handleScroll);
};
}, []);
//TODO: figure out a better way to scale the topbar, currently it just hides the middle section
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address TODO comment.

There is a TODO comment regarding scaling the topbar. Do you need assistance in figuring out a better way to scale the topbar? I can help with that.

- //TODO: figure out a better way to scale the topbar, currently it just hides the middle section

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
//TODO: figure out a better way to scale the topbar, currently it just hides the middle section

tailwind.config.js Outdated Show resolved Hide resolved
tailwind.config.js Outdated Show resolved Hide resolved
components/FrontPage/featureBox.jsx Outdated Show resolved Hide resolved
@NayamAmarshe NayamAmarshe changed the base branch from main to new-landing-page May 15, 2024 08:31
Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 15, 2024
Repository owner deleted a comment from coderabbitai bot May 16, 2024
Copy link
Owner

@NayamAmarshe NayamAmarshe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off to a great start! Several improvements can be made but thankfully the structure is all good and all there.

components/FrontPage/button.jsx Outdated Show resolved Hide resolved
return (
<div className="flex h-[400px] w-screen justify-center bg-slate-200 dark:bg-slate-800">
<div className="flex h-full max-w-[1200px] flex-col items-center justify-center gap-3">
<TBox variant="h2">Still not convinced?</TBox>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to not have this bold. Medium should be fine.

components/FrontPage/Combined/finalSection.jsx Outdated Show resolved Hide resolved
components/FrontPage/Combined/finalSection.jsx Outdated Show resolved Hide resolved

export default function WriteOnceAccessAnywhere() {
return (
<div className="flex h-[700px] w-screen justify-center bg-slate-200 dark:bg-slate-800">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of absolute height, prefer using padding instead. Use the tailwind presets for padding, and every section must use the x and y padding consistently.

components/FrontPage/topbar.jsx Show resolved Hide resolved
Comment on lines 24 to 25
<nav
className="fixed left-1 right-1 top-1 z-30 grid h-[63px] grid-cols-2 rounded-full border-midnight-400 bg-chalk-50 px-[20px] transition-all dark:border-dusk-50 dark:bg-midnight-300 sm:grid-cols-3"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The design for this is a bit off. Please refer to the previous version's navbar for design. The padding must be correct

Comment on lines 64 to 69
<div className="flex h-full w-full items-center justify-end gap-3 ">
<ThemeSwitcher></ThemeSwitcher>
<div className="mxs:hidden">
<Btn variant="ui">Write now!</Btn>
</div>
</div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button design is inconsistent with the rest of the buttons on the same page. Prefer using buttons from the previous version.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consult with me for the button designs that use a solid background :)

<MainTitle></MainTitle>
<Btn variant="page">Write now!</Btn>
</div>
<FrontImage></FrontImage>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty tags must be written properly.

Suggested change
<FrontImage></FrontImage>
<FrontImage />

<HeroSection />
<Features />
<Footer />
<TopBar></TopBar>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty tags must be written properly.

Suggested change
<TopBar></TopBar>
<TopBar />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants