Haan, Firebase Authentication ya Google OAuth ke sath tum HTML & CSS apne hisaab se bana sakte ho.
🔥 Apne According Login/Signup Page Kaise Banaye?
Tum apna custom HTML, CSS aur JavaScript ka use karke ek stylish login/signup page bana sakte ho aur Firebase authentication ka backend logic add kar sakte ho.
✅ Example: Custom HTML & CSS Login Form (Firebase ke sath)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login / Signup</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f4f4f4;
text-align: center;
margin: 50px;
}
.container {
background: white;
padding: 20px;
width: 300px;
margin: auto;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
border-radius: 8px;
}
input {
width: 90%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 5px;
}
button {
width: 100%;
padding: 10px;
background: #28a745;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background: #218838;
}
</style>
</head>
<body>
<div class="container">
<h2>Login / Signup</h2>
<input type="email" id="email" placeholder="Enter Email">
<input type="password" id="password" placeholder="Enter Password">
<button onclick="signUp()">Sign Up</button>
<button onclick="signIn()">Login</button>
<button onclick="signOut()">Logout</button>
</div>
<script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.6.1/firebase-auth.js"></script>
<script>
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.appspot.com",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
};
firebase.initializeApp(firebaseConfig);
function signUp() {
var email = document.getElementById("email").value;
var password = document.getElementById("password").value;
firebase.auth().createUserWithEmailAndPassword(email, password)
.then((userCredential) => alert("Signup Successful!"))
.catch((error) => alert(error.message));
}
function signIn() {
var email = document.getElementById("email").value;
var password = document.getElementById("password").value;
firebase.auth().signInWithEmailAndPassword(email, password)
.then((userCredential) => alert("Login Successful!"))
.catch((error) => alert(error.message));
}
function signOut() {
firebase.auth().signOut().then(() => alert("Logged Out!"));
}
</script>
</body>
</html>
⚡ Features:
✅ Custom HTML & CSS se apni marzi ka design bana sakte ho
✅ Firebase Auth ka backend use kiya gaya hai
✅ Login, Signup aur Logout button hai
✅ Completely Responsive (Mobile-Friendly)
Agar tumhe aur advanced UI chahiye to Bootstrap ya Tailwind CSS ka bhi use kar sakte ho.
Agar tum Blogger me use karna chahte ho, to ise ek HTML/JavaScript Widget me paste kar do. 🚀