add wanteds

This commit is contained in:
hydrant
2019-06-26 20:09:19 +02:00
parent 8125ba673e
commit 3a894ddb93
10 changed files with 135 additions and 7 deletions

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Wanteds</title>
<style>
html, body {
margin: 0;
padding: 0;
}
#wanteds {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
top: 40px;
right: 20px;
height: 50px;
padding-top: 10px;
line-height: 50px;
}
#wanteds img {
width: 50px;
height: 50px;
}
#wanteds span {
margin-top: 10px;
margin-left: 5px;
font-size: 50px;
color: white;
font-family: 'Bebas Neue';
}
</style>
</head>
<body>
<div id="wanteds" style="display: none;">
<img src="package://assets/img/wanteds/star.svg" />
<span id="wanted-count">10</span>
</div>
<script src="package://assets/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());
}
}
</script>
</body>
</html>