Skip to content

Commit 611807f

Browse files
authored
Add files via upload
1 parent 100a2b0 commit 611807f

File tree

76 files changed

+5149
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5149
-0
lines changed

3D Navigation Menu/dist/index.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en" >
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>CodePen - Creative Menu Item Hover</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@900&display=swap" rel="stylesheet"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
8+
<link rel="stylesheet" href="./style.css">
9+
10+
</head>
11+
<body>
12+
<!-- partial:index.partial.html -->
13+
<ul class="navigation">
14+
<li class="navigation__item">
15+
<a class="navigation__link" href="#" data-text="Home">Home</a>
16+
</li>
17+
<li class="navigation__item">
18+
<a class="navigation__link" href="#" data-text="About">About</a>
19+
</li>
20+
<li class="navigation__item">
21+
<a class="navigation__link" href="#" data-text="Portfolio">Portfolio</a>
22+
</li>
23+
<li class="navigation__item">
24+
<a class="navigation__link" href="#" data-text="Team">Team</a>
25+
</li>
26+
<li class="navigation__item">
27+
<a class="navigation__link" href="#" data-text="Contact">Contact</a>
28+
</li>
29+
</ul>
30+
<!-- partial -->
31+
32+
</body>
33+
</html>

3D Navigation Menu/dist/style.css

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
body {
2+
display: flex;
3+
align-items: center;
4+
justify-content: center;
5+
min-height: 100vh;
6+
font-family: "Poppins", sans-serif;
7+
color: #ffffff;
8+
background-color: #212121;
9+
}
10+
11+
.navigation {
12+
margin: 0;
13+
padding: 0;
14+
list-style: none;
15+
}
16+
17+
.navigation__link {
18+
position: relative;
19+
display: block;
20+
font-weight: 900;
21+
font-size: 5rem;
22+
line-height: 1.5;
23+
text-decoration: none;
24+
color: transparent;
25+
-webkit-text-stroke: 1px #ffffff;
26+
-webkit-user-select: none;
27+
-moz-user-select: none;
28+
-ms-user-select: none;
29+
user-select: none;
30+
}
31+
.navigation__link:hover {
32+
color: #ffffff;
33+
-webkit-text-stroke: 1px #212121;
34+
transition: 0.25s;
35+
}
36+
.navigation__link:hover::before {
37+
transform: translate(12px, -12px);
38+
color: #ff1744;
39+
-webkit-text-stroke: 1px #212121;
40+
}
41+
.navigation__link:hover::after {
42+
transform: translate(24px, -24px);
43+
color: #4dd0e1;
44+
-webkit-text-stroke: 1px #212121;
45+
}
46+
.navigation__link::before, .navigation__link::after {
47+
content: attr(data-text);
48+
position: absolute;
49+
top: 0;
50+
left: 0;
51+
z-index: 1;
52+
transition: 0.5s;
53+
-webkit-text-stroke: 1px transparent;
54+
}

Corner Menu/Corner Menu/index.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
5+
<title>Corner Menu</title>
6+
<!-- Font Awesome CDN -->
7+
<link
8+
rel="stylesheet"
9+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
10+
/>
11+
<!-- Stylesheet -->
12+
<link rel="stylesheet" href="style.css" />
13+
</head>
14+
<body>
15+
<div class="menu">
16+
<a href="#account">
17+
<i class="fas fa-user"></i>
18+
</a>
19+
<a href="#info">
20+
<i class="fas fa-info"></i>
21+
</a>
22+
<a href="#message">
23+
<i class="fas fa-comment-dots"></i>
24+
</a>
25+
<a href="#contact">
26+
<i class="fas fa-phone-alt"></i>
27+
</a>
28+
<button id="toggle-btn">
29+
<i class="fas fa-plus"></i>
30+
</button>
31+
</div>
32+
<!-- Script -->
33+
<script src="script.js"></script>
34+
</body>
35+
</html>

Corner Menu/Corner Menu/script.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
let toggleBtn = document.getElementById("toggle-btn");
2+
let menuItems = document.querySelectorAll(".menu a");
3+
let menuActive = false;
4+
toggleBtn.addEventListener("click", () => {
5+
if (!menuActive) {
6+
menuItems[0].style.transform = "translate(150px,0)";
7+
menuItems[1].style.transform = "translate(150px,90px)";
8+
menuItems[2].style.transform = "translate(90px,150px)";
9+
menuItems[3].style.transform = "translate(0,150px)";
10+
menuActive = true;
11+
toggleBtn.classList.add("active");
12+
} else {
13+
menuItems.forEach((menuItem) => {
14+
menuItem.style.transform = "translate(0,0)";
15+
});
16+
menuActive = false;
17+
toggleBtn.classList.remove("active");
18+
}
19+
});

Corner Menu/Corner Menu/style.css

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
* {
2+
padding: 0;
3+
margin: 0;
4+
box-sizing: border-box;
5+
}
6+
body {
7+
background-color: #4249ed;
8+
}
9+
#toggle-btn,
10+
.menu a {
11+
position: absolute;
12+
display: grid;
13+
place-items: center;
14+
border-radius: 50%;
15+
}
16+
.menu a {
17+
background-color: #ffffff;
18+
height: 70px;
19+
width: 70px;
20+
font-size: 22px;
21+
color: #4249ed;
22+
text-decoration: none;
23+
top: 30px;
24+
left: 30px;
25+
transition: 0.5s;
26+
}
27+
#toggle-btn {
28+
background-color: #0f1730;
29+
color: #ffffff;
30+
height: 100px;
31+
width: 100px;
32+
border: none;
33+
font-size: 40px;
34+
top: 15px;
35+
left: 15px;
36+
transition: 0.3s;
37+
cursor: pointer;
38+
}
39+
.active {
40+
transform: rotate(45deg);
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en" >
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>CodePen - Custom Captcha Generator using JS</title>
6+
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css'><link rel="stylesheet" href="./style.css">
7+
8+
</head>
9+
<body>
10+
<!-- partial:index.partial.html -->
11+
<div class="container">
12+
<header>Captcha Generator</header>
13+
<div class="input_field captch_box">
14+
<input type="text" value="" disabled />
15+
<button class="refresh_button">
16+
<i class="fa-solid fa-rotate-right"></i>
17+
</button>
18+
</div>
19+
<div class="input_field captch_input">
20+
<input type="text" placeholder="Enter captcha" />
21+
</div>
22+
<div class="message">Entered captcha is correct</div>
23+
<div class="input_field button disabled">
24+
<button>Submit Captcha</button>
25+
</div>
26+
</div>
27+
<!-- partial -->
28+
<script src="./script.js"></script>
29+
30+
</body>
31+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Selecting necessary DOM elements
2+
const captchaTextBox = document.querySelector(".captch_box input"); // Input field where the generated captcha will be displayed
3+
const refreshButton = document.querySelector(".refresh_button"); // Button to refresh the captcha
4+
const captchaInputBox = document.querySelector(".captch_input input"); // Input field for the user to enter the captcha
5+
const message = document.querySelector(".message"); // Element to display the validation message
6+
const submitButton = document.querySelector(".button"); // Submit button to validate the entered captcha
7+
8+
// Variable to store the generated captcha
9+
let captchaText = null;
10+
11+
// Function to generate the captcha
12+
const generateCaptcha = () => {
13+
const randomString = Math.random().toString(36).substring(2, 7); // Generate a random string
14+
const randomStringArray = randomString.split("");
15+
const changeString = randomStringArray.map((char) =>
16+
Math.random() > 0.5 ? char.toUpperCase() : char
17+
); // Randomly change some characters to uppercase
18+
captchaText = changeString.join(" "); // Join the characters with spaces for a spaced-out appearance
19+
captchaTextBox.value = captchaText; // Display the generated captcha in the input field
20+
console.log(captchaText);
21+
};
22+
23+
const refreshBtnClick = () => {
24+
generateCaptcha(); // Refresh the captcha when the refresh button is clicked
25+
captchaInputBox.value = ""; // Clear the user input field
26+
captchaKeyUpValidate();
27+
};
28+
29+
const captchaKeyUpValidate = () => {
30+
// Toggle the "disabled" class on the submit button based on whether the captcha input field is empty or not
31+
submitButton.classList.toggle("disabled", !captchaInputBox.value);
32+
33+
if (!captchaInputBox.value) message.classList.remove("active"); // Hide the validation message if the captcha input field is empty
34+
};
35+
36+
// Function to validate the entered captcha
37+
const submitBtnClick = () => {
38+
captchaText = captchaText
39+
.split("")
40+
.filter((char) => char !== " ")
41+
.join(""); // Remove spaces from the stored captcha for validation
42+
message.classList.add("active"); // Show the validation message
43+
44+
// Check if the entered captcha text is correct or not
45+
if (captchaInputBox.value === captchaText) {
46+
message.innerText = "Entered captcha is correct"; // Display success message
47+
message.style.color = "#222620"; // Dark green color for success message
48+
} else {
49+
message.innerText = "Entered captcha is not correct"; // Display error message
50+
message.style.color = "#FF2525"; // Bright red color for error message
51+
}
52+
};
53+
54+
// Add event listeners for the refresh button, captchaInputBox, submit button
55+
refreshButton.addEventListener("click", refreshBtnClick);
56+
captchaInputBox.addEventListener("keyup", captchaKeyUpValidate);
57+
submitButton.addEventListener("click", submitBtnClick);
58+
59+
// Generate a captcha when the page loads
60+
generateCaptcha();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/* Import Google font - Montserrat*/
2+
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700&display=swap");
3+
4+
* {
5+
margin: 0;
6+
padding: 0;
7+
box-sizing: border-box;
8+
font-family: "Montserrat", sans-serif;
9+
}
10+
body {
11+
height: 100vh;
12+
display: flex;
13+
align-items: center;
14+
justify-content: center;
15+
background: linear-gradient(180deg, #fff 50%, #99d128 50%);
16+
}
17+
18+
.container {
19+
position: relative;
20+
max-width: 300px;
21+
width: 100%;
22+
border-radius: 12px;
23+
padding: 15px 25px 25px;
24+
background: #fff;
25+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
26+
}
27+
header {
28+
color: #333;
29+
margin-bottom: 20px;
30+
font-size: 18px;
31+
font-weight: 600;
32+
text-align: center;
33+
}
34+
.input_field {
35+
position: relative;
36+
height: 45px;
37+
margin-top: 15px;
38+
width: 100%;
39+
}
40+
.refresh_button {
41+
position: absolute;
42+
top: 50%;
43+
right: 10px;
44+
transform: translateY(-50%);
45+
background: #14141c;
46+
height: 30px;
47+
width: 30px;
48+
border: none;
49+
border-radius: 4px;
50+
color: #fff;
51+
cursor: pointer;
52+
}
53+
.refresh_button:active {
54+
transform: translateY(-50%) scale(0.98);
55+
}
56+
.input_field input,
57+
.button button {
58+
height: 100%;
59+
width: 100%;
60+
outline: none;
61+
border: none;
62+
border-radius: 8px;
63+
}
64+
.input_field input {
65+
padding: 0 15px;
66+
border: 1px solid rgba(0, 0, 0, 0.1);
67+
}
68+
.captch_box input {
69+
color: #6b6b6b;
70+
font-size: 22px;
71+
pointer-events: none;
72+
}
73+
.captch_input input:focus {
74+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
75+
}
76+
.message {
77+
font-size: 14px;
78+
margin: 14px 0;
79+
color: #222620;
80+
display: none;
81+
}
82+
.message.active {
83+
display: block;
84+
}
85+
.button button {
86+
background: #14141c;
87+
color: #fff;
88+
cursor: pointer;
89+
user-select: none;
90+
}
91+
.button button:active {
92+
transform: scale(0.99);
93+
}
94+
.button.disabled {
95+
opacity: 0.9;
96+
pointer-events: none;
97+
}

0 commit comments

Comments
 (0)