99 lines
2.6 KiB
HTML
99 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
|
<title>Wanteds</title>
|
|
|
|
<style>
|
|
@font-face {
|
|
font-family: 'Pricedown';
|
|
src: url('../../font/Pricedown.ttf');
|
|
}
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
#wanteds {
|
|
position: absolute;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
top: 65px;
|
|
right: 22px;
|
|
user-select: none;
|
|
}
|
|
|
|
#wanteds img {
|
|
width: 25px;
|
|
height: 25px;
|
|
margin-right: 5px;
|
|
filter: drop-shadow(0px 0px 1px #000000);
|
|
-webkit-filter: drop-shadow(0px 0px 1px #000000);
|
|
-moz-filter: drop-shadow(0px 0px 1px #000000);
|
|
}
|
|
|
|
#wanteds span {
|
|
color: white;
|
|
font-family: "Pricedown", sans-serif;
|
|
font-size: 2.5em;
|
|
line-height: 1;
|
|
-webkit-text-stroke: 1px black;
|
|
margin-top: -5px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="wanteds" style="display: none;">
|
|
<img src="../../img/wanteds/star.svg" id="wanted-star"> <span id="wanted-count">10</span>
|
|
</div>
|
|
|
|
<script src="../../js/jquery-3.3.1.min.js"></script>
|
|
<script type="text/javascript">
|
|
function setWanteds(count) {
|
|
if (count === 0) {
|
|
$("#wanteds").hide();
|
|
} else {
|
|
$("#wanteds").show();
|
|
$("#wanted-count").text(count.toString());
|
|
}
|
|
}
|
|
|
|
var flashInterval = null;
|
|
|
|
var previousFlashToggle = false;
|
|
var firstToggle = true;
|
|
|
|
function setFlashing(flash) {
|
|
if (previousFlashToggle == flash && !firstToggle) {
|
|
return;
|
|
}
|
|
firstToggle = false;
|
|
previousFlashToggle = flash;
|
|
if (flash) {
|
|
if (flashInterval) {
|
|
clearInterval(flashInterval);
|
|
}
|
|
flashInterval = setInterval(flashWantedImage, 750);
|
|
} else {
|
|
clearInterval(flashInterval);
|
|
$("#wanted-star").css('visibility', 'visible');
|
|
}
|
|
}
|
|
|
|
var flashStatus = false;
|
|
|
|
function flashWantedImage() {
|
|
flashStatus = !flashStatus;
|
|
if (flashStatus) {
|
|
$("#wanted-star").css('visibility', 'visible');
|
|
} else {
|
|
$("#wanted-star").css('visibility', 'hidden');
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |