Skip to content

Commit

Permalink
initialised next app and added homepage (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshPlays authored Oct 28, 2024
1 parent fbeebdd commit 62c7fbf
Show file tree
Hide file tree
Showing 39 changed files with 7,959 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scruter-nextjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
40 changes: 40 additions & 0 deletions scruter-nextjs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# env files (can opt-in for commiting if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions scruter-nextjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
15 changes: 15 additions & 0 deletions scruter-nextjs/app/(routes)/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import HeroCards from "@/components/heroCards";
import { HeroCarousal } from "@/components/heroCarousal";
import PageContainer from "@/components/ui/pageContainer";
import { Container } from "postcss";

const HomePage = () => {
return (
<PageContainer>
<HeroCarousal/>
<HeroCards/>
</PageContainer>
);
}

export default HomePage;
Binary file added scruter-nextjs/app/favicon.ico
Binary file not shown.
Binary file added scruter-nextjs/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file added scruter-nextjs/app/fonts/GeistVF.woff
Binary file not shown.
74 changes: 74 additions & 0 deletions scruter-nextjs/app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

html,
body,
:root{
height: 100%;
}

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--chart-1: 12 76% 61%;
--chart-2: 173 58% 39%;
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
39 changes: 39 additions & 0 deletions scruter-nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { Metadata } from 'next';
import localFont from 'next/font/local';
import './globals.css';
import Navbar from '@/components/NavBars&Footers/navbar';
import Footer from '@/components/NavBars&Footers/footer';

const geistSans = localFont({
src: './fonts/GeistVF.woff',
variable: '--font-geist-sans',
weight: '100 900',
});
const geistMono = localFont({
src: './fonts/GeistMonoVF.woff',
variable: '--font-geist-mono',
weight: '100 900',
});

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<Navbar />
{children}
<Footer />
</body>
</html>
);
}
20 changes: 20 additions & 0 deletions scruter-nextjs/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
}
}
160 changes: 160 additions & 0 deletions scruter-nextjs/components/NavBars&Footers/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
"use client";

import { ChevronRight, Copyright, Facebook, Heart, Instagram, Mail, MapPin, Phone, Twitter } from "lucide-react";
import Image from "next/image";
import Link from "next/link";
import { useState } from "react";
import { Input } from "../ui/input";
import { Button } from "../ui/button";

const Links = [
{
name: "About us",
id: 1,
href: "/About",
},
{
name: "Our Teams",
id: 2,
href: "/Teams",
},
{
name: "Terms of service",
id: 3,
href: "/Terms",
},
{
name: "Our Contributors",
id: 4,
href: "/contributors",
},
{
name: "Privacy and Policy",
id: 5,
href: "/Policy",
},
];
const Helpdesk = [
{
name: "HelpCenter",
id: 1,
href: "/HelpCenter",
},
{
name: "FAQ",
id: 2,
href: "/FAQ",
},
{
name: "ContactUs",
id: 3,
href: "/ContactUs",
},
{
name: "Support",
id: 4,
href: "/Support",
}
];

const Footer = () => {
const [id, setId] = useState(0);

return (
<div className="flex items-center flex-col p-5 bg-customBlue dark:bg-DarkGray">
<div className="border-y border-customTeal dark:border-Green flex items-start justify-start flex-col lg:grid lg:grid-cols-4 py-2 gap-4">
{/* section1 */}
<div className="flex gap-4 items-start justify-between lg:px-4 pb-4 flex-col">
<div className="flex justify-center items-center">

<Link href="/" className="ml-4 lg:ml:0 gap-x-2">
<p className="font-bold text-5xl dark:text-Green font-nunito">
About Scruter
</p>
</Link>
</div>
<div className=" ">
Scruter is your local platform for buying, selling, and discovering everything you need. Whether it's products, services, or community activities, we connect people for a better local experience.
</div>
</div>
{/* section 2 */}
<div className="flex flex-col w-full items-start py-4 lg:ml-10 lg:p-4 gap-5">
<p className="font-bold text-3xl text-customTeal dark:text-Green font-handlee">
Quick Links
</p>
<div className=" flex flex-col gap-2">
{Links.map((link) => (
<Link
key={link.id}
href={link.href}
onMouseOver={() => {
setId(link.id);
}}
onMouseLeave={() => {
setId(0);
}}
className="flex items-center gap-2"
>
<ChevronRight className="h-4 w-4" />
<div className={id === link.id ? "underline" : ""}>
{link.name}
</div>
</Link>
))}
</div>
</div>

{/* section 3 */}
<div className="flex flex-col w-full items-start py-4 lg:ml-10 lg:p-4 gap-5">
<p className="font-bold text-3xl text-customTeal dark:text-Green font-handlee">
Helpdesk
</p>
<div className=" flex flex-col gap-2">
{Helpdesk.map((link) => (
<Link
key={link.id}
href={link.href}
onMouseOver={() => {
setId(link.id);
}}
onMouseLeave={() => {
setId(0);
}}
className="flex items-center gap-2"
>
<ChevronRight className="h-4 w-4" />
<div className={id === link.id ? "underline" : ""}>
{link.name}
</div>
</Link>
))}
</div>
</div>
{/* section 4 */}
<div className="flex flex-col w-full lg:w-10/12 items-start py-4 lg:ml-10 lg:p-4 gap-5">
<p className="font-bold text-3xl text-customTeal dark:text-Green font-handlee">
Follow Us
</p>
<div className="flex gap-2 items-center justify-center">
<div className="rounded-full bg-gray-200 flex items-center justify-center h-10 w-10">
<Facebook/>
</div>
<div className="rounded-full bg-gray-200 flex items-center justify-center h-10 w-10">
<Twitter/>
</div>
<div className="rounded-full bg-gray-200 flex items-center justify-center h-10 w-10">
<Instagram/>
</div>
</div>
</div>
</div>
<div className="flex flex-col lg:flex-row pt-5 items-center justify-center">
<div className="flex items-center justify-center">
Made with <Heart fill="red" className="mx-2"/> by Team Scruter
</div>
</div>
</div>
);
};

export default Footer;
Loading

0 comments on commit 62c7fbf

Please sign in to comment.