Spaces:
Running
Running
| <html lang="tr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Admin Giriş</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: #000000; | |
| color: #ffffff; | |
| min-height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| padding: 20px; | |
| } | |
| .container { | |
| background: #1a1a1a; | |
| border: 1px solid #333; | |
| padding: 60px 40px; | |
| max-width: 500px; | |
| width: 100%; | |
| } | |
| h1 { | |
| color: #ffffff; | |
| margin-bottom: 30px; | |
| font-size: 2em; | |
| text-align: center; | |
| } | |
| .form-group { | |
| margin-bottom: 20px; | |
| } | |
| label { | |
| display: block; | |
| margin-bottom: 8px; | |
| color: #ccc; | |
| font-weight: 600; | |
| } | |
| input[type="text"], | |
| input[type="password"] { | |
| width: 100%; | |
| padding: 15px; | |
| border: 1px solid #444; | |
| background: #333; | |
| color: #fff; | |
| border-radius: 10px; | |
| font-size: 1em; | |
| box-sizing: border-box; | |
| } | |
| input:focus { | |
| outline: none; | |
| border-color: #fff; | |
| } | |
| button { | |
| width: 100%; | |
| background: #fff; | |
| color: #000; | |
| padding: 15px 30px; | |
| border: 1px solid #fff; | |
| border-radius: 10px; | |
| font-size: 1.1em; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: transform 0.2s; | |
| margin-top: 10px; | |
| } | |
| button:hover { | |
| transform: translateY(-2px); | |
| background: #ccc; | |
| border-color: #ccc; | |
| } | |
| .error { | |
| color: #dc3545; | |
| margin-top: 15px; | |
| text-align: center; | |
| font-size: 0.9em; | |
| } | |
| .back-link { | |
| text-align: center; | |
| margin-top: 20px; | |
| } | |
| .back-link a { | |
| color: #888; | |
| text-decoration: none; | |
| } | |
| .back-link a:hover { | |
| color: #fff; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>🔐 Admin Giriş</h1> | |
| <div class="form-group"> | |
| <label for="username">Kullanıcı Adı:</label> | |
| <input type="text" id="username" placeholder="Kullanıcı adı"> | |
| </div> | |
| <div class="form-group"> | |
| <label for="password">Şifre:</label> | |
| <input type="password" id="password" placeholder="Şifre"> | |
| </div> | |
| <button onclick="login()">Giriş Yap</button> | |
| <div id="error" class="error" style="display: none;"></div> | |
| <div class="back-link"> | |
| <a href="index.html">← Ana Sayfa</a> | |
| </div> | |
| </div> | |
| <script> | |
| function login() { | |
| const username = document.getElementById('username').value; | |
| const password = document.getElementById('password').value; | |
| const errorDiv = document.getElementById('error'); | |
| // Basit doğrulama (gerçek uygulamada server-side doğrulama gerekir) | |
| if (username === 'elife' && password === 'elife123') { | |
| localStorage.setItem('adminLoggedIn', 'true'); | |
| localStorage.setItem('loginTime', new Date().toISOString()); | |
| window.location.href = 'admin.html'; | |
| } else { | |
| errorDiv.textContent = 'Kullanıcı adı veya şifre hatalı!'; | |
| errorDiv.style.display = 'block'; | |
| } | |
| } | |
| // Enter tuşu ile giriş | |
| document.addEventListener('keypress', function(e) { | |
| if (e.key === 'Enter') { | |
| login(); | |
| } | |
| }); | |
| // Zaten giriş yapılmış mı kontrol et | |
| window.onload = function() { | |
| if (localStorage.getItem('adminLoggedIn') === 'true') { | |
| window.location.href = 'admin.html'; | |
| } | |
| }; | |
| </script> | |
| </body> | |
| </html> | |