Skip to content

Commit

Permalink
Merge branch 'main' into sign-up-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
4F24L authored Oct 11, 2024
2 parents 18b9699 + 6dd3bac commit 85e59dc
Show file tree
Hide file tree
Showing 14 changed files with 1,002 additions and 545 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ A <b> responsive and dynamic website </b> to showcase the best gaming accessorie
## 🚀 Demo
#### Check out the live demo here ⬇️ :

https://collect-your-gaming-tools-git-main-swaraj-das-projects.vercel.app/
https://collect-your-gamingtools.netlify.app/




Expand Down
219 changes: 147 additions & 72 deletions SignUp/signup.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* {

box-sizing: border-box;
margin: 0;
padding:0;
Expand Down Expand Up @@ -32,16 +33,15 @@ body {
margin: auto;
}


@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 0.75;
transform: scale(1);
}
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 0.75;
transform: scale(1);
}
}

h1 {
Expand All @@ -51,106 +51,181 @@ h1 {
}

.input-group {
margin-bottom: 1.5rem;
text-align: left;
margin-bottom: 1.5rem;
text-align: left;
}

label {
display: block;
margin-bottom: 0.5rem;
font-size: 16px;
display: block;
margin-bottom: 0.5rem;
font-size: 16px;
}

input[type="text"], input[type="email"], input[type="password"] {
width: 100%;
padding: 0.75rem;
border: 2px solid #6a1b9a;
border-radius: 5px;
background-color: #3a3f44;
color: white;
font-family: 'Press Start 2P', cursive;
font-size: 0.875rem;
input[type="text"],
input[type="email"],
input[type="password"] {
width: 100%;
padding: 0.75rem;
border: 2px solid #6a1b9a;
border-radius: 5px;
background-color: #3a3f44;
color: white;
font-family: "Press Start 2P", cursive;
font-size: 0.875rem;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
outline: none;
border-color: #ba68c8;
background-color: #2a2e32;
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
outline: none;
border-color: #ba68c8;
background-color: #2a2e32;
}

.signup-button {
color:white;
font-family:Helvetica, sans-serif;
font-weight:bold;
font-size:20px;
color: white;
font-family: Helvetica, sans-serif;
font-weight: bold;
font-size: 20px;
text-align: center;
background-color:#FFA12B;
display:block;
position:relative;
padding:15px 60px;
background-color: #ffa12b;
display: block;
position: relative;
padding: 15px 60px;
margin: auto;





cursor: pointer;
transition: background-color 0.2s, color 0.2s;

-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
text-shadow: 0px 1px 0px #000;
filter: dropshadow(color=#000, offx=0px, offy=1px);
-webkit-box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;
-moz-box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;
box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;

-webkit-box-shadow: inset 0 1px 0 #ffe5c4, 0 10px 0 #915100;
-moz-box-shadow: inset 0 1px 0 #ffe5c4, 0 10px 0 #915100;
box-shadow: inset 0 1px 0 #ffe5c4, 0 10px 0 #915100;

-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}

.signup-button:active{
top:10px;
background-color:#F78900;
-webkit-box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3px 0 #915100;
-moz-box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3pxpx 0 #915100;
box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3px 0 #915100;
.signup-button:active {
top: 10px;
background-color: #f78900;

-webkit-box-shadow: inset 0 1px 0 #ffe5c4, inset 0 -3px 0 #915100;
-moz-box-shadow: inset 0 1px 0 #ffe5c4, inset 0 -3pxpx 0 #915100;
box-shadow: inset 0 1px 0 #ffe5c4, inset 0 -3px 0 #915100;
}
.signup-button:after{
content:"";
height:100%;
width:100%;
padding:4px;
.signup-button:after {
content: "";
height: 100%;
width: 100%;
padding: 4px;
position: absolute;
bottom:-15px;
left:-4px;
z-index:-1;
background-color:#2B1800;
bottom: -15px;
left: -4px;
z-index: -1;
background-color: #2b1800;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.signup-button:hover{
background-color: #FFD198;
color: #F78900;

.signup-button:hover {
background-color: #ffd198;
color: #f78900;
}

.links {
margin-top: 18px;
margin-top: 18px;
}

.links a {
color: #fb5283;
text-decoration: none;
transition: color 0.3s;
font-size: 18px;
color: #fb5283;
text-decoration: none;
transition: color 0.3s;
font-size: 18px;
}

.links a:hover {
color: #ff80ab;
text-decoration: underline;
color: #ff80ab;
text-decoration: underline;
}

.linksHome {
position: absolute;
top: 20px;
left: 20px;
cursor: pointer;
padding: 10px;
font-size: large;
text-decoration: none;
border-radius: 15px;
border: none;
background: linear-gradient(
0deg,
rgba(255, 193, 219, 1) 0%,
rgba(245, 131, 202, 1) 100%
);
color: #fff;
overflow: hidden;
}

.linksHome:hover {
text-decoration: none;
background: linear-gradient(
0deg,
rgba(245, 131, 202, 1) 0%,
rgba(255, 193, 219, 1) 100%
);
color: #fff;
}

.linksHome:before {
position: absolute;
content: "";
display: inline-block;
top: -180px;
left: 0;
width: 30px;
height: 100%;
background-color: rgba(255, 255, 255, 0.3);
animation: shiny-btn1 3s ease-in-out infinite;
}

.linksHome:active {
box-shadow: 4px 4px 6px 0 rgba(255, 193, 219, 0.3),
-4px -4px 6px 0 rgba(245, 131, 202, 0.3),
inset -4px -4px 6px 0 rgba(255, 193, 219, 0.3),
inset 4px 4px 6px 0 rgba(245, 131, 202, 0.3);
}

@keyframes shiny-btn1 {
0% {
transform: scale(0) rotate(45deg);
opacity: 0;
}
80% {
transform: scale(0) rotate(45deg);
opacity: 0.5;
}
81% {
transform: scale(4) rotate(45deg);
opacity: 1;
}
100% {
transform: scale(50) rotate(45deg);
opacity: 0;
}
}

.linksHome a {
color: #ffe4e9;
}

a {
text-decoration: none;
}

#link-home{
Expand Down
4 changes: 3 additions & 1 deletion SignUp/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<link rel="shortcut icon" href="../images/logo.png" type="image/x-icon">
</head>
<body>

<span id="link-home" class="linksHome">
<a href="">Home</a>
<a href="../index.html">Home</a>
</span>

<div class="signup-container">
<h1>Create Your Account</h1>
<form action="#" method="post">
Expand Down
4 changes: 2 additions & 2 deletions backend/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const express = require('express');
const app = express();

const emailRouter = require("./router/EmailRoute.js");
const authRouter = require('./router/authRoute.js');
const databaseconnect = require('./config/databaseConfig.js');
const cookieParser = require('cookie-parser');
Expand All @@ -16,7 +16,7 @@ app.use(cors({ origin: [process.env.CLIENT_URL], credentials: true })); //Third-

// Auth router
app.use('/auth', authRouter);

app.use("/email", emailRouter);
app.use('/', (req, res) => {
res.status(200).json({ data: 'JWTauth server ;)' });
});
Expand Down
33 changes: 33 additions & 0 deletions backend/controller/EmailController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const nodemailer = require("nodemailer");

async function SendEmailController(req, resp) {
const transporter = nodemailer.createTransport({
service: "gmail",
auth: {
user: "[email protected]", // youe email
pass: "password", // your password
},
});

const mailOptions = {
from: "[email protected]",
to: "[email protected]", // email where you want to receive the message
subject: "New From Collect your GamingTools",
text: `
Name: ${req.body.Name}
Email: ${req.body.Email}
Message: ${req.body.Message}`,
};

transporter.sendMail(mailOptions, (error, info) => {
if (error) {
console.log("Error sending email: " + error);
resp.status(500).send("Error sending email");
} else {
console.log("Email sent: " + info.response);
resp.status(200).send("Form data sent successfully");
}
});
}

module.exports = { SendEmailController };
1 change: 1 addition & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"crypto": "^1.0.1",
"dotenv": "^16.4.5",
"email-validator": "^2.0.4",
"nodemailer": "^6.9.15",
"express": "^4.21.0",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.7.0",
Expand Down
8 changes: 8 additions & 0 deletions backend/router/EmailRoute.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const express = require("express");
const emailRouter = express.Router();

const { SendEmailController } = require("../controller/EmailController");

emailRouter.post("/SendEmail", SendEmailController);

module.exports = emailRouter;
Loading

0 comments on commit 85e59dc

Please sign in to comment.