<!--Find MyColor Button-->
<button type="button" class="MyColorD" onclick="StartForm()">Find my color</button>
<button type="button" class="MyColorM" onclick="StartForm()">Find my color</button>
<style>
/*Styling MyColor Button*/
.MyColorD{
background-color: white;
color: black;
font-size: 15px;
font-weight: 500;
display: grid;
margin: auto;
padding: 12px 103px;
border: 1px solid white;
cursor: pointer;
margin-top: -30px;
}
.MyColorM{
background-color: white;
color: black;
font-size: 15px;
font-weight: 500;
display: grid;
margin: auto;
padding: 12px 103px;
border: 1px solid white;
cursor: pointer;
margin-top: -15px;
}
/*Styling MyColor Button on hover*/
.MyColorD:hover{
border: 2px solid white;
}
.MyColorM:hover{
border: 2px solid white;
}
/*correct show*/
.MyColorD {
display: none;
}
@media only screen and (min-width: 767px) {
.MyColorD {display: block;
}
.MyColorM {display: none;
}
}
</style>
<!--Desktop View Form-->
<form data-multi-step class="multi-step-formD">
<!--Intro Step 1-->
<div class="popupD" data-step>
<br>
<br>
<h2 style="font-weight: bold;">MY COLOR FIT</h2>
<p style="font-size: 14px; margin: 0;">Please follow instructions.</p>
<p style="font-size: 14px; margin-top: -10px;">Like this we can identify the color that suits you best.</p>
<hr class="lineD">
<br>
<button type="button" class="start-buttonD" data-next>Start</button>
</div>
<!--Skincolor Step 2-->
<div class="popupD" data-step>
<h2 style="font-weight: bold; margin-top: -10px;">MY COLOR FIT</h2>
<p style="font-size: 18px; margin-top: -10px;">Please choose your skincolor</p>
<hr class="lineD">
<input type="checkbox" class="skintype1D" name="check1" onclick="test1(this)" data-next></input>
<input type="checkbox" class="skintype2D" name="check1" onclick="test1(this)" data-next></input>
<input type="checkbox" class="skintype3D" name="check1" onclick="test1(this)" data-next></input>
<input type="checkbox" class="skintype4D" name="check1" onclick="test1(this)" data-next></input>
<input type="checkbox" class="skintype5D" name="check1" onclick="test1(this)" data-next></input>
<input type="checkbox" class="skintype6D" name="chech1" onclick="test1(this)" data-next></input>
<br>
<p style=" font-family: 'League Spartan', sans-serif; font-size: 10px; text-align: center;color: white; opacity: 0.4;">(step 1 of 3)</p>
<button type="button" class="start-buttonD" data-previous>Back</button>
</div>
<!--Haircolor Step 3-->
<div class="popupD" data-step>
<h2 style="margin-top:-10px ; font-weight: bold;">MY COLOR FIT</h2>
<p style="font-size: 18px; margin-top: -10px;">Please choose your haircolor</p>
<hr class="lineD">
<input type="checkbox" class="haircolor1D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor2D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor3D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor4D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor5D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor6D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor7D" name="check2" onclick="test2(this)" data-next></input>
<input type="checkbox" class="haircolor8D" name="check2" onclick="test2(this)" data-next></input>
<br>
<p style=" font-family: 'League Spartan', sans-serif; font-size: 10px; text-align: center;color: white; opacity: 0.4;">(step 2 of 3)</p>
<button type="button" class="start-buttonD" data-previous>Back</button><button type="button" class="start-buttonD" data-next>Skip</button>
</div>
<!--Eyecolor Step 4-->
<div class="popupD" data-step>
<h2 style="margin-top:-10px ; font-weight: bold;">MY COLOR FIT</h2>
<p style="font-size: 18px; margin-top: -10px;">Please choose your Eyecolor</p>
<hr class="lineD">
<input type="checkbox" class="eyecolor1D" name="check3" onclick="test3(this)" data-next></input>
<input type="checkbox" class="eyecolor2D" name="check3" onclick="test3(this)" data-next></input>
<input type="checkbox" class="eyecolor3D" name="check3" onclick="test3(this)" data-next></input>
<input type="checkbox" class="eyecolor4D" name="check3" onclick="test3(this)" data-next></input>
<input type="checkbox" class="eyecolor5D" name="check3" onclick="test3(this)" data-next></input>
<input type="checkbox" class="eyecolor6D" name="check3" onclick="test3(this)" data-next></input>
<br>
<p style=" font-family: 'League Spartan', sans-serif; font-size: 10px; text-align: center;color: white; opacity: 0.4;">(step 3 of 3)</p>
<button type="button" class="start-buttonD" data-previous>Back</button>
</div>
<!--MyColor Step 5-->
<div class="popupD" data-step>
<h2 style="font-weight: bold;">MY COLOR FIT</h2>
<p style="font-size: 18px; margin-top: -10px; ">This color fits you to __% </p>
<br>
<br>
<hr class="lineD">
<p style="font-size: 14px; margin-top: -10px;">You might also like these colors</p>
<br>
<br>
<br>
<p style=" font-family: 'League Spartan', sans-serif; font-size: 10px; text-align: center;color: white; opacity: 0.4; margin-top: -5px;">(done!)</p>
<button type="submit" class="start-buttonD">Close</button>
</div>
</form>
<style>
/*correct Show*/
.multi-step-formD {
display: none;
}
@media only screen and (min-width: 767px) {
.multi-step-formD {display: block;
}
.multi-step-formM {display: none;
}
}
</style>
<style>
/*Froms for Desktop*/
.popupD{
width: 800px;
height: 400px;
background: black;
border-radius: 10px;
text-align: center;
color: white;
box-shadow: 0 3px 3px rgba(255, 255, 255, 0.3);
border: 5px solid white;
visibility: hidden;
margin: 0;
opacity: 0.5;
transition: 0.3s ease-in-out;
position: absolute;
transition-delay: 0.3s;
top: 25%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}
.popupD.active{
visibility: visible;
opacity: 1;
position: absolute;
}
/*Lines*/
.lineD{
border: 0.5px solid white;
opacity: 0.5;
margin-left: 200px;
width: 400px;
background-color: white;
margin-top: 0;
margin-bottom: 20px;
}
/*Close Button Desktop*/
.close-buttonD{
background: black;
cursor: pointer;
margin-left: 740px;
margin-top: 10px;
}
/*Start Form*/
.start-buttonD{
background: white;
cursor: pointer;
box-shadow: 0px 3px 5px rgba(255, 255, 255, 0.199);
color: black;
padding: 5px 20px;
outline: none;
font-weight: bold;
margin-right: 0.5vw;
margin-left: 0.5vw;
}
.start-buttonD:hover{
background: rgb(199, 199, 199);
}
</style>
<style>
/*Checkboxes of Skincolor Desktop*/
input[type=checkbox]
{
-moz-appearance:none;
-webkit-appearance:none;
-o-appearance:none;
}
input[class=skintype1D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background: #f8c8b0;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=skintype2D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#e0a677;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=skintype3D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#c48553;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=skintype4D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#754b38;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=skintype5D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#352219;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=skintype6D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#1a100b;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
</style>
<style>
/*Checkboxes of Haircolor Desktop*/
input[class=haircolor1D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor2D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor3D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor4D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor5D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor6D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor7D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=haircolor8D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
</style>
<style>
/*Checkboxes of Eyecolor Desktop*/
input[class=eyecolor1D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#b8c4de;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=eyecolor2D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background: #57788a;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=eyecolor3D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background: #817f69;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=eyecolor4D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#5c6139;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=eyecolor5D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background:#6b3b1d;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
input[class=eyecolor6D]:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
background: #2e180b;
display: block;
width: 80px;
height: 80px;
border: 7px solid black;
border-radius: 20px;
cursor: pointer;
}
</style>
<style>
/*Before checked*/
input[type=checkbox]:checked:before {
font-family: "FontAwesome";
content: "";
font-size: 4vw;
color: transparent !important;
display: block;
width: 80px;
height: 80px;
border: 3px solid white;
border-radius: 20px;
cursor: pointer;
opacity: 0.7;
transition: 0.3s ease-in ;
}
</style>
<script>
/*Access Multi Step Form*/
const mulitStepForm = document.querySelector("[data-multi-step]")
const formSteps = [...mulitStepForm.querySelectorAll("[data-step]")]
let currentStep = formSteps.findIndex(step => {
return step.classList.contains("active")
}
)
if (currentStep < 0 ) {
function StartForm(){
currentStep = 0
showCurrentStep()
}
}
mulitStepForm.addEventListener("click", e => {
if (e.target.matches("[data-next]")) {
currentStep +=1
} else if (e.target.matches("[data-previous]")) {
currentStep -=1
}
showCurrentStep()
})
function showCurrentStep() {
formSteps.forEach((step, index) => {
step.classList.toggle("active", index ===
currentStep)
})
}
</script>
<script>
/*Allow only one to be clicked (skincolor)*/
function test1(checkbox) {
var checkboxes = document.getElementsByName('check1')
checkboxes.forEach((item1) => {
if (item1 !== checkbox) item1.checked = false
})
}
/*Allow only one to be clicked (haircolor)*/
function test2(checkbox) {
var checkboxes = document.getElementsByName('check2')
checkboxes.forEach((item2) => {
if (item2 !== checkbox) item2.checked = false
})
}
/*Allow only one to be clicked (eyecolor)*/
function test3(checkbox) {
var checkboxes = document.getElementsByName('check3')
checkboxes.forEach((item3) => {
if (item3 !== checkbox) item3.checked = false
})
}
</script>