Prompt 1: Code me a website which requires a password to open. The password should be 'Mafia2003'. Give the world website a dark web like theme having black background and rest all in Neon Colour. The Password Input box should be designed such that it looks like i am opening a high confidential database. When the password is entered correctly give the PopUp Access Granted and then redirect them to https://youtu.be/xvFZjo5PgG0 and if the password entered is wrong show it's wrong.
Output: I can provide you with a simple HTML, CSS, and JavaScript code to create a website with the features you described. Please note that this is a basic implementation and not a secure way to protect your content. For a more secure solution, you should consider server-side authentication.
Here's the code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Protected Website</title>
<style>
body {
background-color: black;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.password-container {
background-color: rgba(0, 0, 0, 0.8);
padding: 20px;
border-radius: 5px;
text-align: center;
}
h1, label, button {
color: #0ff;
}
input[type="password"] {
background-color: rgba(0, 0, 0, 0.8);
border: 2px solid #0ff;
border-radius: 5px;
color: #0ff;
padding: 5px;
width: 100%;
}
button {
background-color: #0ff;
border: none;
border-radius: 5px;
color: black;
cursor: pointer;
font-weight: bold;
padding: 10px;
width: 100%;
}
button:hover {
background-color: #00cccc;
}
</style>
</head>
<body>
<div class="password-container">
<h1>Confidential Database</h1>
<label for="password">Enter Password:</label>
<input type="password" id="password" />
<button onclick="checkPassword()">Submit</button>
</div>
<script>
function checkPassword() {
const passwordInput = document.getElementById('password');
const correctPassword = 'Mafia2003';
if (passwordInput.value === correctPassword) {
alert('Access Granted');
window.location.href = 'https://youtu.be/xvFZjo5PgG0';
} else {
alert('Wrong password');
}
}
</script>
</body>
</html>
Copy and paste the code into an HTML file and open it in your browser. The website will have a dark theme with neon colors, and when the correct password is entered, it will show an "Access Granted" popup and redirect to the specified YouTube video. If the password is incorrect, it will show a "Wrong password" popup.
Prompt 2: Embed the video and autoplay if the password entered is correct. here's the embed code <iframe width="981" height="552" src="https://www.youtube.com/embed/xvFZjo5PgG0" title="Rick Roll (Different link + no ads)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> . Design the website with Tailwind CSS. Give it a hacker like feel. Make some binary animation run in background. Make everything in Neon green colour. The Access Granted or Wrong Password should be displayed on the web page itself not as a seperate popup.
Output: Here's the updated code using Tailwind CSS, with the requested changes:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Protected Website</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');
body {
background-color: black;
font-family: 'Roboto Mono', monospace;
}
.binary-animation {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0.1;
z-index: -1;
background-image: url('https://media.giphy.com/media/l1KVboXQeiaX5xkLS/giphy.gif');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.neon-green {
color: #0ff;
}
.neon-green-border {
border-color: #0ff;
}
.neon-green-bg {
background-color: #0ff;
}
.neon-green-bg:hover {
background-color: #00cccc;
}
</style>
</head>
<body class="flex items-center justify-center min-h-screen">
<div class="binary-animation"></div>
<div class="password-container bg-black bg-opacity-80 p-8 rounded-md text-center">
<h1 class="text-4xl neon-green">Confidential Database</h1>
<label for="password" class="block mt-4 neon-green">Enter Password:</label>
<input type="password" id="password" class="block w-full mt-2 p-2 neon-green neon-green-border bg-transparent rounded-md" />
<button onclick="checkPassword()" class="block w-full mt-4 py-2 neon-green-bg neon-green-bg:hover text-black font-bold rounded-md">Submit</button>
<p id="message" class="mt-4 neon-green"></p>
</div>
<script>
function checkPassword() {
const passwordInput = document.getElementById('password');
const message = document.getElementById('message');
const correctPassword = 'Mafia2003';
if (passwordInput.value === correctPassword) {
message.textContent = 'Access Granted';
const embedCode = '<iframe width="981" height="552" src="https://www.youtube.com/embed/xvFZjo5PgG0?autoplay=1" title="Rick Roll (Different link + no ads)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>';
document.body.innerHTML = embedCode;
} else {
message.textContent = 'Wrong password';
}
}
</script>
</body>
</html>
This code includes the Tailwind CSS framework, a binary animation background, neon green colors, and a hacker-like feel. The "Access Granted" or "Wrong Password" messages will now be displayed on the web page itself, and the video will autoplay when the correct password is entered.
Copy and paste the code into an HTML file and open it in your browser to see the updated design and functionality.
I have changed the gif.
That's it! Enjoy :)