create a webpage for a checklist for things to check… · The Chat Archive
Below is a single HTML file which includes styles and animations to create a modern-looking webpage for a checklist before merging organizations. This page uses JavaScript to check the answers and display a message if any answer is "Yes".
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(to right, #00c6ff, #0072ff);
color: #fff;
text-align: center;
padding: 50px;
margin: 0;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
animation: fadeIn 2s;
}
.checklist {
max-width: 500px;
margin: auto;
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
animation: bounceIn 1s;
}
.item {
margin: 15px 0;
display: flex;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
animation: slideIn 1s;
}
button {
margin-top: 20px;
padding: 10px 20px;
background: #fff;
border: none;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
transition: background 0.3s;
}
button:hover {
background: #ddd;
}
@keyframes bounceIn {
from {
transform: scale(0.5);
}
to {
transform: scale(1);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.message {
margin-top: 30px;
font-size: 1.2em;
animation: fadeIn 1s;
display: none;
}
</style>
</head>
<body>
<h1>Pre-Merge Checklist</h1>
<div class="checklist">
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<button onclick="checkAnswers()">Check Merge Eligibility</button>
<div class="message" id="message">
The organization cannot be merged into another organization.
</div>
</div>
<script>
function checkAnswers() {
const answers = document.querySelectorAll('.answer');
const message = document.getElementById('message');
let cannotMerge = false;
for (let i = 0; i < answers.length; i += 2) {
if (answers[i].checked) { // Check if "Yes" is selected
cannotMerge = true;
break;
}
}
if (cannotMerge) {
message.style.display = 'block';
} else {
message.style.display = 'none';
alert('The organization can be merged.');
}
}
// Ensure only one checkbox can be selected per question
const items = document.querySelectorAll('.item');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', (e) => {
if (e.target.checked) {
checkboxes.forEach(box => {
if (box !== e.target) box.checked = false;
});
}
});
});
});
</script>
</body>
</html>
This code creates a checklist with options for "Yes" and "No" using checkboxes. When the "Check Merge Eligibility" button is clicked, it displays a message if any of the "Yes" options are selected, indicating that the organization cannot be merged. The design includes animations for elements fading and sliding in, and a simple style using a gradient background.
can you align the check boxes at the left side? also can you blur out options that has answer already. also can you show the merge eligibility status realtime without the need to click on the button also can you add moving animation on the background to make it more beautiful perhaps moving gradient color or something.
Assistant2024-11-20 22:44 UTC Copy response
Certainly! I've adjusted the HTML, CSS, and JavaScript to align the checkboxes to the left, blur out the options once an answer is selected, and provide real-time feedback on the merge eligibility status. The background now has an animated gradient to enhance the visual appeal.
can you show this The organization cannot be merged into another organization. in red color so its more noticable maybe its better to show it as popout in the middle what do you think? ( you may do what ever you think would be better) Can you also use beautiful font styles (also if possible add moving ray of lights in the background to make the animations more beautiful.)
Assistant2024-11-20 22:46 UTC Copy response
Certainly! I'll enhance the visibility of the message by styling it in red and positioning it as a modal pop-up in the middle of the screen. Additionally, I'll integrate a beautiful font and add a moving ray of light effect in the background for visual appeal. Let's integrate these changes:
Show full message · 249 lines reduce the amount of ray of lights maybe max or 3 lights cause its now making the page lag so much and its too bright overlapping the check boxes and question (maybe put the ray of light in the background along with the moving gradient animation also can you make the color theme into violet and pink
Assistant2024-11-20 22:49 UTC Copy response
Certainly! I'll dial back the number of 'ray of lights' to reduce the load and move it into the background along with the gradient animation. I'll adjust the color scheme to use shades of violet and pink, creating a more harmonious and less intrusive visual experience.
Here's the updated code:
Show full message · 249 lines remove the ray of lights and can you use this for the background animation instead
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200 ');
body {
background-image: url('https://static.pexels.com/photos/414171/pexels-photo-414171.jpeg ');
background-size:cover;
-webkit-animation: slidein 100s;
animation: slidein 100s;
code Copy code
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation-direction: alternate;
}
@-webkit-keyframes slidein {
from {background-position: top; background-size:3000px; }
to {background-position: -100px 0px;background-size:2750px;}
}
@keyframes slidein {
from {background-position: top;background-size:3000px; }
to {background-position: -100px 0px;background-size:2750px;}
}
.center
{
display: flex;
align-items: center;
justify-content: center;
position: absolute;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(75, 75, 250, 0.3);
border-radius: 3px;
}
.center h1{
text-align:center;
color:white;
font-family: 'Source Code Pro', monospace;
text-transform:uppercase;
}
Show full message · 53 lines Assistant2024-11-20 22:53 UTC Copy response
Certainly! Let's integrate the specified background animation and update the HTML file accordingly. This will replace the gradient animation with a background image animation effect. The new style will also use the "Source Code Pro" font as requested. Here is the revised webpage code:
Show full message · 202 lines Pug
var num = 20;
for (var i = 0; i < num; i++) {
div(class="pattern"+i+" fireworks fire"+i)
.ring_1
.ring_2
}
Sass
@import compass
@import compass/css3/animation
$num: 20
html
overflow: hidden
height: 100%
background: radial-gradient(ellipse at bottom, #192E47 0%, #030617 100%)
@function shadowValue(r a d i u s , radius, r a d i u s , cosV,s i n V , sinV, s inV , bokeh,l i n e C o l o r ) lineColor)
l in e C o l or ) value: '#{(r a d i u s ∗ radius* r a d i u s ∗ cosV)}px #{(r a d i u s ∗ radius* r a d i u s ∗ sinV)}px #{bokeh}px #{ lineColor}'
value: '#{ value} ,#{((r a d i u s − 1 ) ∗ radius - 1)* r a d i u s − 1 ) ∗ cosV)}px #{((r a d i u s − 1 ) ∗ radius - 1)* r a d i u s − 1 ) ∗ sinV)}px #{bokeh}px #{ lineColor}'
r a d i u s : radius: r a d i u s : radius / 1.8
value: '#{ value} ,#{(r a d i u s ∗ radius* r a d i u s ∗ cosV)}px #{(r a d i u s ∗ radius* r a d i u s ∗ sinV)}px #{bokeh}px #{ lineColor}'
value: '#{ value} ,#{((r a d i u s − 1 ) ∗ radius - 1)* r a d i u s − 1 ) ∗ cosV)}px #{((r a d i u s − 1 ) ∗ radius - 1)* r a d i u s − 1 ) ∗ sinV)}px #{bokeh}px #{ lineColor}'
r a d i u s : radius: r a d i u s : radius / 2
value: '#{ value} ,#{(r a d i u s ∗ radius* r a d i u s ∗ cosV)}px #{(r a d i u s ∗ radius* r a d i u s ∗ sinV)}px #{bokeh}px #{ lineColor}'
r a d i u s : radius: r a d i u s : radius / 10
value: '#{ value} ,#{(r a d i u s ∗ radius* r a d i u s ∗ cosV)}px #{(r a d i u s ∗ radius* r a d i u s ∗ sinV)}px #{bokeh}px #{ lineColor}'
@return unquote($value)
@function ringEffect (n , n, n , radius,b o k e h , bokeh, b o k e h , lineColor)
value: '0px 0px #FFF'
@for i from 0 through n n
n radian: (360/n ) ∗ n)* n ) ∗ i * pi() / 180
value: '#{ value} , #{shadowValue(r radian),sin( bokeh, value)
@for i f r o m 0 t h r o u g h i from 0 through i f r o m 0 t h r o ug h num
.fire#{i}
rand1: random(100) + '%'
rand2: random(100) + '%'
top: #{ rand1}
left: #{$rand2}
code Copy code
$color: unquote('hsl(#{random(240)},70%,70%)')
.ring_1
width: 1px
height: 1px
box-shadow: ringEffect(30,30,0,#{$color})
.ring_2
width: 1px
height: 1px
box-shadow: ringEffect(30,30,2,#{$color})
.fireworks
opacity: 0
position: absolute
b a s e t i m e : 0 @ f o r basetime: 0
@for ba se t im e : 0@ f or i from 0 through n u m num
n u m basetime : b a s e t i m e ∗ 2 @ i f basetime * 2
@if ba se t im e ∗ basetime == 0
i}
@include animation(pattern#{$i} #{(random(8) + 2)}s ease infinite)
@include keyframes(pattern#{i})
scale: random(7)
0%
opacity: 0
40%
opacity: 0
@include transform(scale(0.1))
50%
opacity: 1
100%
@include transform(scale(#{$scale}))
opacity: 0
use ths for the background animation instead
Show full message · 87 lines Assistant2024-11-20 22:56 UTC Copy response
To integrate the Pug and Sass code for the fireworks background animation, you'll need to follow these steps to compile and integrate them into your project:
Step 1: Setup Pug and Sass
Ensure you have a build process set up to compile Pug and Sass into HTML and CSS. You can use tools like Gulp, Webpack, or simply Node scripts with packages like pug and sass (or node-sass).
Step 2: Pug Template
Using your provided Pug template will generate HTML structure for the fireworks animation. Here's how the Pug code would be used:
pug Copy code
- var num = 20;
- for (var i = 0; i < num; i++) {
div(class="pattern"+i+" fireworks fire"+i)
.ring_1
.ring_2
- }
This Pug template creates 20 div elements with classes for CSS styling.
Step 3: Sass Styles
Here's how you can use the provided Sass code to create the necessary CSS for animating the fireworks:
can you incorporate all of this into a single html file?
Assistant2024-11-20 22:57 UTC Copy response
Sure, you can incorporate all of this into a single HTML file by using embedded styles to handle your CSS and inline a simplified version of Pug-generated HTML directly. It's important to note that we cannot directly compile Pug or Sass in the browser, so I'll convert it manually for you.
Here's how you can create a self-contained HTML file with a fireworks background animation:
code Copy code
body {
background-image: url('https://static.pexels.com/photos/414171/pexels-photo-414171.jpeg');
background-size: cover;
-webkit-animation: slidein 100s;
animation: slidein 100s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation-direction: alternate;
text-align: center;
padding: 50px;
margin: 0;
overflow: hidden;
color: #fff;
font-family: 'Source Code Pro', monospace;
}
@-webkit-keyframes slidein {
from {background-position: top; background-size:3000px;}
to {background-position: -100px 0px; background-size:2750px;}
}
@keyframes slidein {
from {background-position: top; background-size:3000px;}
to {background-position: -100px 0px; background-size:2750px;}
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(75, 75, 250, 0.3);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 10;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
Show full message · 253 lines Assistant2024-11-20 23:00 UTC Copy response
To incorporate the new background effect using <css-doodle>, you first need to integrate that component into your HTML file. css-doodle is a web component that allows for generative design elements in CSS, and you need to include the css-doodle library in your HTML. Here’s how you can integrate it with your current setup:
To use css-doodle, you'll have to include the script for the library, which can be fetched from a CDN. Here’s the revised HTML file including css-doodle for the background animation:
Show full message · 236 lines replace the background animation to this
HTML
SCSS
html,
body {
margin: 0;
height: 100%;
}
/* ............................................................... /
/ ............................................................... /
/ ............................................................... */
#retrobg {
position: relative;
overflow: hidden;
height: 100%;
color: #a3c;
background-color: #000;
}
/* ............................................................... */
#retrobg-sky {
position: absolute;
display: flex;
align-items: flex-end;
justify-content: center;
top: 0;
width: 100%;
height: 55%;
background: linear-gradient( #214 75%, #249 );
}
/* ............................................................... */
#retrobg-sunWrap {
position: relative;
width: 40%;
margin-bottom: -15%;
}
#retrobg-sun {
--glow-color: #d44;
padding-top: 100%;
border-radius: 50%;
background-image: linear-gradient( #fcdf11, #ff623f, #fe2085 50% );
box-shadow: 0 0 160px 80px var( --glow-color );
animation: 2s ease infinite alternate retrobg-sun-glow-anim;
}
.retrobg-shutdown #retrobg-sun {
background-image: linear-gradient( #000, #000 40% );
--glow-color: #000;
}
@keyframes retrobg-sun-glow-anim {
from { box-shadow: 0 0 160px 80px var( --glow-color ); }
to { box-shadow: 0 0 200px 95px var( --glow-color ); }
}
/* ............................................................... */
#retrobg-stars {
position: absolute;
width: 100%;
height: 100%;
}
.retrobg-star {
position: absolute;
border-radius: 50%;
width: 2px;
height: 2px;
background-color: #fff;
}
/* ............................................................... */
#retrobg-mountains {
position: absolute;
width: 100%;
height: 30%;
}
.retrobg-mountain {
position: absolute;
width: 30%;
height: 100%;
background-image: linear-gradient( #000 70%, #111 85%, #fff1 );
}
#retrobg-mountains-left { left: 0; clip-path: polygon( 0% 100%,0% 55%,5% 60%,10% 55%,20% 50%,25% 42%,30% 38%,33% 35%,40% 45%,50% 50%,60% 70%,70% 85%,75% 82%,80% 91%,85% 90%,90% 95%,95% 98%,100% 100% ); }
#retrobg-mountains-right { right: 0; clip-path: polygon( 0% 100%,5% 95%,10% 85%,15% 87%,20% 80%,25% 78%,30% 65%,40% 70%,50% 57%,60% 53%,67% 68%,70% 70%,75% 66%,80% 55%,90% 50%,95% 60%,100% 57%,100% 100% ); }
/* ............................................................... */
#retrobg-cityWrap {
position: absolute;
width: 50%;
margin-left: -1%;
}
#retrobg-city {
padding-top: 20%;
}
.retrobg-building {
position: absolute;
width: 5%;
height: 100%;
bottom: 0;
border-radius: 4px 4px 0 0;
background-image: linear-gradient( 0deg, rgba( 17, 17, 34, 0 ), #112 30px, #000 );
}
.retrobg-building:nth-child( odd ) {
background-image: linear-gradient( 0deg, rgba( 24, 24, 42, 0 ), #223 30px, #000 );
}
.retrobg-antenna::after {
content: "";
position: absolute;
left: 50%;
margin-left: calc( -1px - 5% );
bottom: 100%;
width: 10%;
min-width: 2px;
height: 33%;
background-color: #000;
}
/* ............................................................... */
#retrobg-ground {
position: absolute;
overflow: hidden;
width: 100%;
height: 45%;
bottom: 0;
border-top: 2px solid #bf578c;
background-color: #000;
}
.retrobg-shutdown #retrobg-ground {
border-color: #000;
}
#retrobg-groundShadow {
position: absolute;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient( #000 0%, transparent );
}
Show full message · 331 lines Assistant2024-11-20 23:03 UTC Copy response
To integrate the provided retro background animation into the existing HTML file, you'll need to embed the HTML structure for the background and incorporate the CSS necessary for styling. Below, I'll merge these elements into a single HTML file, adapting the background to fit with your pre-merge checklist setup:
Show full message · 523 lines the checklist is below the animated background make it move into the center at the front of the animated background
Assistant2024-11-20 23:06 UTC Copy response
To ensure the checklist appears centered and in front of the animated background, we can make a couple of adjustments to the CSS. The checklist will need to be absolutely positioned and layered above the background using CSS z-index.
Here’s how you can adjust the HTML and CSS to achieve that effect:
Show full message · 529 lines the design is good now just add corresponding pop out message that the org is okay to merge into other orgs in green colors if all the answer is no. Also put footer saying this webpage is created by Ruel Olleta
Assistant2024-11-20 23:11 UTC Copy response
Sure! Let's modify the JavaScript to add a pop-up message indicating that the organization is okay to merge when all checkboxes are "No". We'll ensure the modal message is styled in green for this condition. Additionally, we'll add a footer to give credit to Ruel Olleta.
Here's the updated code:
Show full message · 562 lines revise the page to only show this message whenever the user chose no on all the questions dont show this message yet when theres questions not answered yet
The organization is okay to merge into other organizations
Assistant2024-11-20 23:15 UTC Copy response
To ensure the message "The organization is okay to merge into other organizations" is only displayed after all questions have been answered with "No", we need to enhance the logic to check completeness before showing the message. Here's the updated HTML file with these changes:
Show full message · 548 lines Not yet included in a published release.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@keyframes gradientBackground {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(270deg, #00c6ff, #0072ff, #ff6ec4);
background-size: 600% 600%;
color: #fff;
text-align: center;
padding: 50px;
margin: 0;
animation: gradientBackground 15s ease infinite;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
animation: fadeIn 2s;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
animation: bounceIn 1s;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
animation: slideIn 1s;
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.message {
margin-top: 20px;
font-size: 1.2em;
animation: fadeIn 1s;
color: #ffeb3b;
}
@keyframes bounceIn {
from {
transform: scale(0.5);
}
to {
transform: scale(1);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<h1>Pre-Merge Checklist</h1>
<div class="checklist">
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer"> Yes
</label>
<label>
<input type="checkbox" class="answer"> No
</label>
</div>
<div class="message" id="message">
The organization cannot be merged into another organization.
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
const checkMergeEligibility = () => {
let cannotMerge = Array.from(checkboxes).some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
const message = document.getElementById('message');
message.style.display = cannotMerge ? 'block' : 'none';
items.forEach(item => item.classList.remove('blurred'));
};
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
checkMergeEligibility();
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
}
});
});
});
</script>
</body>
</html>
Checkboxes are aligned to the left using flexbox properties.
Once a checkbox is selected, the non-selected options are blurred out to prevent further selection changes on the same question.
The message indicating the organization's inability to merge is shown or hidden in real-time without needing a button click.
The background gradient smoothly transitions between colors, creating a dynamic and visually appealing effect.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap');
@keyframes gradientBackground {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
@keyframes rayAnimation {
0% { background-position: -100% 0; }
100% { background-position: 100% 0; }
}
body {
font-family: 'Montserrat', sans-serif;
background: linear-gradient(270deg, #00c6ff, #0072ff, #ff6ec4, #ff98a8);
background-size: 600% 600%;
color: #fff;
text-align: center;
padding: 50px;
margin: 0;
overflow: hidden;
animation: gradientBackground 15s ease infinite;
position: relative;
}
::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
background: radial-gradient(circle, transparent, rgba(255, 255, 255, 0.2), transparent);
background-size: 200% 200%;
animation: rayAnimation 8s linear infinite;
pointer-events: none;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
animation: fadeIn 2s;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
animation: bounceIn 1s;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
animation: slideIn 1s;
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 10;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
animation: fadeIn 1s;
}
@keyframes bounceIn {
from {
transform: scale(0.5);
}
to {
transform: scale(1);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<h1>Pre-Merge Checklist</h1>
<div class="checklist" id="checklist">
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
if (cannotMerge) {
const checklist = document.getElementById('checklist');
if (!checklist.contains(modal)) {
checklist.appendChild(modal);
}
}
}
</script>
</body>
</html>
Key Enhancements:
Modal Popup: The message regarding the merge status is displayed in a central modal, making it more noticeable with enhanced red color styling.
Beautiful Font: The Montserrat font from Google Fonts gives a more polished look by replacing the default font.
Ray of Light Animation: A moving 'ray of lights' animation is added with a radial gradient overlay, creating more dynamic background visuals.
These changes collectively enhance both the functionality and appearance of your webpage, providing a modern and visually stimulating user experience.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap');
@keyframes gradientBackground {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
@keyframes rayAnimation {
0% { background-position: 0%; }
100% { background-position: 200%; }
}
body {
font-family: 'Montserrat', sans-serif;
background: linear-gradient(270deg, #ff00cc, #3333ff, #cc33ff) no-repeat fixed;
background-size: 600% 600%;
color: #fff;
text-align: center;
padding: 50px;
margin: 0;
overflow: hidden;
animation: gradientBackground 20s ease infinite;
position: relative;
}
::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
opacity: 0.3;
background-repeat: no-repeat;
background-size: 300% 300%;
animation: rayAnimation 10s linear infinite;
pointer-events: none;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
animation: fadeIn 2s;
z-index: 10;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
animation: bounceIn 1s;
position: relative;
z-index: 10;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
animation: slideIn 1s;
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
animation: fadeIn 1s;
}
@keyframes bounceIn {
from {
transform: scale(0.5);
}
to {
transform: scale(1);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<h1>Pre-Merge Checklist</h1>
<div class="checklist" id="checklist">
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
</script>
</body>
</html>
Key Updates:
Background Optimization : The ray of light effect is simplified to minimize performance issues and provides a subtle glow. It's now integrated with the moving gradient background to reduce visual noise.
Color Scheme : Updated to a violet and pink theme for a soft yet striking appearance, using gradient transitions.
Font and Style Improvement : Maintained the Montserrat font for readability while ensuring contrast with the background to keep text clear.
These enhancements create an engaging yet performance-friendly visual experience.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
body {
background-image: url('https://static.pexels.com/photos/414171/pexels-photo-414171.jpeg');
background-size: cover;
-webkit-animation: slidein 100s;
animation: slidein 100s;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation-direction: alternate;
text-align: center;
padding: 50px;
margin: 0;
overflow: hidden;
color: #fff;
font-family: 'Source Code Pro', monospace;
}
@-webkit-keyframes slidein {
from {background-position: top; background-size:3000px;}
to {background-position: -100px 0px; background-size:2750px;}
}
@keyframes slidein {
from {background-position: top; background-size:3000px;}
to {background-position: -100px 0px; background-size:2750px;}
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(75, 75, 250, 0.3);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 10;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<h1>Pre-Merge Checklist</h1>
<div class="checklist" id="checklist">
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
</script>
</body>
</html>
Key Changes:
Background Animation: Integrated with the image animation, creating a dynamic effect as specified, while still allowing text and checklist visibility.
Font and Styles: Utilized the "Source Code Pro" font to provide a unique and modern look.
UI Changes: Maintained the checklist's readability by adjusting the color and transparency of the panel.
This layout ensures both a visually appealing design and clarity in displaying the checklist contents.
a d i u s , c o s ( radius,cos( r a d i u s , cos (
lineColor)}'
@return unquote(
2@
i
f
basetime: 3
.pattern#{
@import "compass";
@import "compass/css3/animation";
$num: 20;
html {
overflow: hidden;
height: 100%;
background: radial-gradient(ellipse at bottom, #192E47 0%, #030617 100%);
}
@function shadowValue($radius, $cosV, $sinV, $bokeh, $lineColor) {
$value: '#{($radius*$cosV)}px #{($radius*$sinV)}px #{$bokeh}px #{$lineColor}';
$value: '#{$value}, #{(($radius - 1) * $cosV)}px #{(($radius - 1) * $sinV)}px #{$bokeh}px #{$lineColor}';
$radius: $radius / 1.8;
$value: '#{$value}, #{($radius * $cosV)}px #{($radius * $sinV)}px #{$bokeh}px #{$lineColor}';
$value: '#{$value}, #{(($radius - 1) * $cosV)}px #{(($radius - 1) * $sinV)}px #{$bokeh}px #{$lineColor}';
$radius: $radius / 2;
$value: '#{$value}, #{($radius * $cosV)}px #{($radius * $sinV)}px #{$bokeh}px #{$lineColor}';
$radius: $radius / 10;
$value: '#{$value}, #{($radius * $cosV)}px #{($radius * $sinV)}px #{$bokeh}px #{$lineColor}';
@return unquote($value);
}
@function ringEffect($n, $radius, $bokeh, $lineColor) {
$value: '0px 0px #FFF';
@for $i from 0 through $n {
$radian: (360 / $n) * $i * pi() / 180;
$value: '#{$value}, #{shadowValue($radius, cos($radian), sin($radian), $bokeh, $lineColor)}';
}
@return unquote($value);
}
@for $i from 0 through $num {
.fire#{$i} {
$rand1: random(100) + '%';
$rand2: random(100) + '%';
top: #{$rand1};
left: #{$rand2};
$color: unquote('hsl(#{random(240)}, 70%, 70%)');
.ring_1 {
width: 1px;
height: 1px;
box-shadow: ringEffect(30, 30, 0, #{$color});
}
.ring_2 {
width: 1px;
height: 1px;
box-shadow: ringEffect(30, 30, 2, #{$color});
}
}
}
.fireworks {
opacity: 0;
position: absolute;
}
$basetime: 0;
@for $i from 0 through $num {
$basetime: $basetime * 2;
@if $basetime == 0 {
$basetime: 3;
}
.pattern#{$i} {
@include animation(pattern#{$i} #{(random(8) + 2)}s ease infinite);
}
@include keyframes(pattern#{$i}) {
$scale: random(7);
0% {
opacity: 0;
}
40% {
opacity: 0;
@include transform(scale(0.1));
}
50% {
opacity: 1;
}
100% {
@include transform(scale(#{$scale}));
opacity: 0;
}
}
}
Integration
Compile Pug to HTML : This will convert your Pug file to an HTML document which the browser can render.
Compile Sass to CSS : Use your Sass compiler to create a CSS file from this Sass code.
Link in HTML : Ensure your HTML file includes a link to the compiled CSS file.
Integrating in HTML After compiling the Pug and Sass, link the resulting CSS file in your HTML:
html Copy code
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Your compiled HTML from Pug will fit here -->
<div class="pattern0 fireworks fire0">
<div class="ring_1"></div>
<div class="ring_2"></div>
</div>
<!-- ... -->
</body>
</html>
This setup will create an animated background with fireworks styled and animated through the Sass animations defined. Make sure to adjust file paths and compilation details depending on your specific environment and tooling.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fireworks Background Animation</title>
<style>
body {
background-image: url('https://static.pexels.com/photos/414171/pexels-photo-414171.jpeg');
background-size: cover;
animation: slidein 100s alternate infinite forwards;
color: #fff;
overflow: hidden;
height: 100vh;
margin: 0;
font-family: 'Source Code Pro', sans-serif;
}
@keyframes slidein {
from {
background-position: top;
background-size: 3000px;
}
to {
background-position: -100px 0;
background-size: 2750px;
}
}
.fireworks {
opacity: 0;
position: absolute;
width: 1px;
height: 1px;
}
.ring_1, .ring_2 {
width: 1px;
height: 1px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@keyframes pattern {
0% { opacity: 0; transform: scale(0.1); }
40% { opacity: 0; transform: scale(0.1); }
50% { opacity: 1; }
100% { opacity: 0; transform: scale(1); }
}
/* Dynamic styles generated for each firework */
%dynamic-styles {
@for $i from 0 through 19 {
.fire#{$i} {
top: #{random(100)}%;
left: #{random(100)}%;
.ring_1 {
box-shadow: #{ringEffect(30, 30, 0, randomColor())};
}
.ring_2 {
box-shadow: #{ringEffect(30, 30, 2, randomColor())};
}
}
.pattern#{$i} {
animation: pattern #{random(8) + 2}s ease infinite;
}
}
}
/* Simplified CSS functions */
@function ringEffect($n, $radius, $bokeh, $lineColor) {
$value: '0px 0px #FFF, ';
@for $j from 0 through $n {
$radian: (360 / $n) * $j * pi() / 180;
$x: $radius * cos($radian);
$y: $radius * sin($radian);
$value: '#{$value}, #{$x}px #{$y}px #{$bokeh}px #{$lineColor}';
}
@return $value;
}
@function randomColor() {
@return hsl(random(360), 70%, 70%);
}
</style>
</head>
<body>
<!-- Manual conversion from Pug -->
<div class="fireworks fire0 pattern0">
<div class="ring_1"></div>
<div class="ring_2"></div>
</div>
<div class="fireworks fire1 pattern1">
<div class="ring_1"></div>
<div class="ring_2"></div>
</div>
<div class="fireworks fire2 pattern2">
<div class="ring_1"></div>
<div class="ring_2"></div>
</div>
<!-- Repeat this structure manually up to fire19 -->
<!-- For brevity, only demonstrating a few fires -->
<script>
// Randomize positions and colors in the absence of Sass logic
const fireworks = document.querySelectorAll('.fireworks');
fireworks.forEach(firework => {
const top = Math.random() * 100;
const left = Math.random() * 100;
const h = Math.floor(Math.random() * 360);
const color = `hsl(${h}, 70%, 70%)`;
firework.style.top = `${top}vh`;
firework.style.left = `${left}vw`;
firework.querySelector('.ring_1').style.boxShadow = ringEffect(30, 30, 0, color);
firework.querySelector('.ring_2').style.boxShadow = ringEffect(30, 30, 2, color);
});
function ringEffect(n, radius, bokeh, lineColor) {
let values = ['0px 0px #FFF'];
for (let j = 0; j <= n; j++) {
const radian = (360 / n) * j * Math.PI / 180;
const x = radius * Math.cos(radian);
const y = radius * Math.sin(radian);
values.push(`${x}px ${y}px ${bokeh}px ${lineColor}`);
}
return values.join(', ');
}
</script>
</body>
</html>
Explanation:
Pug to HTML : The HTML structure is manually translated from Pug, creating div elements for each firework with classes pattern0, pattern1, etc.
Sass Functions in JS : I created JavaScript versions of the Sass functions for generating random colors and positions.
Styling and Animation : CSS uses @keyframes to animate each firework, using random positions and colors determined by JavaScript, emulating the Sass logic.
This code provides a fireworks animation rendered with plain CSS and JavaScript, wrapped in a single HTML file for simpler deployment without server-side compilation. Note that for more extensive control, a build system would normally handle Sass and other resources externally.
code Copy code
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
</script>
can you change the background animation of this html file into something like this below
CSS
html, body {
height: 100%;
margin: 0;
overflow: hidden;
overflow: clip;
contain: content;
}
body {
display: flex;
align-items: center;
justify-content: center;
background: #000;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
html, body {
height: 100%;
margin: 0;
overflow: hidden;
contain: content;
}
body {
display: flex;
align-items: center;
justify-content: center;
background: #000;
color: #fff;
font-family: 'Source Code Pro', monospace;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(75, 75, 250, 0.3);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 10;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<css-doodle>
<style>
@grid: 50x1 / 50vmin;
:container {
perspective: 23vmin;
}
background: @m(
@r(200, 240),
radial-gradient(
@p(#00b8a9, #f8f3d4, #f6416c, #ffde7d) 15%,
transparent 50%
) @r(100%) @r(100%) / @r(1%, 3%) @lr no-repeat
);
@size: 80%;
@place-cell: center;
border-radius: 50%;
transform-style: preserve-3d;
animation: scale-up 20s linear infinite;
animation-delay: calc(@i * -.4s);
@keyframes scale-up {
0% {
opacity: 0;
transform: translate3d(0, 0, 0) rotate(0);
}
10% {
opacity: 1;
}
95% {
transform:
translate3d(0, 0, @r(50vmin, 55vmin))
rotate(@r(-360deg, 360deg));
}
100% {
opacity: 0;
transform: translate3d(0, 0, 1vmin);
}
}
</style>
</css-doodle>
<div class="checklist" id="checklist">
<h1>Pre-Merge Checklist</h1>
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
// Include the css-doodle library
document.write('<script src="https://unpkg.com/css-doodle@latest/css-doodle.min.js"><\/script>');
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
</script>
</body>
</html>
Key Integrations:
CSS Doodle : Added <css-doodle> to render complex CSS-based graphics.
Script Import : Dynamically loads the css-doodle JavaScript library needed to render the doodle.
With these updates, your background animation will display using css-doodle, creating a visually stimulating pattern. Be mindful of performance on lower-end devices because intense animations may impact rendering speed.
/* ............................................................... */
#retrobg-linesWrap {
height: 100%;
perspective: 1000px;
perspective-origin: center top;
}
#retrobg-lines {
position: absolute;
width: 100%;
height: 100%;
transform-origin: top center;
animation: .35s linear infinite retrobg-lines-anim;
}
.retrobg-shutdown #retrobg-lines {
animation-duration: 5s;
}
@keyframes retrobg-lines-anim {
from { transform: rotateX( 84deg ) translateY( 0 ); }
to { transform: rotateX( 84deg ) translateY( 100px ); }
}
#retrobg-hlines,
#retrobg-vlines {
position: absolute;
left: calc( ( 900% - 100% ) / -2 );
width: 900%;
height: 500%;
}
#retrobg-vlines {
display: flex;
justify-content: center;
}
.retrobg-hline,
.retrobg-vline {
width: 100%;
height: 100%;
background-color: currentColor;
}
.retrobg-hline { height: 3px; }
.retrobg-vline { width: 3px; }
.retrobg-hline + .retrobg-hline { margin-top: 98px; }
.retrobg-vline + .retrobg-vline { margin-left: 48px; }
JS
document.querySelector( "#retrobg-sun" ).onclick = () => {
document.querySelector( "#retrobg" ).classList.toggle( "retrobg-shutdown" );
};
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
html, body {
margin: 0;
height: 100%;
}
#retrobg {
position: relative;
overflow: hidden;
height: 100%;
color: #a3c;
background-color: #000;
}
#retrobg-sky {
position: absolute;
display: flex;
align-items: flex-end;
justify-content: center;
top: 0;
width: 100%;
height: 55%;
background: linear-gradient(#214 75%, #249);
}
#retrobg-sunWrap {
position: relative;
width: 40%;
margin-bottom: -15%;
}
#retrobg-sun {
--glow-color: #d44;
padding-top: 100%;
border-radius: 50%;
background-image: linear-gradient(#fcdf11, #ff623f, #fe2085 50%);
box-shadow: 0 0 160px 80px var(--glow-color);
animation: 2s ease infinite alternate retrobg-sun-glow-anim;
}
@keyframes retrobg-sun-glow-anim {
from {
box-shadow: 0 0 160px 80px var(--glow-color);
}
to {
box-shadow: 0 0 200px 95px var(--glow-color);
}
}
#retrobg-stars {
position: absolute;
width: 100%;
height: 100%;
}
.retrobg-star {
position: absolute;
border-radius: 50%;
width: 2px;
height: 2px;
background-color: #fff;
}
#retrobg-mountains {
position: absolute;
width: 100%;
height: 30%;
}
.retrobg-mountain {
position: absolute;
width: 30%;
height: 100%;
background-image: linear-gradient(#000 70%, #111 85%, #fff1);
}
#retrobg-mountains-left {
left: 0;
clip-path: polygon(0% 100%, 0% 55%, 5% 60%, 10% 55%, 20% 50%, 25% 42%, 30% 38%, 33% 35%, 40% 45%, 50% 50%, 60% 70%, 70% 85%, 75% 82%, 80% 91%, 85% 90%, 90% 95%, 95% 98%, 100% 100%);
}
#retrobg-mountains-right {
right: 0;
clip-path: polygon(0% 100%, 5% 95%, 10% 85%, 15% 87%, 20% 80%, 25% 78%, 30% 65%, 40% 70%, 50% 57%, 60% 53%, 67% 68%, 70% 70%, 75% 66%, 80% 55%, 90% 50%, 95% 60%, 100% 57%, 100% 100%);
}
#retrobg-cityWrap {
position: absolute;
width: 50%;
margin-left: -1%;
}
#retrobg-city {
padding-top: 20%;
}
.retrobg-building {
position: absolute;
width: 5%;
height: 100%;
bottom: 0;
border-radius: 4px 4px 0 0;
background-image: linear-gradient(0deg, rgba(17, 17, 34, 0), #112 30px, #000);
}
.retrobg-building:nth-child(odd) {
background-image: linear-gradient(0deg, rgba(24, 24, 42, 0), #223 30px, #000);
}
.retrobg-antenna::after {
content: "";
position: absolute;
left: 50%;
margin-left: calc(-1px - 5%);
bottom: 100%;
width: 10%;
min-width: 2px;
height: 33%;
background-color: #000;
}
#retrobg-ground {
position: absolute;
overflow: hidden;
width: 100%;
height: 45%;
bottom: 0;
border-top: 2px solid #bf578c;
background-color: #000;
}
#retrobg-groundShadow {
position: absolute;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(#000 0%, transparent);
}
#retrobg-linesWrap {
height: 100%;
perspective: 1000px;
perspective-origin: center top;
}
#retrobg-lines {
position: absolute;
width: 100%;
height: 100%;
transform-origin: top center;
animation: .35s linear infinite retrobg-lines-anim;
}
@keyframes retrobg-lines-anim {
from {
transform: rotateX(84deg) translateY(0);
}
to {
transform: rotateX(84deg) translateY(100px);
}
}
#retrobg-hlines,
#retrobg-vlines {
position: absolute;
left: calc((900% - 100%) / -2);
width: 900%;
height: 500%;
}
#retrobg-vlines {
display: flex;
justify-content: center;
}
.retrobg-hline,
.retrobg-vline {
width: 100%;
height: 100%;
background-color: currentColor;
}
.retrobg-hline {
height: 3px;
}
.retrobg-vline {
width: 3px;
}
.retrobg-hline + .retrobg-hline {
margin-top: 98px;
}
.retrobg-vline + .retrobg-vline {
margin-left: 48px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
max-width: 600px;
margin: auto;
background: rgba(75, 75, 250, 0.3);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
position: relative;
z-index: 10;
backdrop-filter: blur(3px); /* Ensures checklist is readable */
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<div id="retrobg">
<div id="retrobg-sky">
<div id="retrobg-stars">
<div class="retrobg-star" style="left: 5%; top: 55%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 7%; top: 5%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 10%; top: 45%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 12%; top: 35%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 15%; top: 39%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 20%; top: 10%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 35%; top: 50%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 40%; top: 16%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 43%; top: 28%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 45%; top: 30%; transform: scale( 3 );"></div>
<div class="retrobg-star" style="left: 55%; top: 18%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 60%; top: 23%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 62%; top: 44%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 67%; top: 27%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 75%; top: 10%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 80%; top: 25%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 83%; top: 57%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 90%; top: 29%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 95%; top: 5%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 96%; top: 72%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 98%; top: 70%; transform: scale( 3 );"></div>
</div>
<div id="retrobg-sunWrap">
<div id="retrobg-sun"></div>
</div>
<div id="retrobg-mountains">
<div id="retrobg-mountains-left" class="retrobg-mountain"></div>
<div id="retrobg-mountains-right" class="retrobg-mountain"></div>
</div>
<div id="retrobg-cityWrap">
<div id="retrobg-city">
<div style="left: 4.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 6.0%; height: 50%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 8.0%; height: 25%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 12.0%; height: 30%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 13.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 17.0%; height: 20%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 18.5%; height: 70%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 20.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 21.5%; height: 80%; width: 2.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 25.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 28.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 30.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 35.0%; height: 65%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 38.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 42.0%; height: 60%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 43.0%; height: 85%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 45.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 48.0%; height: 25%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 50.0%; height: 80%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 52.0%; height: 32%; width: 5.0%;" class="retrobg-building"></div>
<div style="left: 55.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 58.0%; height: 45%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 61.0%; height: 90%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 66.0%; height: 99%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 69.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 73.5%; height: 90%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 72.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 75.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 80.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 83.0%; height: 70%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 87.0%; height: 60%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 93.0%; height: 50%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 91.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 94.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 98.0%; height: 35%; width: 2.0%;" class="retrobg-building"></div>
</div>
</div>
</div>
<div id="retrobg-ground">
<div id="retrobg-linesWrap">
<div id="retrobg-lines">
<div id="retrobg-vlines">
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
</div>
<div id="retrobg-hlines">
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
</div>
</div>
</div>
<div id="retrobg-groundShadow"></div>
</div>
</div>
<div class="checklist" id="checklist">
<h1>Pre-Merge Checklist</h1>
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
// Toggle retrobg-shutdown class on sun click
document.querySelector("#retrobg-sun").onclick = () => {
document.querySelector("#retrobg").classList.toggle("retrobg-shutdown");
};
</script>
</body>
</html>
Explanation:
Background Structure : The HTML for the retro background is added directly within <div id="retrobg">.
Styles : All necessary styles for the retro background are embedded within the <style> tag.
Checklist and Functionality : The checklist remains as before, with functionality provided by JavaScript.
Interactivity : The sun element toggles the retrobg-shutdown class to demonstrate a change in state, as implemented by the JavaScript code.
This approach combines both the background and checklist functionality into a single-page setup while maintaining performance through efficient use of CSS and HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
html, body {
margin: 0;
height: 100%;
overflow: hidden;
}
#retrobg {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
color: #a3c;
background-color: #000;
z-index: 1;
}
#retrobg-sky {
position: absolute;
display: flex;
align-items: flex-end;
justify-content: center;
top: 0;
width: 100%;
height: 55%;
background: linear-gradient(#214 75%, #249);
}
#retrobg-sunWrap {
position: relative;
width: 40%;
margin-bottom: -15%;
}
#retrobg-sun {
--glow-color: #d44;
padding-top: 100%;
border-radius: 50%;
background-image: linear-gradient(#fcdf11, #ff623f, #fe2085 50%);
box-shadow: 0 0 160px 80px var(--glow-color);
animation: 2s ease infinite alternate retrobg-sun-glow-anim;
}
@keyframes retrobg-sun-glow-anim {
from {
box-shadow: 0 0 160px 80px var(--glow-color);
}
to {
box-shadow: 0 0 200px 95px var(--glow-color);
}
}
#retrobg-stars {
position: absolute;
width: 100%;
height: 100%;
}
.retrobg-star {
position: absolute;
border-radius: 50%;
width: 2px;
height: 2px;
background-color: #fff;
}
#retrobg-mountains {
position: absolute;
width: 100%;
height: 30%;
}
.retrobg-mountain {
position: absolute;
width: 30%;
height: 100%;
background-image: linear-gradient(#000 70%, #111 85%, #fff1);
}
#retrobg-mountains-left {
left: 0;
clip-path: polygon(0% 100%, 0% 55%, 5% 60%, 10% 55%, 20% 50%, 25% 42%, 30% 38%, 33% 35%, 40% 45%, 50% 50%, 60% 70%, 70% 85%, 75% 82%, 80% 91%, 85% 90%, 90% 95%, 95% 98%, 100% 100%);
}
#retrobg-mountains-right {
right: 0;
clip-path: polygon(0% 100%, 5% 95%, 10% 85%, 15% 87%, 20% 80%, 25% 78%, 30% 65%, 40% 70%, 50% 57%, 60% 53%, 67% 68%, 70% 70%, 75% 66%, 80% 55%, 90% 50%, 95% 60%, 100% 57%, 100% 100%);
}
#retrobg-cityWrap {
position: absolute;
width: 50%;
margin-left: -1%;
}
#retrobg-city {
padding-top: 20%;
}
.retrobg-building {
position: absolute;
width: 5%;
height: 100%;
bottom: 0;
border-radius: 4px 4px 0 0;
background-image: linear-gradient(0deg, rgba(17, 17, 34, 0), #112 30px, #000);
}
.retrobg-building:nth-child(odd) {
background-image: linear-gradient(0deg, rgba(24, 24, 42, 0), #223 30px, #000);
}
.retrobg-antenna::after {
content: "";
position: absolute;
left: 50%;
margin-left: calc(-1px - 5%);
bottom: 100%;
width: 10%;
min-width: 2px;
height: 33%;
background-color: #000;
}
#retrobg-ground {
position: absolute;
overflow: hidden;
width: 100%;
height: 45%;
bottom: 0;
border-top: 2px solid #bf578c;
background-color: #000;
}
#retrobg-groundShadow {
position: absolute;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(#000 0%, transparent);
}
#retrobg-linesWrap {
height: 100%;
perspective: 1000px;
perspective-origin: center top;
}
#retrobg-lines {
position: absolute;
width: 100%;
height: 100%;
transform-origin: top center;
animation: .35s linear infinite retrobg-lines-anim;
}
@keyframes retrobg-lines-anim {
from {
transform: rotateX(84deg) translateY(0);
}
to {
transform: rotateX(84deg) translateY(100px);
}
}
#retrobg-hlines,
#retrobg-vlines {
position: absolute;
left: calc((900% - 100%) / -2);
width: 900%;
height: 500%;
}
#retrobg-vlines {
display: flex;
justify-content: center;
}
.retrobg-hline,
.retrobg-vline {
width: 100%;
height: 100%;
background-color: currentColor;
}
.retrobg-hline {
height: 3px;
}
.retrobg-vline {
width: 3px;
}
.retrobg-hline+.retrobg-hline {
margin-top: 98px;
}
.retrobg-vline+.retrobg-vline {
margin-left: 48px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
width: 80%;
max-width: 600px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(75, 75, 250, 0.6);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
z-index: 2;
backdrop-filter: blur(5px); /* Makes background slightly blurred for readability */
color: #fff;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
}
.modal-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<div id="retrobg">
<div id="retrobg-sky">
<div id="retrobg-stars">
<div class="retrobg-star" style="left: 5%; top: 55%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 7%; top: 5%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 10%; top: 45%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 12%; top: 35%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 15%; top: 39%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 20%; top: 10%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 35%; top: 50%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 40%; top: 16%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 43%; top: 28%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 45%; top: 30%; transform: scale( 3 );"></div>
<div class="retrobg-star" style="left: 55%; top: 18%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 60%; top: 23%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 62%; top: 44%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 67%; top: 27%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 75%; top: 10%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 80%; top: 25%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 83%; top: 57%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 90%; top: 29%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 95%; top: 5%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 96%; top: 72%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 98%; top: 70%; transform: scale( 3 );"></div>
</div>
<div id="retrobg-sunWrap">
<div id="retrobg-sun"></div>
</div>
<div id="retrobg-mountains">
<div id="retrobg-mountains-left" class="retrobg-mountain"></div>
<div id="retrobg-mountains-right" class="retrobg-mountain"></div>
</div>
<div id="retrobg-cityWrap">
<div id="retrobg-city">
<div style="left: 4.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 6.0%; height: 50%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 8.0%; height: 25%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 12.0%; height: 30%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 13.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 17.0%; height: 20%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 18.5%; height: 70%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 20.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 21.5%; height: 80%; width: 2.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 25.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 28.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 30.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 35.0%; height: 65%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 38.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 42.0%; height: 60%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 43.0%; height: 85%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 45.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 48.0%; height: 25%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 50.0%; height: 80%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 52.0%; height: 32%; width: 5.0%;" class="retrobg-building"></div>
<div style="left: 55.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 58.0%; height: 45%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 61.0%; height: 90%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 66.0%; height: 99%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 69.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 73.5%; height: 90%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 72.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 75.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 80.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 83.0%; height: 70%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 87.0%; height: 60%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 93.0%; height: 50%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 91.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 94.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 98.0%; height: 35%; width: 2.0%;" class="retrobg-building"></div>
</div>
</div>
</div>
<div id="retrobg-ground">
<div id="retrobg-linesWrap">
<div id="retrobg-lines">
<div id="retrobg-vlines">
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
</div>
<div id="retrobg-hlines">
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
</div>
</div>
</div>
<div id="retrobg-groundShadow"></div>
</div>
</div>
<div class="checklist" id="checklist">
<h1>Pre-Merge Checklist</h1>
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
modal.style.display = cannotMerge ? 'block' : 'none';
}
// Toggle retrobg-shutdown class on sun click
document.querySelector("#retrobg-sun").onclick = () => {
document.querySelector("#retrobg").classList.toggle("retrobg-shutdown");
};
</script>
</body>
</html>
Explanation:
Checklist Positioning : The checklist is centered on the page using the position: absolute;, transform, top, and left properties to place it at the center and bring it to the front of the background with a higher z-index.
Contrast and Visibility : A semi-transparent background and backdrop-filter: blur(5px) for the checklist are used to increase readability over the animated background.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
html, body {
margin: 0;
height: 100%;
overflow: hidden;
}
#retrobg {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
color: #a3c;
background-color: #000;
z-index: 1;
}
#retrobg-sky {
position: absolute;
display: flex;
align-items: flex-end;
justify-content: center;
top: 0;
width: 100%;
height: 55%;
background: linear-gradient(#214 75%, #249);
}
#retrobg-sunWrap {
position: relative;
width: 40%;
margin-bottom: -15%;
}
#retrobg-sun {
--glow-color: #d44;
padding-top: 100%;
border-radius: 50%;
background-image: linear-gradient(#fcdf11, #ff623f, #fe2085 50%);
box-shadow: 0 0 160px 80px var(--glow-color);
animation: 2s ease infinite alternate retrobg-sun-glow-anim;
}
@keyframes retrobg-sun-glow-anim {
from {
box-shadow: 0 0 160px 80px var(--glow-color);
}
to {
box-shadow: 0 0 200px 95px var(--glow-color);
}
}
#retrobg-stars {
position: absolute;
width: 100%;
height: 100%;
}
.retrobg-star {
position: absolute;
border-radius: 50%;
width: 2px;
height: 2px;
background-color: #fff;
}
#retrobg-mountains {
position: absolute;
width: 100%;
height: 30%;
}
.retrobg-mountain {
position: absolute;
width: 30%;
height: 100%;
background-image: linear-gradient(#000 70%, #111 85%, #fff1);
}
#retrobg-mountains-left {
left: 0;
clip-path: polygon(0% 100%, 0% 55%, 5% 60%, 10% 55%, 20% 50%, 25% 42%, 30% 38%, 33% 35%, 40% 45%, 50% 50%, 60% 70%, 70% 85%, 75% 82%, 80% 91%, 85% 90%, 90% 95%, 95% 98%, 100% 100%);
}
#retrobg-mountains-right {
right: 0;
clip-path: polygon(0% 100%, 5% 95%, 10% 85%, 15% 87%, 20% 80%, 25% 78%, 30% 65%, 40% 70%, 50% 57%, 60% 53%, 67% 68%, 70% 70%, 75% 66%, 80% 55%, 90% 50%, 95% 60%, 100% 57%, 100% 100%);
}
#retrobg-cityWrap {
position: absolute;
width: 50%;
margin-left: -1%;
}
#retrobg-city {
padding-top: 20%;
}
.retrobg-building {
position: absolute;
width: 5%;
height: 100%;
bottom: 0;
border-radius: 4px 4px 0 0;
background-image: linear-gradient(0deg, rgba(17, 17, 34, 0), #112 30px, #000);
}
.retrobg-building:nth-child(odd) {
background-image: linear-gradient(0deg, rgba(24, 24, 42, 0), #223 30px, #000);
}
.retrobg-antenna::after {
content: "";
position: absolute;
left: 50%;
margin-left: calc(-1px - 5%);
bottom: 100%;
width: 10%;
min-width: 2px;
height: 33%;
background-color: #000;
}
#retrobg-ground {
position: absolute;
overflow: hidden;
width: 100%;
height: 45%;
bottom: 0;
border-top: 2px solid #bf578c;
background-color: #000;
}
#retrobg-groundShadow {
position: absolute;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(#000 0%, transparent);
}
#retrobg-linesWrap {
height: 100%;
perspective: 1000px;
perspective-origin: center top;
}
#retrobg-lines {
position: absolute;
width: 100%;
height: 100%;
transform-origin: top center;
animation: .35s linear infinite retrobg-lines-anim;
}
@keyframes retrobg-lines-anim {
from {
transform: rotateX(84deg) translateY(0);
}
to {
transform: rotateX(84deg) translateY(100px);
}
}
#retrobg-hlines,
#retrobg-vlines {
position: absolute;
left: calc((900% - 100%) / -2);
width: 900%;
height: 500%;
}
#retrobg-vlines {
display: flex;
justify-content: center;
}
.retrobg-hline,
.retrobg-vline {
width: 100%;
height: 100%;
background-color: currentColor;
}
.retrobg-hline {
height: 3px;
}
.retrobg-vline {
width: 3px;
}
.retrobg-hline + .retrobg-hline {
margin-top: 98px;
}
.retrobg-vline + .retrobg-vline {
margin-left: 48px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
width: 80%;
max-width: 600px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(75, 75, 250, 0.6);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
z-index: 2;
backdrop-filter: blur(5px); /* Makes background slightly blurred for readability */
color: #fff;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
justify-content: center;
align-items: center;
text-align: center;
}
.modal-content {
background: #552222;
color: #ff4c4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.modal-content.success {
background: #224422;
color: #4cff4c;
}
footer {
position: absolute;
bottom: 10px;
width: 100%;
text-align: center;
color: #fff;
z-index: 2;
font-family: 'Source Code Pro', monospace;
}
</style>
</head>
<body>
<div id="retrobg">
<div id="retrobg-sky">
<div id="retrobg-stars">
<div class="retrobg-star" style="left: 5%; top: 55%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 7%; top: 5%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 10%; top: 45%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 12%; top: 35%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 15%; top: 39%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 20%; top: 10%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 35%; top: 50%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 40%; top: 16%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 43%; top: 28%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 45%; top: 30%; transform: scale( 3 );"></div>
<div class="retrobg-star" style="left: 55%; top: 18%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 60%; top: 23%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 62%; top: 44%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 67%; top: 27%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 75%; top: 10%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 80%; top: 25%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 83%; top: 57%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 90%; top: 29%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 95%; top: 5%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 96%; top: 72%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 98%; top: 70%; transform: scale( 3 );"></div>
</div>
<div id="retrobg-sunWrap">
<div id="retrobg-sun"></div>
</div>
<div id="retrobg-mountains">
<div id="retrobg-mountains-left" class="retrobg-mountain"></div>
<div id="retrobg-mountains-right" class="retrobg-mountain"></div>
</div>
<div id="retrobg-cityWrap">
<div id="retrobg-city">
<div style="left: 4.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 6.0%; height: 50%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 8.0%; height: 25%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 12.0%; height: 30%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 13.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 17.0%; height: 20%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 18.5%; height: 70%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 20.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 21.5%; height: 80%; width: 2.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 25.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 28.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 30.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 35.0%; height: 65%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 38.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 42.0%; height: 60%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 43.0%; height: 85%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 45.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 48.0%; height: 25%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 50.0%; height: 80%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 52.0%; height: 32%; width: 5.0%;" class="retrobg-building"></div>
<div style="left: 55.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 58.0%; height: 45%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 61.0%; height: 90%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 66.0%; height: 99%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 69.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 73.5%; height: 90%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 72.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 75.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 80.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 83.0%; height: 70%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 87.0%; height: 60%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 93.0%; height: 50%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 91.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 94.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 98.0%; height: 35%; width: 2.0%;" class="retrobg-building"></div>
</div>
</div>
</div>
<div id="retrobg-ground">
<div id="retrobg-linesWrap">
<div id="retrobg-lines">
<div id="retrobg-vlines">
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
</div>
<div id="retrobg-hlines">
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
</div>
</div>
</div>
<div id="retrobg-groundShadow"></div>
</div>
</div>
<div class="checklist" id="checklist">
<h1>Pre-Merge Checklist</h1>
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content">
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
</div>
</div>
<footer>
This webpage is created by Ruel Olleta
</footer>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
function checkMergeEligibility() {
let cannotMerge = Array.from(document.querySelectorAll('.answer'))
.some(checkbox => checkbox.checked && checkbox.parentNode.textContent.trim() === "Yes");
if (cannotMerge) {
modal.style.display = 'flex';
modal.querySelector('.modal-content').innerHTML = `
<h2>Attention!</h2>
<p>The organization cannot be merged into another organization.</p>
`;
modal.querySelector('.modal-content').classList.remove('success');
} else {
modal.style.display = 'flex';
modal.querySelector('.modal-content').innerHTML = `
<h2>Success!</h2>
<p>The organization is okay to merge into other organizations.</p>
`;
modal.querySelector('.modal-content').classList.add('success');
}
}
items.forEach(item => {
const checkboxes = item.querySelectorAll('input');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', () => {
if (checkbox.checked) {
checkboxes.forEach(box => {
if (box !== checkbox) box.checked = false;
});
Array.from(item.querySelectorAll('label')).forEach(label => label.classList.add('blurred'));
checkbox.parentElement.classList.remove('blurred');
checkMergeEligibility();
}
});
});
});
// Toggle retrobg-shutdown class on sun click
document.querySelector("#retrobg-sun").onclick = () => {
document.querySelector("#retrobg").classList.toggle("retrobg-shutdown");
};
</script>
</body>
</html>
Explanation:
Modal Update : The modal now shows different messages based on the checklist results. If any answer is "Yes", it shows an alert that merging is not allowed. If all answers are "No", it shows a success message in green.
Footer : Added a footer to give credit to the page creator, Ruel Olleta, positioned at the bottom of the page.
This approach integrates the new success message functionality with the established design and adds acknowledgment for the page's creator.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pre-Merge Checklist</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro:200');
html, body {
margin: 0;
height: 100%;
overflow: hidden;
}
#retrobg {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
color: #a3c;
background-color: #000;
z-index: 1;
}
#retrobg-sky {
position: absolute;
display: flex;
align-items: flex-end;
justify-content: center;
top: 0;
width: 100%;
height: 55%;
background: linear-gradient(#214 75%, #249);
}
#retrobg-sunWrap {
position: relative;
width: 40%;
margin-bottom: -15%;
}
#retrobg-sun {
--glow-color: #d44;
padding-top: 100%;
border-radius: 50%;
background-image: linear-gradient(#fcdf11, #ff623f, #fe2085 50%);
box-shadow: 0 0 160px 80px var(--glow-color);
animation: 2s ease infinite alternate retrobg-sun-glow-anim;
}
@keyframes retrobg-sun-glow-anim {
from {
box-shadow: 0 0 160px 80px var(--glow-color);
}
to {
box-shadow: 0 0 200px 95px var(--glow-color);
}
}
#retrobg-stars {
position: absolute;
width: 100%;
height: 100%;
}
.retrobg-star {
position: absolute;
border-radius: 50%;
width: 2px;
height: 2px;
background-color: #fff;
}
#retrobg-mountains {
position: absolute;
width: 100%;
height: 30%;
}
.retrobg-mountain {
position: absolute;
width: 30%;
height: 100%;
background-image: linear-gradient(#000 70%, #111 85%, #fff1);
}
#retrobg-mountains-left {
left: 0;
clip-path: polygon(0% 100%, 0% 55%, 5% 60%, 10% 55%, 20% 50%, 25% 42%, 30% 38%, 33% 35%, 40% 45%, 50% 50%, 60% 70%, 70% 85%, 75% 82%, 80% 91%, 85% 90%, 90% 95%, 95% 98%, 100% 100%);
}
#retrobg-mountains-right {
right: 0;
clip-path: polygon(0% 100%, 5% 95%, 10% 85%, 15% 87%, 20% 80%, 25% 78%, 30% 65%, 40% 70%, 50% 57%, 60% 53%, 67% 68%, 70% 70%, 75% 66%, 80% 55%, 90% 50%, 95% 60%, 100% 57%, 100% 100%);
}
#retrobg-cityWrap {
position: absolute;
width: 50%;
margin-left: -1%;
}
#retrobg-city {
padding-top: 20%;
}
.retrobg-building {
position: absolute;
width: 5%;
height: 100%;
bottom: 0;
border-radius: 4px 4px 0 0;
background-image: linear-gradient(0deg, rgba(17, 17, 34, 0), #112 30px, #000);
}
.retrobg-building:nth-child(odd) {
background-image: linear-gradient(0deg, rgba(24, 24, 42, 0), #223 30px, #000);
}
.retrobg-antenna::after {
content: "";
position: absolute;
left: 50%;
margin-left: calc(-1px - 5%);
bottom: 100%;
width: 10%;
min-width: 2px;
height: 33%;
background-color: #000;
}
#retrobg-ground {
position: absolute;
overflow: hidden;
width: 100%;
height: 45%;
bottom: 0;
border-top: 2px solid #bf578c;
background-color: #000;
}
#retrobg-groundShadow {
position: absolute;
top: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(#000 0%, transparent);
}
#retrobg-linesWrap {
height: 100%;
perspective: 1000px;
perspective-origin: center top;
}
#retrobg-lines {
position: absolute;
width: 100%;
height: 100%;
transform-origin: top center;
animation: .35s linear infinite retrobg-lines-anim;
}
@keyframes retrobg-lines-anim {
from {
transform: rotateX(84deg) translateY(0);
}
to {
transform: rotateX(84deg) translateY(100px);
}
}
#retrobg-hlines,
#retrobg-vlines {
position: absolute;
left: calc((900% - 100%) / -2);
width: 900%;
height: 500%;
}
#retrobg-vlines {
display: flex;
justify-content: center;
}
.retrobg-hline,
.retrobg-vline {
width: 100%;
height: 100%;
background-color: currentColor;
}
.retrobg-hline {
height: 3px;
}
.retrobg-vline {
width: 3px;
}
.retrobg-hline + .retrobg-hline {
margin-top: 98px;
}
.retrobg-vline + .retrobg-vline {
margin-left: 48px;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
text-transform: uppercase;
}
.checklist {
width: 80%;
max-width: 600px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(75, 75, 250, 0.6);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
z-index: 2;
backdrop-filter: blur(5px); /* Makes background slightly blurred for readability */
color: #fff;
}
.item {
margin: 15px 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.item span {
flex-grow: 1;
text-align: left;
margin-left: 10px;
}
.item label {
margin: 0 10px;
}
.blurred {
opacity: 0.5;
pointer-events: none;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 15;
color: #fff;
justify-content: center;
align-items: center;
text-align: center;
}
.modal-content {
background: #224422;
color: #4cff4c;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
footer {
position: absolute;
bottom: 10px;
width: 100%;
text-align: center;
color: #fff;
z-index: 2;
font-family: 'Source Code Pro', monospace;
}
</style>
</head>
<body>
<div id="retrobg">
<div id="retrobg-sky">
<div id="retrobg-stars">
<div class="retrobg-star" style="left: 5%; top: 55%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 7%; top: 5%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 10%; top: 45%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 12%; top: 35%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 15%; top: 39%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 20%; top: 10%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 35%; top: 50%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 40%; top: 16%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 43%; top: 28%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 45%; top: 30%; transform: scale( 3 );"></div>
<div class="retrobg-star" style="left: 55%; top: 18%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 60%; top: 23%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 62%; top: 44%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 67%; top: 27%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 75%; top: 10%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 80%; top: 25%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 83%; top: 57%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 90%; top: 29%; transform: scale( 2 );"></div>
<div class="retrobg-star" style="left: 95%; top: 5%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 96%; top: 72%; transform: scale( 1 );"></div>
<div class="retrobg-star" style="left: 98%; top: 70%; transform: scale( 3 );"></div>
</div>
<div id="retrobg-sunWrap">
<div id="retrobg-sun"></div>
</div>
<div id="retrobg-mountains">
<div id="retrobg-mountains-left" class="retrobg-mountain"></div>
<div id="retrobg-mountains-right" class="retrobg-mountain"></div>
</div>
<div id="retrobg-cityWrap">
<div id="retrobg-city">
<div style="left: 4.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 6.0%; height: 50%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 8.0%; height: 25%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 12.0%; height: 30%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 13.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 17.0%; height: 20%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 18.5%; height: 70%; width: 1.5%;" class="retrobg-building"></div>
<div style="left: 20.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 21.5%; height: 80%; width: 2.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 25.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 28.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 30.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 35.0%; height: 65%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 38.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 42.0%; height: 60%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 43.0%; height: 85%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 45.0%; height: 40%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 48.0%; height: 25%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 50.0%; height: 80%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 52.0%; height: 32%; width: 5.0%;" class="retrobg-building"></div>
<div style="left: 55.0%; height: 55%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 58.0%; height: 45%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 61.0%; height: 90%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 66.0%; height: 99%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 69.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 73.5%; height: 90%; width: 2.0%;" class="retrobg-building"></div>
<div style="left: 72.0%; height: 70%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 75.0%; height: 60%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 80.0%; height: 40%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 83.0%; height: 70%; width: 4.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 87.0%; height: 60%; width: 3.0%;" class="retrobg-building retrobg-antenna"></div>
<div style="left: 93.0%; height: 50%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 91.0%; height: 30%; width: 4.0%;" class="retrobg-building"></div>
<div style="left: 94.0%; height: 20%; width: 3.0%;" class="retrobg-building"></div>
<div style="left: 98.0%; height: 35%; width: 2.0%;" class="retrobg-building"></div>
</div>
</div>
</div>
<div id="retrobg-ground">
<div id="retrobg-linesWrap">
<div id="retrobg-lines">
<div id="retrobg-vlines">
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
<div class="retrobg-vline"></div>
</div>
<div id="retrobg-hlines">
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
<div class="retrobg-hline"></div>
</div>
</div>
</div>
<div id="retrobg-groundShadow"></div>
</div>
</div>
<div class="checklist" id="checklist">
<h1>Pre-Merge Checklist</h1>
<div class="item">
<span>1. Are they tagged as AR/AP?</span>
<label>
<input type="checkbox" class="answer" data-index="0"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="0"> No
</label>
</div>
<div class="item">
<span>2. Does it have MID# record in the config tab?</span>
<label>
<input type="checkbox" class="answer" data-index="1"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="1"> No
</label>
</div>
<div class="item">
<span>3. Does it have POA document in the EDOCS Tab?</span>
<label>
<input type="checkbox" class="answer" data-index="2"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="2"> No
</label>
</div>
<div class="item">
<span>4. Does it have active transactions in PowerBi?</span>
<a href="https://app.powerbi.com/groups/me/apps/5cca2ab9-6bf0-4430-a0b2-1cbe94362e11/rdlreports/3474764c-8500-4b8f-b534-263ff4a13d31?ctid=9180b9a6-a316-4a88-9910-39cb4079ee5f&experience=power-bi" style="color: #ffeb3b;">(check here)</a>
<label>
<input type="checkbox" class="answer" data-index="3"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="3"> No
</label>
</div>
<div class="item">
<span>5. Are they from a different country than the main organization?</span>
<label>
<input type="checkbox" class="answer" data-index="4"> Yes
</label>
<label>
<input type="checkbox" class="answer" data-index="4"> No
</label>
</div>
</div>
<div class="modal" id="modal">
<div class="modal-content" id="modal-content">
</div>
</div>
<footer>
This webpage is created by Ruel Olleta
</footer>
<script>
const items = document.querySelectorAll('.item');
const modal = document.getElementById('modal');
const answers = document.querySelectorAll('.answer');
function checkMergeEligibility() {
const answered = Array.from(answers).filter(answer => answer.checked);
const allNo = answered.every(answer => answer.parentNode.textContent.trim() === "No");
const allAnswered = answered.length === items.length;
if (allAnswered && allNo) {
modal.style.display = 'flex';
document.getElementById('modal-content').innerHTML = `
<h2>Success!</h2>
<p>The organization is okay to merge into other organizations.</p>
`;
} else {
modal.style.display = 'none';
}
}
answers.forEach(answer => {
answer.addEventListener('change', () => {
// Ensure only one option is selected per question
const siblings = answer.parentElement.parentElement.querySelectorAll('input');
siblings.forEach(sibling => {
if (sibling !== answer) sibling.checked = false;
sibling.parentElement.classList.add('blurred');
});
answer.parentElement.classList.remove('blurred');
checkMergeEligibility();
});
});
// Toggle retrobg-shutdown class on sun click
document.querySelector("#retrobg-sun").onclick = () => {
document.querySelector("#retrobg").classList.toggle("retrobg-shutdown");
};
</script>
</body>
</html>
Key Adjustments:
Answer Tracking : We keep track of whether all questions have been answered and specifically if all are "No".
Display Condition : The success message only appears if all answers are checked and all selections are "No". If not all questions are answered, no message is shown.
Simplicity and Maintainability : I've integrated some improvements in handling checkbox selection to ensure only one selection is allowed per question.
This implementation ensures you only see the success message when appropriate conditions are met.