Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
paplon10 committed Oct 6, 2023
0 parents commit 25935b9
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="./res/css/style.css" />
</head>

<body>
<div class="stred">
<img id="cookie" src="./res/img/ring.png" alt="Cookie" />
<p id="counter">Corruption: 0</p>
</div>


<script src="./res/js/main.js"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions res/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
body{
background-image: url(../img/background.jpg);
background-size: 100%;
background-repeat: no-repeat;
}
#cookie {
max-width: 200px;
width: 100%;
}
#cookie:hover{
transform: scale(1.1);
}
#counter{
text-align: center;
font-size: 150%;
color: white;
}
.stred{
max-width: 150px;
margin-left: auto;
margin-right: auto;
margin-top: 150px;
}
Binary file added res/img/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/img/ring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions res/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const cookie = document.getElementById("cookie");
const counter = document.getElementById("counter");

let numberOfCookies = 0;

cookie.onclick = () => {
//numberOfCookies = numberOfCookies + 1
numberOfCookies++
counter.innerText = "Corruption: " + numberOfCookies;
}

0 comments on commit 25935b9

Please sign in to comment.