if (!empty($_POST['update'])) {
$data['itemId'] = (int)$_POST['item'];
+ $data['showingMain'] = var_export(!empty($_POST['main']), true);
+ $data['showingAll'] = var_export(!empty($_POST['all']), true);
$data['showingExtra'] = var_export(!empty($_POST['extra']), true);
$data['showingTimer'] = var_export(!empty($_POST['timer']), true);
$data['showingBanner'] = var_export(!empty($_POST['banner']), true);
echo "<input type='radio' id='$i' value='$i' name='item'$checked>";
echo "<label for='$i'> $subtext</label><br>";
}
-$checked = "";
+$checkedExtra = "";
if ($data['showingExtra'] == "true") {
- $checked = " checked='checked' ";
+ $checkedExtra = " checked='checked' ";
+}
+$checkedMain = "";
+if ($data['showingMain'] == "true") {
+ $checkedMain = " checked='checked' ";
+}
+$checkedAll = "";
+if ($data['showingAll'] == "true") {
+ $checkedAll = " checked='checked' ";
}
?>
</div><div class='split'>
- <input type='checkbox' id='extra' name='extra' value='true'<?php echo $checked; ?>>
- <label for='extra'> Showing extra information</label>
+ <input type='checkbox' id='extra' name='extra' value='true'<?php echo $checkedExtra; ?>>
+ <label for='extra'> Showing extra information</label><br>
+ <input type='checkbox' id='main' name='main' value='true'<?php echo $checkedMain; ?>>
+ <label for='main'> Showing product information</label><br>
+ <input type='checkbox' id='all' name='all' value='true'<?php echo $checkedAll; ?>>
+ <label for='all'> Showing all components</label>
</div>
</fieldset>
</div><div class='split'>
<input type='number' name='discount' id='discount' value='<?php echo $data['discount']; ?>'>
- <label for='discount'> Discount (%)</label><br>
+ <label for='discount'> Price of origional (%)</label><br>
<input type='number' name='priceChange' id='priceChange' value='<?php echo $data['priceChange']; ?>'>
<label for='priceChange'> Discount change (%/s)</label><br>
<?php
echo "<fieldset><legend>Doomsday clock</legend>";
echo "<div class=clock>";
-echo "<svg class='clockFace' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'><circle r='45' cx='50' cy='50' fill='none' stroke='#a0a0a0' stroke-width='0.2px'/></svg>";
+echo "<svg class='clockFace' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'><circle r='45' cx='50' cy='50' fill='none' stroke='#a0a0a0' stroke-width='0.15px'/></svg>";
for ($i = 0; $i < 360; $i += 10) {
$checked = "";
if ($clock['currentPosition'] == $i) {
-{"currentPosition":270,"movementSpeed":10,"function":"ease"}
\ No newline at end of file
+{"currentPosition":270,"movementSpeed":10,"function":"ease","lightingCues":["true", "false", "true"]}
-{"topText":["It's here!"],"bottomText":["It's here!"],"bannerText":"Buy XMDV!","itemId":1,"currency":{"prefix":"$","postfix":" hairs"},"discount":0,"prefix":"true","round":"true","priceChange":50,"showingExtra":"false","showingTimer":"true","showingBanner":"true","showingSigil":["true","true","false","false"],"timerEnd":1722808645,"timerOffset":-500}
\ No newline at end of file
+{"topText":["It's here!"],"bottomText":["It's here!"],"bannerText":"The quant we created!","itemId":1,"currency":{"prefix":"$","postfix":" hairs"},"discount":70,"prefix":"false","round":"true","priceChange":50,"showingMain":"true","showingAll":"true","showingExtra":"true","showingTimer":"true","showingBanner":"true","showingSigil":["false","false","false","false"],"timerEnd":1722808645,"timerOffset":-500}
\ No newline at end of file
<head>
<meta http-equiv="refres" content="5">
<style>
-:root {
+body {
--background: linear-gradient(#FFFFFF, #EEEEEE);
--dark: #DEDEDE;
--feature-dark: #AAAAEE;
font-family: sans-serif;
font-size: 1.6vh;
color: black;
+
+ opacity: 0;
+ transition: opacity 1.5s;
}
@keyframes spin {
0% {transform: rotate(0turn) scale(1.2);}
left: 6vh;
top: 6vh;
width: 40vh;
+ opacity: 0;
+ transition: opacity 1.5s;
}
.main {
z-index: 0;
padding: 0.5vh;
overflow: hidden;
opacity: 0;
- transition: opacity 1.5s, width 1.5s;
+ transition: opacity 1.5s, width 1.5s, left 1.5s;
+}
+.banner.moved {
+ left: 6vh;
}
.extra {
position: relative;
secondsString = secondsString.padStart(2, "0");
//handle all optional elements showing/hiding
- const timer = document.getElementsByClassName("timer")[0];
- timer.innerHTML = `${minutesString}:${secondsString}`;
- if (data.showingTimer == "true") {
- timer.classList.add("show");
- } else {
- timer.classList.remove("show");
- }
-
- const extra = document.getElementsByClassName("side")[0];
- if (data.showingExtra == "true") {
- extra.classList.add("showExtra");
+ const all = document.getElementById("all");
+ if (data.showingAll == "true") {
+ all.classList.add("show");
} else {
- extra.classList.remove("showExtra");
+ all.classList.remove("show");
}
const banner = document.getElementsByClassName("banner")[0];
banner.classList.remove("show");
}
+ const side = document.getElementsByClassName("side")[0];
+ if (data.showingMain == "true") {
+ side.classList.add("show");
+ banner.classList.remove("moved");
+ } else {
+ side.classList.remove("show");
+ banner.classList.add("moved");
+ }
+ if (data.showingExtra == "true" && data.showingMain == "true") {
+ side.classList.add("showExtra");
+ } else {
+ side.classList.remove("showExtra");
+ }
+
+ const timer = document.getElementsByClassName("timer")[0];
+ timer.innerHTML = `${minutesString}:${secondsString}`;
+ if (data.showingTimer == "true") {
+ timer.classList.add("show");
+ } else {
+ timer.classList.remove("show");
+ }
+
+
const badgeContainer = document.getElementsByClassName("badgeContainer")[0];
if (discount <= 0.99) {
badgeContainer.classList.add("show");
setInterval(draw, 500)
</script>
</head>
- <body onload="frame();update();draw();">
+ <body id="all" class="show" onload="frame();update();draw();">
<canvas id="canvas" style="display: none;"></canvas>
- <div class="container side">
+ <div class="container side show">
<div class="box main">
<h1 id="code"></h1>
<h2 class="feature" id="subtext"></h2>