Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavkumar5158 authored Oct 10, 2024
2 parents 241d218 + 07f9176 commit 087cb70
Show file tree
Hide file tree
Showing 29 changed files with 1,439 additions and 266 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.json text eol=lf
6 changes: 2 additions & 4 deletions .github/workflows/auto-label-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
permissions:
issues: write
pull-requests: write
contents: read # Required to read repository contents

contents: write # Required to read repository contents

jobs:
label:
Expand All @@ -26,6 +25,5 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
hacktoberfest
hacktoberfest-accepted
gssoc-ext
gssoc-ext
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"liveServer.settings.port": 5501
"liveServer.settings.port": 5502
}
60 changes: 60 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@


# 🎮 Contributing to Collect Your GamingTools Repository

Thank you for your interest in contributing to **Collect Your GamingTools**! We’re excited to see what creative ideas you bring. Follow these simple guidelines below to get started.

---

## 🚀 Getting Started

1. **Fork the Repository**
Click the "Fork" button at the top-right corner to create your own copy of the repo.

2. **Clone Your Fork**
Clone your forked repository to your local machine:
```bash
git clone https://github.com/<your-github-username>/Collect-your-GamingTools.git
```

3. **Create a New Branch**
Create a new branch for your changes:
```bash
git checkout -b feature/your-feature-name
```

---

## 🖌️ Making Changes

1. **Code Changes**
Make your modifications, ensuring they align with the project’s coding standards and code of conduct. Add exciting features, enriching documentation or squash bugs!

2. **Commit Your Changes**
Write meaningful commit messages:
```bash
git commit -m "Add: New navigation bar feature"
```

3. **Push Your Changes**
Push your changes to your forked repository:
```bash
git push origin feature/your-feature-name
```

---

## 🛠️ Creating a Pull Request

1. Once your changes are pushed, create a pull request (PR) on the original repository.
2. Provide a detailed description of your changes and link any relevant issues. Provide relevant images/videos, if any.
3. Wait for reviews and engage with feedback!

---

## 🎉 Additional Notes

- Make sure to sync your fork with the latest changes from the original repo before pushing new features.
- Respect coding conventions and keep your code clean. Comment your changes for ease in review.

Welcome to Open-Source and thank you for contributing! 🙌
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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-7r1z88vx4-swaraj-das-projects.vercel.app/
https://collect-your-gaming-tools-git-main-swaraj-das-projects.vercel.app/


## 🛠️ Installation
Expand All @@ -47,20 +47,17 @@ Contributions are what make the **open-source** community such an amazing place

🔃 Open a <b>pull request</b>.

We welcome all contributions to improve **Collect Your GamingTools**! If you'd like to contribute, please follow the [Contributing.md](./Contributing.md) to get details on how to get started.

## 📄 Workflow Configuration
## 👥 Team

The `.github/workflows/auto-label-action.yml` file is used to automatically add labels to new issues and pull requests. This helps in organizing and managing the repository more efficiently.
| ![Swaraj Das](https://avatars.githubusercontent.com/u/151845349?v=4&s=80) | ![Anit Sarkar](https://avatars.githubusercontent.com/u/135215478?v=4&s=80) |
|:--:|:--:|
| **Swaraj Das** <br> <sub>Project Admin</sub> | **Anit Sarkar** <br> <sub>Maintainer</sub> |
| [![LinkedIn](https://img.icons8.com/fluency/32/000000/linkedin.png)](https://www.linkedin.com/in/swarajdas01/) | [![LinkedIn](https://img.icons8.com/fluency/32/000000/linkedin.png)](https://www.linkedin.com/in/anit-sarkar-11906a283/) |

### Permissions Required
## 🙌 Contributors

The GitHub token used in the workflow file must have the following permissions:
- `issues: write`
- `pull-requests: write`
- `contents: read`

These permissions ensure that the workflow can read the repository contents and write labels to issues and pull requests.


## 👨‍💻 Author
### Created with ❤️ by Swaraj Das
89 changes: 68 additions & 21 deletions SignUp/signup.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
* {
box-sizing: border-box;
margin: 0;
padding: 0;
padding:5px;
}

body {
background: url('https://www.example.com/path/to/your/gaming-background.jpg') no-repeat center center fixed;
background: url('https://images.pexels.com/photos/7135057/pexels-photo-7135057.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center fixed;
background-size: cover;
font-family: 'Trebuchet MS', Arial, sans-serif;
display: flex;
Expand All @@ -17,23 +17,28 @@ body {
}

.signup-container {
background-color: rgba(0, 0, 0, 0.8);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);

opacity: 0.75;
background-color: rgba(0, 0, 0, 0);
padding: 5rem;
border-radius: 20px;
box-shadow: 0 0px 0px rgba(0, 0, 0, 0.5);
text-align: center;
max-width: 400px;
max-width: 500px;
width: 100%;
animation: fadeIn 1.5s ease-in-out;
animation: fadeIn 2s ease-in-out;
background-color: black;
margin: auto;
}


@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
opacity: 0.75;
transform: scale(1);
}
}
Expand Down Expand Up @@ -73,20 +78,62 @@ input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focu
}

.signup-button {
background-color: #ba68c8;
color: #282c34;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 5px;
cursor: pointer;
font-family: 'Press Start 2P', cursive;
font-size: 18px;
transition: background-color 0.3s, transform 0.3s;
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;
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-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}

.signup-button:hover {
background-color: #ab47bc;
transform: scale(1.05);
.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;
position: absolute;
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;

}

.links {
Expand Down
50 changes: 49 additions & 1 deletion SignUp/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<link rel="shortcut icon" href="../images/logo.png" type="image/x-icon">
</head>
<body>
<div class="linksHome">
<a href="../index.html">home</a>
</div>
<div class="signup-container">
<h1>Create Your Account</h1>
<form action="#" method="post">
Expand All @@ -30,8 +33,53 @@ <h1>Create Your Account</h1>
<button type="submit" class="signup-button">Sign Up</button>
</form>
<div class="links">
<a href="../login/login.html">Already have an account? Login</a>
<a href="../login/login.html"><u>Already have an account? Login</u></a>
</div>
</div>

<script>
const signup = document.querySelector(".signup-button");

signup.addEventListener("click",(e)=>{
e.preventDefault();

const name = document.querySelector("#username").value;
const email = document.querySelector("#email").value;
const password = document.querySelector("#password").value;
const confirmPassword = document.querySelector("#confirm-password").value;

if(!name || !email || !password || !confirmPassword){
alert("every feild is required");
return;
}
const userdata = {
name,
email,
password,
confirmPassword
}
registeruser(userdata);

} )


const registeruser = async(user)=>{

try{
const res = await fetch("http://localhost:5000/auth/signup",{
method:"POST",
headers:{"content-type" : "application/json"},
body:JSON.stringify(user)
})

const data = await res.json();
console.log(data);
window.location.href="http://127.0.0.1:5500/Collect-your-GamingTools/login/login.html"

}catch(err){
console.log(err.message)
}
}
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions backend/controller/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const emailValidator = require("email-validator");

const signUp = async (req, res, next) => {
const { name, email, password, confirmPassword } = req.body;

console.log(name , email,password,confirmPassword)
/// every field is required
if (!name || !email || !password || !confirmPassword) {
return res.status(400).json({
Expand Down Expand Up @@ -137,7 +137,7 @@ const signIn = async (req, res, next) => {
const logout = async (req, res, next) => {
try {
const cookieOption = {
expires: new Date(), // current expiry date
expires: new Date(Date.now()), // current expiry date
httpOnly: true // not able to modify the cookie in client side
};

Expand Down
2 changes: 1 addition & 1 deletion backend/middleware/jwtAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const JWT = require("jsonwebtoken");

// router level middleware function
const jwtAuth = (req, res, next) => {
console.log(req.cookies?.token);

// get cookie token(jwt token generated using json.sign()) form the request
const token = ( req.cookies?.token) || null;

Expand Down
Loading

0 comments on commit 087cb70

Please sign in to comment.