This repository contains the front-end code for the Inventors website. The project is built using Next.js 14, TypeScript, and Tailwind CSS.
Please always remember to pull the latest changes with
git pull
and make sure you always work on a new branch for each issue you are working on!
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/InventorsDev/inventors-frontend.git
-
Navigate to the project directory:
cd inventors-frontend
-
Install the dependencies:
npm i
-
Start the development server:
npm run dev
This will start the Next.js development server on http://localhost:3000.
We welcome contributions to the project. To get started, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/my-new-feature
- Make your changes and commit them:
git commit -am 'Add some feature'
- Push to the branch:
git push origin feature/my-new-feature
- Create a pull request to the
main
branch of the original repository. Make sure to attach the issue number and tick all the boxes in the issue.
- If you need to use any icon in this project, we have installed the
react-icons
package, which provides a wide range of icons. You can find the list of icons here.
All you have to do is import the icon you need and use it in your component. For example:
import { FaGithub } from 'react-icons/fa';
const MyComponent = () => {
return (
<div>
<FaGithub />
</div>
);
};
- We are using Tailwind CSS for styling. You can find the documentation here.
- We are using TypeScript for type-checking. You can find the documentation here.
- We have implemented the Dark Mode feature in the project. You can find the implementation in the
providers.tsx
file. You can use theuseTheme
hook to access the theme object and thetoggleTheme
function to toggle the theme. A little scaffold is provided in thecomponents/lp-sections/ThemeSwitch.tsx
file. You can implement it in that component and import into the footer component.
The Button
component is a customizable button element designed for use throughout the project. Below is a detailed explanation of how to utilize this component in your sections.
To use the Button
component in your section, first import it along with any necessary icons or links:
import Button from '../components/Button';
The Button
component accepts the following props:
- text (optional): The text to be displayed on the button. Default is 'Get Started'.
- greenTransparent (optional): A boolean indicating if the button should have a transparent background with a green border and green text. Default is false.
- whiteTransparent (optional): A boolean indicating if the button should have a transparent background with a white border and white text. Default is false.
- transparent (optional): A boolean indicating if the button should have a fully transparent background with a border. Default is false.
- href (required): The URL the button should link to.
To use the Button
component in your section, simply include it in your JSX code:
<Button text="Get Started" greenTransparent={false} whiteTransparent={false} transparent={false} href="/get-started" />
<Button text="Learn More" greenTransparent={true} href="/learn-more" />
<Button text="Contact Us" whiteTransparent={true} href="/contact" />
- Default Button: Green background with white text.
- Green Transparent Button: Transparent background with green border and green text.
- White Transparent Button: Transparent background with white border and white text.
Use these variations to fit the styling needs of different sections of your project.