feat: Create initial web page with HTML, CSS, and JavaScript for dynamic greeting color.
This commit is contained in:
20
index.html
Normal file
20
index.html
Normal 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
6
script.js
Normal 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
33
style.css
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user