Skip to content

Commit

Permalink
merge home.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohitha-pudu committed Jun 3, 2024
2 parents b1555e9 + 76afb4a commit efffec2
Show file tree
Hide file tree
Showing 24 changed files with 470 additions and 85 deletions.
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Bug report 🐞
description: File a bug report
title: "[Bug]: "
labels: bug
body:
- type: checkboxes
id: existing-issue
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the bug
description: A concise description of what you are experiencing.
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: expected-behaviour
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Add ScreenShots
description: Add sufficient ScreenShots to explain your issue.
- type: dropdown
id: devices
attributes:
label: On which device are you experiencing this bug?
multiple: true
options:
- Android
- iPhone
- Linux
- Chrome
- Windows
- type: checkboxes
id: terms
attributes:
label: Record
options:
- label: "I have read the Contributing Guidelines"
required: true
- label: "I'm a GSSOC'24 contributor"
required: False
- label: "I have starred the repository"
required: true
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: 📝 Documentation Update
description: Improve Documentation
title: "[Documentation Update]: "
labels: 'enhancement'
body:
- type: checkboxes
id: existing-issue
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the updates you want to make.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: issue-description
attributes:
label: Issue Description
description: Please provide a clear description of the documentation update you are suggesting.
placeholder: Describe the improvement or correction you'd like to see in the documentation.
validations:
required: true
- type: textarea
id: suggested-change
attributes:
label: Suggested Change
description: Provide details of the proposed change to the documentation.
placeholder: Explain how the documentation should be updated or corrected.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: Rationale
description: Why is this documentation update necessary or beneficial?
placeholder: Explain the importance or reasoning behind the suggested change.
validations:
required: False
- type: dropdown
id: urgency
attributes:
label: Urgency
description: How urgently do you believe this documentation update is needed?
options:
- High
- Medium
- Low
default: 0
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Record
options:
- label: "I have read the Contributing Guidelines"
required: true
- label: "I'm a GSSOC'24 contributor"
required: false
- label: "I have starred the repository"
required: true
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: ✨ Feature Request
description: Suggest a feature
title: "[Feature Request]: "
labels: enhancement
body:
- type: checkboxes
id: existing-issue
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for this feature.
options:
- label: I have searched the existing issues
required: true
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: Please provide a detailed description of the feature you are requesting.
placeholder: Describe the new feature or enhancement you'd like to see.
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: How would this feature enhance your use of the project?
placeholder: Describe a specific use case or scenario where this feature would be beneficial.
validations:
required: true
- type: textarea
id: benefits
attributes:
label: Benefits
description: What benefits would this feature bring to the project or community?
placeholder: Explain the advantages of implementing this feature.
- type: textarea
id: screenShots
attributes:
label: Add ScreenShots
description: If any...
- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- High
- Medium
- Low
default: 0
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Record
options:
- label: "I have read the Contributing Guidelines"
required: true
- label: "I'm a GSSOC'24 contributor"
required: false
- label: "I have starred the repository"
required: true
5 changes: 3 additions & 2 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DATABASE_URL="mongodb+srv://<username>:<password>@clustername/syleshare"
JWT_SECRET="secret"
PORT=3001
EMAIL_USER=user_email_id
EMAIL_PASS=16char_app_password
# EMAIL_USER=user_email_id
# EMAIL_PASS=16char_app_password
# SEND_EMAIL=true
5 changes: 5 additions & 0 deletions backend/src/helpers/mail/sendOtpMail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import nodemailer from "nodemailer";
import getOtpMailBody from "./otpMailBody";

export const sendVerificationEmail = async (email: string, otp: number) => {
if (!process.env.SEND_EMAIL) {
console.log("SEND_EMAIL environment variable is not set. Email not sent.");
return;
}

let transporter = nodemailer.createTransport({
service: "Gmail",
auth: {
Expand Down
5 changes: 5 additions & 0 deletions backend/src/helpers/mail/sendWelcomeMail.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import nodemailer from "nodemailer";

export const sendWelcomeEmail = async (email: string, username: string) => {
if (!process.env.SEND_EMAIL) {
console.log("SEND_EMAIL environment variable is not set. Email not sent.");
return;
}

let transporter = nodemailer.createTransport({
service: "Gmail",
auth: {
Expand Down
2 changes: 0 additions & 2 deletions backend/src/routes/post/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export const getPostController = async (req: Request, res: Response) => {
select: {
id: true,
username: true,
email: true,
},
},
},
Expand Down Expand Up @@ -167,7 +166,6 @@ export const getPostsWithPagination = async (req: Request, res: Response) => {
select: {
id: true,
username: true,
email: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"axios": "^1.7.2",
Expand Down
25 changes: 23 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ import AuthenticatedRoute from "./components/AuthenticatedRoute";
import Profile from "./pages/Profile";
import React from "react";
import Loader from "./components/Loader";
import ContactUs from "./pages/ContactUs";
import About from "./pages/About";
import Policy from "./pages/Policy";
// import axios from "axios";
// axios.defaults.baseURL = "http://localhost:3001/";

function App() {
return (
<BrowserRouter>
<RecoilRoot>
<React.Suspense fallback={<Loader/>}>
<React.Suspense fallback={<Loader />}>
<Navbar />

<div className="min-h-[80vh] mt-12 pt-12" >
<div className="min-h-[80vh] mt-12 pt-12">
<Routes>
<Route path="/app" element={<Home />} />
<Route path="/app/posts/:id" element={<Post />} />
Expand Down Expand Up @@ -61,6 +64,24 @@ function App() {
</AuthenticatedRoute>
}
/>
<Route
path="/app/contact-us"
element={
<ContactUs />
}
/>
<Route
path="/app/about"
element={
<About />
}
/>
<Route
path="/app/policy"
element={
<Policy />
}
/>
<Route path="*" element={<Navigate to="/app" />} />
</Routes>
</div>
Expand Down
Binary file added frontend/src/assets/about.png
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 frontend/src/assets/bgHero.png
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 frontend/src/assets/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 52 additions & 12 deletions frontend/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { useRecoilValue } from 'recoil';
import github from '../assets/github.png';
import { Link } from 'react-router-dom';
import { loggedInState } from '../store/atoms/auth';
import { CgProfile } from 'react-icons/cg';
import { BsFilePost } from 'react-icons/bs';
import { FaHome } from 'react-icons/fa';

const Footer = () => {

const isLoggedIn = useRecoilValue(loggedInState);
const currentYear = new Date().getFullYear();

return (
<div className='bg-black text-white p-10'>
<div className='md:flex'>
Expand All @@ -9,32 +19,62 @@ const Footer = () => {
Style Share
</span>
</div>
<div className='md:w-1/2 md:flex'>
<div className='md:w-1/2'>
<div className='md:w-3/4 md:flex'>
<div className='md:w-1/3'>
<p className='text-gray-200 font-bold mt-8 md:mt-0'>Company</p>
<ul className='text-gray-300 py-4'>
<li className='py-1 cursor-pointer'>About Us</li>
<li className='py-1 cursor-pointer'>Contact Us</li>
<li className='py-1 cursor-pointer'>Careers</li>
<li className='py-1 cursor-pointer'>Brand Center</li>
<li className='py-1 cursor-pointer'>
<Link to='/app/about'>About Us</Link>
</li>
<li className='py-1 cursor-pointer'>
<Link to='/app/contact-us'>Contact Us</Link>
</li>
</ul>
</div>
<div className='md:w-1/3'>
<p className='text-gray-200 font-bold'>Quick Links</p>
<ul className='text-gray-300 py-4 cursor-pointer'>
<li className='py-1 cursor-pointer'>
<Link className='flex items-center gap-1' to='/app/posts'>
All Posts
<BsFilePost size={20} />
</Link>
</li>
<li className='py-1 cursor-pointer'>
<Link className='flex items-center gap-1' to={isLoggedIn ? '/app/profile' : '/app/signin'}>
User profile
<CgProfile size={20} />
</Link>
</li>
</ul>
</div>
<div className='md:w-1/2'>
<div className='md:w-1/3'>
<p className='text-gray-200 font-bold'>Legal Pages</p>
<ul className='text-gray-300 py-4 cursor-pointer'>
<li className='py-1 cursor-pointer'>Privacy Policy</li>
<li className='py-1 cursor-pointer'>Terms and Conditions</li>
<li className='py-1 cursor-pointer'>Cookie Policy</li>
<li className='py-1 cursor-pointer'>
<Link to='/app/policy'>Privacy Policy</Link>
</li>
<li className='py-1 cursor-pointer'>
<Link to='/app/policy'>Terms and Conditions</Link>
</li>
<li className='py-1 cursor-pointer'>
<Link to='/app/policy'>Cookie Policy</Link>
</li>
</ul>
</div>
</div>
</div>
<div className='block w-3/4 m-auto mt-20'>
<div className='block w-3/4 m-auto mt-10'>
<div className='flex gap-4 justify-center md:justify-end'>
<a href="https://github.com/VaibhavArora314/StyleShare"><img src={github} alt="github" className='pointer w-14 h-14'/></a>
<Link to='/app'
className="flex items-center justify-center p-2 text-white rounded-full focus:outline-none"
>
<FaHome size={35} />
</Link>
</div>
</div>
<div className='mt-20 text-gray-300 xl:flex justify-center text-md lg:text-xl xl:text-md'>Copyright @ Style Share</div>
<div className='mt-10 text-gray-300 xl:flex justify-center text-md lg:text-xl xl:text-md'>Copyright {currentYear} @ Style Share</div>
</div>
)
}
Expand Down
Loading

0 comments on commit efffec2

Please sign in to comment.