Skip to content

Commit

Permalink
Merge pull request #23 from koriuswenda/main
Browse files Browse the repository at this point in the history
  • Loading branch information
billyrumbiak19 authored Jun 25, 2024
2 parents 327d121 + e228729 commit 056d252
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 0 deletions.
17 changes: 17 additions & 0 deletions korius-aplikasi-acak-nomor/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aplikasi Acak Nomor</title>
<link rel="stylesheet" href="style.css">

</head>
<body>

<button id="tombolsaya">Roll</button> <br>
<label id="labelsaya"></label>
<script src="index.js"></script>

</body>
</html>
11 changes: 11 additions & 0 deletions korius-aplikasi-acak-nomor/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tombolsaya =document.getElementById("tombolsaya")
const labelsaya=document.getElementById("labelsaya")
const min = 1;
const max = 10;
let nomorAcak;

tombolsaya.onclick = function(){
nomorAcak = Math.floor ( Math.random() * max ) + min;
labelsaya.textContent = nomorAcak;

}
12 changes: 12 additions & 0 deletions korius-aplikasi-acak-nomor/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
body{
font-family: Verdana;
text-align: center;
}
#myButtons{
font-size: 3em;
padding: 5px 25px;
border-radius: 5px;
}
#myLabel{
font-size: 3em;
}
24 changes: 24 additions & 0 deletions korius-aplikasi/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aplikasi </title>
<link rel="stylesheet" href="style.css">

</head>
<body>


<label id="labelHitung">0</label>
<div id="btnContaniner"><br>

<button id="DescreaseBtn" class="tombol">Descrease</button>
<button id="Reset" class="tombol">Reset</button>
<button id="IncreaseBtn" class="tombol">Increase</button>

</div>
<script src="index.js"></script>

</body>
</html>
26 changes: 26 additions & 0 deletions korius-aplikasi/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const DescreaseBtn = document.getElementById("DescreaseBtn" );
const ResetBtn = document.getElementById("Reset" );
const IncreaseBtn= document.getElementById("IncreaseBtn");
const labelHitung= document.getElementById("labelHitung");
let hitung = 0;

IncreaseBtn.onclick = function() {
hitung++;
console.log(hitung);

labelHitung.textContent = hitung;
}

DescreaseBtn.onclick = function() {
hitung--;
console.log(hitung);

labelHitung.textContent = hitung;
}

ResetBtn.onclick = function() {
hitung = 0;
console.log(hitung);

labelHitung.textContent = hitung;
}
21 changes: 21 additions & 0 deletions korius-aplikasi/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#labelHitung{
display: block;
text-align: center;
font-size: 10em;
font-family: Helvetica;
}
#btnContainer{
text-align: center;
}
.tombol{
padding: 10px 20px;
font-size: 1.5em;
color: white;
background-color: rgb(120, 122, 243);
border-radius: 10px;
cursor: pointer;
transition: background-color 0.25s;
}
.tombol:hover{
background-color: rgb(30, 34, 242);
}

0 comments on commit 056d252

Please sign in to comment.