Skip to content

Commit

Permalink
Basics for OnlyKat
Browse files Browse the repository at this point in the history
  • Loading branch information
learning-thing authored Jul 7, 2024
1 parent 1a7cd4f commit a777214
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.title {
font-family: sans-serif;
transition-duration: 2s;
}

#title {
font-family: sans-serif;
transition-duration: .4s;
}

#clickme {
font-family: sans-serif;
transition-duration: 1s;
background-color: black;
color: white;
border-radius: 10px;
padding: 10px;

}

body {

background-color: rgba(82, 77, 129, 0.671);
}
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>OnlyKats</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div id="root">
<h1 id="title">OnlyKats</h1>
<button onclick="initmethod()" id="clickme">Click Me</button>
</div>
</body>
<script src="index.js"></script>
</html>
20 changes: 20 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var x = 1;
var clickCount = 0;

function initmethod() {
clickCount++;
document.getElementById("clickme").innerHTML = "Click Me " + clickCount;

if (x < 9) {
x+=1;
console.log("X is zero");
document.getElementById("title").innerHTML = "Kat Level: "+(x+1);
document.getElementById("title").style.marginLeft = ((x+1)*20) + "px";
} else {
x = 0;
}
}



//#initmethod();

0 comments on commit a777214

Please sign in to comment.