Skip to content

Commit

Permalink
new ui chnages
Browse files Browse the repository at this point in the history
KamalSinghKhanna committed Apr 9, 2023
1 parent 0815e80 commit e784240
Showing 28 changed files with 874 additions and 447 deletions.
13 changes: 11 additions & 2 deletions api/post.js
Original file line number Diff line number Diff line change
@@ -198,13 +198,18 @@ router.post("/idea/:postId", authMiddleware, async (req, res) => {
if (!post) {
return res.status(404).send("No Post found");
}
<<<<<<< HEAD
const user= await UserModel.findById(userId)
=======

>>>>>>> 9e2c5b8 (new ui changes)


const isBid = post.idea.some(bid => bid.user.toString() === userId);
if (isBid) {
return res.status(401).send(" already there ");
}
const user= await UserModel.findById(userId)

post.idea.unshift({ user: userId,youridea:youridea,contact:contact,price:price,name:user.name});

@@ -339,9 +344,9 @@ router.delete("/ideadelete/:postId", authMiddleware, async (req, res) => {
const post = await BidModel.findById(postId);
if (!post) return res.status(404).send("Post not found");

const index = post.idea.findIndex(bid =>bid.user === userId);
const index = post.idea.findIndex(bid =>bid.user.toString() === userId);
if (index === -1) {
return res.status(404).send("No bid found");
return res.status(404).send("No idea found");
}
const bid = post.idea[index];

@@ -357,7 +362,11 @@ router.delete("/ideadelete/:postId", authMiddleware, async (req, res) => {

const mybidindex = user.myidea.findIndex(bid =>bid.postId.toString() === postId);
if (index === -1) {
<<<<<<< HEAD
return res.status(404).send("No bid found");
=======
return res.status(404).send("No myidea found");
>>>>>>> 9e2c5b8 (new ui changes)
}
user.myidea.splice(mybidindex,1)
await user.save();
13 changes: 8 additions & 5 deletions components/Bidslist.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import {deletePost2 } from "../utils/postActions";
import {deletePost2,deletePost } from "../utils/postActions";
function Bidslist({bid,idea,setMybids,setMyidea}) {
const [bids, setBids] = useState(bid ||idea||[]);
let bidtrue=true
@@ -50,11 +50,14 @@ function Bidslist({bid,idea,setMybids,setMyidea}) {
</td>


<td className="w-2/4 text-xl p-2 text-center font-serif text-red-600">
<button onClick={() =>deletePost2(bids.postId,setMybids)}>delete</button>
{idea&&<td className="w-2/4 text-xl p-2 text-center font-serif text-red-600">
<button onClick={() =>deletePost2(bids.postId,setMyidea)}>delete</button>

</td>

</td>}
{bid&&<td className="w-2/4 text-xl p-2 text-center font-serif text-red-600">
<button onClick={() =>deletePost(bids.postId,setMybids)}>delete</button>

</td>}
</tr>
))}

2 changes: 1 addition & 1 deletion components/Card.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ function Card({post}) {
<div className=' w-full overflow-hidden text-slate-200 text-base font-semibold break-all break-words'>{post.tech.toLowerCase()}</div>
</div>
</div>
<div className="text-white bg-gradient-to-r mx-10 from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center ">
<div className="text-white bg-gradient-to-r mr-5 from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center ">
<button type="button">Live Preview</button>
</div>

68 changes: 68 additions & 0 deletions components/Features.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import React from 'react'

export default function Features() {
return (
<div className="container flex flex-wrap p-8 xl:px-0 lg:gap-10 lg:flex-nowrap" style={{width: "100%"}}>
<div className="flex items-center justify-center relative w-full lg:w-1/2 hover:" style={{width: "500px", height: "500px"}}>
<div>
<img
alt="Benefits" src="https://web3templates.com/img/assets/feature-illustration.png" loading="lazy" />
</div>
</div>
<div className="flex flex-wrap items-center w-full lg:w-1/2">
<div>
<div className="flex flex-col w-full mt-4">
<h3 className="max-w-2xl mt-3 text-3xl font-bold leading-snug tracking-tight text-white lg:leading-tight lg:text-4xl dark:text-white">Highlight your benefits</h3>
<p className="max-w-2xl py-4 text-lg leading-normal text-gray-300 lg:text-xl xl:text-xl dark:text-gray-300">Our project bidding platform offers a range of benefits to help streamline your project management process, including:</p>
</div>
<div className="w-full mt-5">
<div className="flex items-start mt-8 space-x-3">
<div className="flex items-center justify-center flex-shrink-0 mt-1 bg-indigo-500 rounded-md w-11 h-11">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" className="w-7 h-7 text-indigo-50">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
<div>
<h4 className="text-xl font-medium text-white dark:text-gray-200">Seamless user experience</h4>
<p className="mt-1 text-gray-300 dark:text-gray-400">Then explain the first point breifly in one or two lines.</p>
</div>
</div>
<div className="flex items-start mt-8 space-x-3">
<div className="flex items-center justify-center flex-shrink-0 mt-1 bg-indigo-500 rounded-md w-11 h-11">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" className="w-7 h-7 text-indigo-50">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path>
</svg>
</div>
<div>
<h4 className="text-xl font-medium text-white dark:text-gray-200">Quality source code</h4>
<p className="mt-1 text-gray-300 dark:text-gray-400">Here you can add the next benefit point.</p>
</div>
</div>
<div className="flex items-start mt-8 space-x-3">
<div className="flex items-center justify-center flex-shrink-0 mt-1 bg-indigo-500 rounded-md w-11 h-11">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" className="w-7 h-7 text-indigo-50">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"></path>
</svg>
</div>
<div>
<h4 className="text-xl font-medium text-white dark:text-gray-200">High performance</h4>
<p className="mt-1 text-gray-300 dark:text-gray-400">This will be your last bullet point in this section.</p>
</div>
</div>
<div className="flex items-start mt-8 space-x-3">
<div className="flex items-center justify-center flex-shrink-0 mt-1 bg-indigo-500 rounded-md w-11 h-11">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" className="w-7 h-7 text-indigo-50">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"></path>
</svg>
</div>
<div>
<h4 className="text-xl font-medium text-white dark:text-gray-200">Affordable rates</h4>
<p className="mt-1 text-gray-300 dark:text-gray-400">This will be your last bullet point in this section.</p>
</div>
</div>
</div>
</div>
</div>
</div>
)
}
82 changes: 82 additions & 0 deletions components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import React from 'react'

export default function Footer() {
return (

<footer className="">
<div className="mx-auto w-full max-w-screen-xl p-4 py-6 lg:py-8">
<div className="md:flex md:justify-between">
<div className="mb-6 md:mb-0">
<a href="#" className="flex items-center">
<img src="/logo.png" className="h-16" alt="ProjectBidder Logo" />
<span className="self-center pt-3 text-2xl font-semibold whitespace-nowrap text-white">Project Bidder</span>
</a>
</div>
<div className="grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3">
<div>
<h2 className="mb-6 text-sm font-semibold text-gray-900 uppercase text-white">Resources</h2>
<ul className="text-gray-600 text-gray-400 font-medium">
<li className="mb-4">
<a href="#" className="hover:underline">Project Bidder</a>
</li>
<li>
<a href="#" className="hover:underline">Resources</a>
</li>
</ul>
</div>
<div>
<h2 className="mb-6 text-sm font-semibold text-gray-900 uppercase text-white">Follow us</h2>
<ul className="text-gray-600 text-gray-400 font-medium">
<li className="mb-4">
<a href="https://github.com/themesberg/flowbite" className="hover:underline ">Github</a>
</li>
<li>
<a href="https://discord.gg/4eeurUVvTy" className="hover:underline">Discord</a>
</li>
</ul>
</div>
<div>
<h2 className="mb-6 text-sm font-semibold text-gray-900 uppercase text-white">Legal</h2>
<ul className="text-gray-600 text-gray-400 font-medium">
<li className="mb-4">
<a href="#" className="hover:underline">Privacy Policy</a>
</li>
<li>
<a href="#" className="hover:underline">Terms &amp; Conditions</a>
</li>
</ul>
</div>
</div>
</div>
<hr className="my-6 border-gray-200 sm:mx-auto border-gray-700 lg:my-8" />
<div className="sm:flex sm:items-center sm:justify-between">
<span className="text-sm text-gray-500 sm:text-center text-gray-400">© 2023 <a href="https://flowbite.com/" className="hover:underline">Project Bidder™</a>. All Rights Reserved.
</span>
<div className="flex mt-4 space-x-6 sm:justify-center sm:mt-0">
<a href="#" className="text-gray-500 hover:text-gray-900 hover:text-white">
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z" clip-rule="evenodd" /></svg>
<span className="sr-only">Facebook page</span>
</a>
<a href="#" className="text-gray-500 hover:text-gray-900 hover:text-white">
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clip-rule="evenodd" /></svg>
<span className="sr-only">Instagram page</span>
</a>
<a href="#" className="text-gray-500 hover:text-gray-900 hover:text-white">
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /></svg>
<span className="sr-only">Twitter page</span>
</a>
<a href="#" className="text-gray-500 hover:text-gray-900 hover:text-white">
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /></svg>
<span className="sr-only">GitHub account</span>
</a>
<a href="#" className="text-gray-500 hover:text-gray-900 hover:text-white">
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"><path fill-rule="evenodd" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c5.51 0 10-4.48 10-10S17.51 2 12 2zm6.605 4.61a8.502 8.502 0 011.93 5.314c-.281-.054-3.101-.629-5.943-.271-.065-.141-.12-.293-.184-.445a25.416 25.416 0 00-.564-1.236c3.145-1.28 4.577-3.124 4.761-3.362zM12 3.475c2.17 0 4.154.813 5.662 2.148-.152.216-1.443 1.941-4.48 3.08-1.399-2.57-2.95-4.675-3.189-5A8.687 8.687 0 0112 3.475zm-3.633.803a53.896 53.896 0 013.167 4.935c-3.992 1.063-7.517 1.04-7.896 1.04a8.581 8.581 0 014.729-5.975zM3.453 12.01v-.26c.37.01 4.512.065 8.775-1.215.25.477.477.965.694 1.453-.109.033-.228.065-.336.098-4.404 1.42-6.747 5.303-6.942 5.629a8.522 8.522 0 01-2.19-5.705zM12 20.547a8.482 8.482 0 01-5.239-1.8c.152-.315 1.888-3.656 6.703-5.337.022-.01.033-.01.054-.022a35.318 35.318 0 011.823 6.475 8.4 8.4 0 01-3.341.684zm4.761-1.465c-.086-.52-.542-3.015-1.659-6.084 2.679-.423 5.022.271 5.314.369a8.468 8.468 0 01-3.655 5.715z" clip-rule="evenodd" /></svg>
<span className="sr-only">Dribbble account</span>
</a>
</div>
</div>
</div>
</footer>

)
}
2 changes: 1 addition & 1 deletion components/FullScreenModel.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ export default function Modal({idea}) {
return (
<>
<button
className="bg-pink-500 text-white active:bg-pink-600 font-bold uppercase text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
className="bg-slate-500/70 text-white hover:bg-slate-600/90 font-bold uppercase text-sm px-6 py-3 rounded shadow hover:shadow-lg outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
type="button"
onClick={() => setShowModal(true)}
>
9 changes: 6 additions & 3 deletions components/Home.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import Link from 'next/link'
import React from 'react'
import React, {useState, useEffect} from 'react'

function Home() {
return (
<div id="section1" className="home">
<div className="row">
<div className="column1">
{/* <div className="sm:hidden w-full">
<img src="/logo.png" className="h-16" alt="ProjectBidder Logo" />
</div> */}
<h1>Find your Dream Project</h1>
<p>explore for best responsive web project to grow your business!</p>
<Link href="/project"> <button>Explore</button></Link>
</div>
<div className="column2">
{/* <div className="column2">
<img src="https://www.hmablogs.com/wp-content/uploads/2022/06/banner-img.png" alt="banner" width="500px" />
</div>
</div> */}
</div>
</div>
)
36 changes: 36 additions & 0 deletions components/Modal2.js
Original file line number Diff line number Diff line change
@@ -49,13 +49,23 @@ setMedia(null);
{showModal ? (
<>
<div
<<<<<<< HEAD
className="justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none"
>
<div className="relative h-screen my-6 mx-auto w-full">

<div className="border-0 rounded-lg shadow-lg relative flex flex-col w-full h-full bg-white outline-none focus:outline-none">

<form onSubmit={handleSubmit}>
=======
className="justify-center items-center flex overflow-x-hidden h-screen overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none"
>
<div className="relative h-screen my-6 mx-auto w-full">

<div className="border-0 rounded-lg shadow-lg relative flex flex-col gap-60 w-full h-full bg-white outline-none focus:outline-none">

<form onSubmit={handleSubmit} className="flex items-center gap-10">
>>>>>>> 9e2c5b8 (new ui changes)
{media === null && mediaPreview === null ? (
<>
<input
@@ -66,12 +76,21 @@ setMedia(null);
type="file"
/>
<div
<<<<<<< HEAD
className="flex flex-col p-5 "
onClick={() => inputRef.current.click()}
>
<h1 className="text-9xl" >
+</h1>
<h1 className="font-semibold text-lg">Image</h1>
=======
className="flex flex-col items-center p-5 "
onClick={() => inputRef.current.click()}
>
<h1 className="text-6xl text-gray-800" >
+</h1>
<h1 className="font-semibold text-gray-800 text-lg">Image</h1>
>>>>>>> 9e2c5b8 (new ui changes)
</div>
</>
) : media != null && mediaPreview ? (
@@ -86,19 +105,36 @@ setMedia(null);
<h1 className="font-semibold text-lg">Image</h1>
</div>
) : null}
<<<<<<< HEAD
<textarea
=======
<div className="w-60 h-20 border-red-100">
<textarea
className="h-full w-full"
>>>>>>> 9e2c5b8 (new ui changes)
placeholder="Add discription"
name="discription"
value={info}
onChange={(e)=>setinfo(e.target.value)}/>
<<<<<<< HEAD

<button>Update</button>
=======
</div>

<button className="text-white bg-green-500 rounded font-bold uppercase px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
type="button">Update</button>
>>>>>>> 9e2c5b8 (new ui changes)

</form>

<div className="flex items-center justify-end p-6 border-t border-solid border-slate-200 rounded-b">
<button
<<<<<<< HEAD
className="text-red-500 background-transparent font-bold uppercase px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
=======
className="text-white bg-red-500 rounded font-bold uppercase px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
>>>>>>> 9e2c5b8 (new ui changes)
type="button"
onClick={() => setShowModal(false)}
>
57 changes: 56 additions & 1 deletion components/Navbar.js
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ console.log(user)
return (

<div
className={`fixed top-0 z-50 backdrop-blur-lg flex justify-between bg-gradient-radial from-transparent ${hidden} w-full h-14 items-center `}
className={`fixed top-0 z-50 hidden sm:flex backdrop-blur-lg justify-between bg-gradient-radial from-transparent ${hidden} w-full h-14 items-center `}
>
<div
className={`px-4 font-medium text-white transition ease-in delay-100 ${hidden}`}
@@ -147,16 +147,71 @@ console.log(user)
}}
/>: <button
onClick={() => logoutUser(user.email)}
<<<<<<< HEAD
className=" font-bold "
>
Logout
=======
className=" font-bold mt-1"
>
<img src="/logoutL.svg" alt="logout" />
>>>>>>> 9e2c5b8 (new ui changes)
</button>}
</div>


</div>
</div>
<<<<<<< HEAD

=======
<div className={` sm:hidden fixed bottom-0 backdrop-blur flex z-50 justify-between bg-black/20 from-transparent w-full h-14 items-center `}>
<div
className={`text-white relative w-full flex items-center h-14 cursor-pointer justify-around`}
>
{/* <img className={`absolute -z-50 transition ease-in delay-500 bg-black w-full h-full ${hidden}`} src="/removebg.png" alt="" /> */}

<div
className={`px-6`}
>
<a href="/">
<img src="/home.svg" alt="" />
</a>
</div>
<div
className={`px-6 z-40`}
>
<Link href="/my-profile">
<img src="/user.svg" alt="" />
</Link>
</div>

<div
className={`px-6 z-40`}
>
{!user?
<img
onSuccess={credentialResponse => {
handelSubmit(credentialResponse)
}}
onError={() => {
console.log('Login Failed');
}} src="/google3.svg" alt="" />
: <button
onClick={() => logoutUser(user.email)}
className=" font-bold "
>
<img src="/logout.svg" alt="logout-btn" />
</button>}
</div>


</div>

</div>

</>
>>>>>>> 9e2c5b8 (new ui changes)
);
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "nodemon server.js ",
"dev": "nodemon -w server.js server.js ",
"build": "next build",
"start": "NODE_ENV=production node server.js ",
"export": "next export",
8 changes: 6 additions & 2 deletions pages/add-project.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,11 @@ import uploadPic from '../utils/uploadPicToCloudinary';

import { submitNewPost } from "../utils/postActions";

<<<<<<< HEAD
function AddProject({user}) {
=======
function AddProject({user}){
>>>>>>> 9e2c5b8 (new ui changes)
if (typeof document === 'undefined') {
React.useLayoutEffect = React.useEffect;
}
@@ -48,12 +52,12 @@ await submitNewPost(data)

<Snowfall2 style={{ filter: 'blur(1px)' }} snowflakeCount={50} speed={[0.0, 0.1]} wind={[0.0, 0.1]} />

<div className={styles.form +" text-6xl m-2 ml-4 relative px-5 overflow-hidden z-20"}>
<div className={" text-6xl m-2 ml-4 relative px-5 overflow-hidden z-20 "+styles.form }>
Add Project</div>
<br/>
<form onSubmit={handleSubmit} className={styles.form +" text-6xl m-4 mt-10 relative overflow-hidden z-20"}>
<div className="flex items-center justify-start">
<label className={styles.label +' text-xl '}>Project Name</label>
<label className={' text-xl '+styles.label}>Project Name</label>
<input type="text" className={styles.input+' text-lg font-sans mt-4 ml-8 rounded-md p-2'} onChange={handlechange} value={data.projectname} name="projectname"></input>

</div>
31 changes: 27 additions & 4 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -2,27 +2,50 @@ import React, { useEffect, useRef, useState } from "react";
import Navbar from '../components/Navbar'
import Link from "next/link";
import Home from "../components/Home";
import Features from "@/components/Features";
import Footer from "@/components/Footer";

function Index({user}) {
if (typeof document === 'undefined') {
React.useLayoutEffect = React.useEffect;
}


const [isFlipped, setIsFlipped] = useState(false);

useEffect(() => {
function handleScroll() {
if (window.scrollY > 60) {
setIsFlipped(true);
} else {
setIsFlipped(false);
}
}

window.addEventListener("scroll", handleScroll);

return () => window.removeEventListener("scroll", handleScroll);
}, []);

return (


<div>
<Navbar user={user} />

<div className=' bg-black flex w-full scroll-smooth' >
<div className='flex flex-col w-full scroll-smooth' >

<Home />


</div>
<div className="column3 w-full h-dynamic-screen flipped-parent ">
<video className={` ${isFlipped ? "flipped" : ""}`} autoPlay loop muted src="https://storage.googleapis.com/production-assets/website-assets/video/HOMEPAGE_HEADER_WEB.mp4"></video>
</div>
</div>
<div className="w-full flex items-center justify-center mt-10" style={{backgroundColor: "rgb(3, 7, 17, 0.1)"}}>
<Features />
</div>
<div className="my-12">
<Footer />
</div>
</div>
)
}
23 changes: 17 additions & 6 deletions pages/posts/[postId].js
Original file line number Diff line number Diff line change
@@ -51,9 +51,13 @@ console.log(post)
<main className={styles.bg}>

<Navbar user={user} />
<<<<<<< HEAD
<div className={" h-auto mx-5 mt-20 flex flex-col"}>
=======
<div className={" h-auto sm:mx-5 mt-10 sm:mt-20 flex flex-col"}>
>>>>>>> 9e2c5b8 (new ui changes)
<div className="flex flex-col justify-between ">
<div className="flex justify-between items-center ">
<div className="flex justify-between sm:items-center ">
<div className={" cursor-pointer " + styles.container }>
<div className={styles.btn} onClick={bidform}>
{bidtrue?<a>UpdateBid</a>:<a>BID</a>}
@@ -64,7 +68,7 @@ console.log(post)
</h1>
</div>
<button
className="text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center w-3/1 mx-5 mr-2 mb-2"
className="text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center w-3/1 mx-5 mr-2 mb-2 h-10"
type="button"
onClick={ideaform}
>
@@ -74,7 +78,7 @@ console.log(post)
<h1
className={

" mt-7 text-center backdrop-blur-3xl font-bold text-4xl sm:text-5xl text-white ml-12 " + styles.heading2
" mt-7 text-center backdrop-blur-3xl font-bold text-4xl sm:text-5xl text-white " + styles.heading2
}
>
{post.projectName.toUpperCase()}
@@ -113,17 +117,24 @@ console.log(post)
<div className="rounded-md flex flex-col items-start gap-5 border-t-0 sm:w-1/2 mt-10">
<div className="m-2 flex items-center ">
<img
<<<<<<< HEAD
className={"h-24 w-24 m-2 rounded-full " + styles.userPic}
src={post.userimg}
></img>
<div className="font-bold backdrop-blur-xl text-2xl text-gray-300">
=======
className={"h-24 w-24 m-2 rounded-full object-cover" + styles.userPic}
src={post.userimg}
></img>
<div className="font-bold text-2xl text-gray-300">
>>>>>>> 9e2c5b8 (new ui changes)
{post.name}
</div>
</div>
<div className="text-left backdrop-blur-3xl px-8 py-2 font-bold text-3xl font-sans text-white ml-5 mt-2">
{/* <div className="text-left backdrop-blur-3xl px-8 py-2 font-bold text-3xl font-sans text-white ml-5 mt-2">
<div> Description</div>
</div>
<div className="blinking-cursor backdrop-blur-3xl mt-2 rounded-md text-white font-medium font-500 text-xl font-sans border-white px-2 py-2">
</div> */}
<div className="blinking-cursor backdrop-blur-3xl w-full mt-2 pl-5 rounded-md text-white font-medium font-500 text-xl font-sans border-white px-2 py-2">
{text1}{" "}
</div>

4 changes: 2 additions & 2 deletions pages/project.js
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ function Projects({postsData,user}) {
<div className={styles.bgI}>
{/* <div className=' pt-28 pb-14 gap-8 flex flex-col items-center'>
<Filter options={options} onFilter={handleFilter} /> */}
<div className="flex my-16 flex-wrap justify-center items-center gap-8">
<div className="flex mt-4 mb-16 sm:my-16 flex-wrap justify-center items-center gap-8">
{post.map((item,index)=>(
<Link className="w-auto" href={`/posts/${item._id}`} >
<Link className="w-full sm:w-auto" href={`/posts/${item._id}`} >

<Card key={index} post={item} />

Binary file added public/1876.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/google1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/google3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions public/logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/logoutL.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
687 changes: 361 additions & 326 deletions styles/Home.module.css

Large diffs are not rendered by default.

238 changes: 149 additions & 89 deletions styles/globals.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -17,6 +17,9 @@ module.exports = {
'gradient-radial': 'radial-gradient(circle, var(--tw-gradient-stops))',

},
height: {
'dynamic-screen': '100dvh',
},

},
},
4 changes: 2 additions & 2 deletions utils/postActions.js
Original file line number Diff line number Diff line change
@@ -35,11 +35,11 @@ export const deletePost = async (postId,setBids,setMybids,userId) => {
};
export const deletePost2 = async (postId,setMybids) => {
try {
await Axios.delete(`/post/biddelete/${postId}`);
await Axios.delete(`/post/ideadelete/${postId}`);



setMybids(prev => prev.filter(mybid => mybid.postId.toString() !== postId));
setMyidea(prev => prev.filter(mybid => mybid.postId.toString() !== postId));
} catch (error) {
alert(catchErrors(error));
}

0 comments on commit e784240

Please sign in to comment.