-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// We request a database instance. | ||
const request = indexedDB.open("budgetDatabase", 1); | ||
|
||
// This returns a result that we can then manipulate. | ||
request.onsuccess = (event) => { | ||
console.log(request.result); | ||
console.log(request); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<meta name="theme-color" content="#317EFB"> | ||
<link rel="shortcut icon" href="icons/icon-192x192.png" type="image/x-icon"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<meta name="theme-color" content="#317EFB" /> | ||
<link | ||
rel="shortcut icon" | ||
href="icons/icon-192x192.png" | ||
type="image/x-icon" | ||
/> | ||
|
||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<link rel="stylesheet" href="styles.css"> | ||
<link | ||
rel="stylesheet" | ||
href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" | ||
/> | ||
<link rel="stylesheet" href="styles.css" /> | ||
|
||
<title>Budget Tracker</title> | ||
</head> | ||
<body> | ||
<div class="wrapper"> | ||
<div class="total"> | ||
<div class="total">Your total is: $<span id="total">0</span></div> | ||
</div> | ||
<title>Budget Tracker</title> | ||
</head> | ||
<body> | ||
<div class="wrapper"> | ||
<div class="total"> | ||
<div class="total">Your total is: $<span id="total">0</span></div> | ||
</div> | ||
|
||
<div class="form"> | ||
<input type="text" id="t-name" placeholder="Name of transaction" /> | ||
<input type="number" min="0" id="t-amount" placeholder="Transaction amount" /> | ||
<button id="add-btn"><i class="fa fa-plus buttons"></i> Add Funds</button> | ||
<button id="sub-btn"><i class="fa fa-minus"></i> Subtract Funds</button> | ||
<p class="error"></p> | ||
</div> | ||
<div class="form"> | ||
<input type="text" id="t-name" placeholder="Name of transaction" /> | ||
<input | ||
type="number" | ||
min="0" | ||
id="t-amount" | ||
placeholder="Transaction amount" | ||
/> | ||
<button id="add-btn"> | ||
<i class="fa fa-plus buttons"></i> Add Funds | ||
</button> | ||
<button id="sub-btn"><i class="fa fa-minus"></i> Subtract Funds</button> | ||
<p class="error"></p> | ||
</div> | ||
|
||
<div class="transactions"> | ||
<table> | ||
<thead> | ||
<th>Transaction</th> | ||
<th>Amount</th> | ||
</thead> | ||
<tbody id="tbody"></tbody> | ||
</table> | ||
</div> | ||
|
||
<div class="transactions"> | ||
<table> | ||
<thead> | ||
<th>Transaction</th> | ||
<th>Amount</th> | ||
</thead> | ||
<tbody id="tbody"> | ||
|
||
</tbody> | ||
</table> | ||
<canvas id="myChart"></canvas> | ||
</div> | ||
|
||
<canvas id="myChart"></canvas> | ||
</div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script> | ||
<script src="index.js"></script> | ||
</body> | ||
</html> | ||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script> | ||
<script src="index.js"></script> | ||
<script src="db.js"></script> | ||
</body> | ||
</html> |