Skip to content

Commit

Permalink
Add love me folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincerro committed Jan 11, 2024
1 parent 3581802 commit 809009e
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
18 changes: 18 additions & 0 deletions love-me/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>¿Me amas?</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="content">
<p id="question">¿Me amas?</p>
<button id="yesButton">¡Si, con locura!</button>
<button id="noButton">No</button>
<p id="responseMessage" style="display:none;">¡Yo tambien te amo!</p>
</div>
<script src="script.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions love-me/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
document.getElementById('noButton').addEventListener('mouseover', function() {
this.style.position = 'absolute';
this.style.top = Math.random() * window.innerHeight + 'px';
this.style.left = Math.random() * window.innerWidth + 'px';
});

document.getElementById('yesButton').addEventListener('click', function() {
document.getElementById('yesButton').style.display = 'none';
document.getElementById('noButton').style.display = 'none';
document.getElementById('responseMessage').style.display = 'block';
});
41 changes: 41 additions & 0 deletions love-me/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: Arial, sans-serif;
margin: 0;
background-color: #f0f0f0; /* Light grey background */
}

#content {
text-align: center;
padding: 10px; /* Added padding for smaller screens */
}

#question {
font-size: 24px;
margin-bottom: 20px;
}

button {
font-size: 20px;
padding: 10px 20px;
margin: 5px;
cursor: pointer;
background-color: #fff; /* White background for buttons */
border: 1px solid #ddd; /* Light grey border */
border-radius: 5px; /* Rounded corners */
}

#responseMessage {
font-size: 20px;
color: #4CAF50; /* Green color for the response message */
}

/* Media query for smaller screens */
@media (max-width: 600px) {
#question, button, #responseMessage {
font-size: 18px; /* Smaller font size for smaller screens */
}
}

0 comments on commit 809009e

Please sign in to comment.