feat: Create initial web page with HTML, CSS, and JavaScript for dynamic greeting color.

This commit is contained in:
almazlar
2026-02-07 19:31:24 +03:00
parent 4ade568a7e
commit 4b280514c4
3 changed files with 59 additions and 0 deletions

20
index.html Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>almazlar.com | Hoş Geldiniz</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 id="greeting">Yayında!</h1>
<p>Docker ile servis ediliyor.</p>
<button onclick="changeColor()">Rengi Değiştir</button>
</div>
<script src="script.js"></script>
</body>
</html>

6
script.js Normal file
View File

@@ -0,0 +1,6 @@
function changeColor() {
const title = document.getElementById('greeting');
const colors = ['#00ff88', '#ff0088', '#0088ff', '#ffff00'];
const randomColor = colors[Math.floor(Math.random() * colors.length)];
title.style.color = randomColor;
}

33
style.css Normal file
View File

@@ -0,0 +1,33 @@
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #1a1a1a;
color: white;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
text-align: center;
padding: 2rem;
border: 2px solid #00ff88;
border-radius: 15px;
background: #2a2a2a;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
button {
background-color: #00ff88;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
margin-top: 15px;
}
button:hover {
background-color: #00cc6e;
}