code for atlantean button
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Story Button</title>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh; /* Allows content to expand */
background-color: #000000; /* Black background to match site */
margin: 0;
font-family: Arial, sans-serif;
padding-top: 40px; /* Prevents overlap with navigation */
}
.button-container {
display: flex;
align-items: center;
gap: 10px; /* Space between hearts and button */
}
.story-button {
background-color: #4b0082; /* Indigo */
color: #FFFF00; /* Yellow text */
font-size: 18px;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
box-shadow: 0 0 15px rgba(255, 215, 0, 0.9); /* Golden glow */
transition: transform 0.2s, box-shadow 0.2s;
}
.story-button:hover {
transform: scale(1.05); /* Slight grow on hover */
box-shadow: 0 0 20px rgba(255, 215, 0, 1); /* Brighter glow */
}
.heart-icon {
font-size: 24px;
color: #4b0082; /* Indigo hearts */
text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); /* Golden glow */
}
.popup {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
max-width: 400px;
width: 90%;
z-index: 10;
}
.popup-content {
margin-bottom: 20px;
max-height: 300px;
overflow-y: auto;
}
.popup button {
background-color: #4b0082; /* Indigo */
color: #FFFF00; /* Yellow text */
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
.popup button:hover {
background-color: #ccac00; /* Darker gold */
}
.overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 5;
}
</style>
</head>
<body>
<div class="button-container">
<span class="heart-icon">♥</span>
<button class="story-button" onclick="openPopup('popup1')">[Your button name goes here]</button>
<span class="heart-icon">♥</span>
</div>
<div class="overlay" id="overlay"></div>
<div class="popup" id="popup1">
<div class="popup-content">[Your story for this button goes here]</div>
<button onclick="closePopup('popup1')">Close</button>
</div>
<script>
function openPopup(popupId) {
const popup = document.getElementById(popupId);
const overlay = document.getElementById('overlay');
if (!popup || !overlay) {
console.error(`Element missing: popup=${popup}, overlay=${overlay}`);
alert('Error: Popup or overlay not found. Check console.');
return;
}
popup.style.display = 'block';
overlay.style.display = 'block';
}
function closePopup(popupId) {
const popup = document.getElementById(popupId);
const overlay = document.getElementById('overlay');
if (!popup || !overlay) {
console.error(`Element missing: popup=${popup}, overlay=${overlay}`);
return;
}
popup.style.display = 'none';
overlay.style.display = 'none';
}
</script>
</body>
</html>
Comments
Post a Comment