Skip to content

Commit 79e6b08

Browse files
authored
index.html
1 parent a3de8aa commit 79e6b08

1 file changed

Lines changed: 35 additions & 9 deletions

File tree

index.html

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,44 @@
3939
margin-bottom: 20px;
4040
}
4141

42+
.flicker {
43+
font-size: 1.2rem;
44+
animation: flicker 1.5s infinite;
45+
cursor: pointer;
46+
}
47+
@keyframes flicker {
48+
0%, 100% { opacity: 1; }
49+
50% { opacity: 0.2; }
50+
}
51+
52+
/* White background screens */
53+
.white-bg {
54+
background: white;
55+
color: black;
56+
height: 100vh;
57+
width: 100vw;
58+
position: fixed;
59+
top: 0;
60+
left: 0;
61+
display: flex;
62+
justify-content: center;
63+
align-items: center;
64+
flex-direction: column;
65+
}
66+
4267
button, .done-btn {
4368
padding: 10px 20px;
4469
border: none;
45-
background: white;
46-
color: #333;
70+
background: black;
71+
color: white;
4772
font-size: 1rem;
4873
border-radius: 10px;
4974
cursor: pointer;
5075
transition: 0.3s;
76+
margin-left: 5px;
5177
}
5278
button:hover, .done-btn:hover {
53-
background: #ddd;
79+
background: #333;
5480
}
5581

5682
.input-box {
@@ -62,7 +88,7 @@
6288
input {
6389
padding: 10px;
6490
font-size: 1rem;
65-
border: none;
91+
border: 2px solid black;
6692
border-radius: 10px 0 0 10px;
6793
outline: none;
6894
}
@@ -75,11 +101,11 @@
75101
<!-- Screen 1 -->
76102
<div id="welcomeScreen" class="screen active fade">
77103
<h1>Welcome</h1>
78-
<button onclick="goToName()">Next</button>
104+
<p class="flicker" onclick="goToName()">Click on screen for next</p>
79105
</div>
80106

81107
<!-- Screen 2 -->
82-
<div id="nameScreen" class="screen fade">
108+
<div id="nameScreen" class="screen fade white-bg">
83109
<h1>Provide us your name, for better conversation</h1>
84110
<div class="input-box">
85111
<input type="text" id="username" placeholder="Enter your name">
@@ -88,9 +114,8 @@ <h1>Provide us your name, for better conversation</h1>
88114
</div>
89115

90116
<!-- Screen 3 -->
91-
<div id="dashboard" class="screen fade">
117+
<div id="dashboard" class="screen fade white-bg">
92118
<h1 id="greeting"></h1>
93-
<p>🎉 This is your main dashboard</p>
94119
</div>
95120

96121
<script>
@@ -105,7 +130,7 @@ <h1 id="greeting"></h1>
105130
}, 1000);
106131
}
107132

108-
// Next button
133+
// Next (welcome → name screen)
109134
function goToName() {
110135
fadeOutIn("welcomeScreen", "nameScreen");
111136
}
@@ -124,6 +149,7 @@ <h1 id="greeting"></h1>
124149
window.onload = function() {
125150
let savedName = localStorage.getItem("userName");
126151
if (savedName) {
152+
document.body.style.background = "white";
127153
document.getElementById("welcomeScreen").classList.remove("active", "show");
128154
document.getElementById("dashboard").classList.add("active", "show");
129155
document.getElementById("greeting").innerText = "Hello, " + savedName + "!";

0 commit comments

Comments
 (0)