Skip to content

Commit c21d991

Browse files
committed
project 2 - budget tracker
1 parent 95cf200 commit c21d991

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

02_budget-tracker/index.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
7+
<title>Budget Tracker</title>
8+
</head>
9+
<body class="">
10+
<div class="flex flex-col justify-center text-center mt-50 gap-4 ">
11+
<form action="">
12+
<div>
13+
<label for="description">Transaction Description </label>
14+
<input type="text" id="transaction-description" placeholder="Transaction Description" required class="">
15+
</div>
16+
17+
<div>
18+
<label for="amount">Transaction Amount </label>
19+
<input type="number" id="transaction-amount" placeholder="Transaction Amount" required class="">
20+
</div>
21+
22+
<div>
23+
<input type="radio" name="type" value="income" id="income-option">
24+
<label for="income-option" required >Income</label>
25+
26+
<input type="radio" id="expense-option" name="type" value="expense">
27+
<label for="expense-option" required>Expense</label>
28+
</div>
29+
30+
<button type="submit" id="submit-button">Submit</button>
31+
</form>
32+
33+
<div id="transactions-list">
34+
35+
</div>
36+
37+
38+
39+
</div>
40+
41+
42+
<script src="script.js"></script>
43+
44+
</body>
45+
</html>

02_budget-tracker/script.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const description = document.getElementById("transaction-description");
2+
const amount = document.getElementById("transaction-amount");
3+
4+
function getRadioValue(){
5+
const selectRadio = document.querySelector('input[name="type"]:checked');
6+
const resultElement = document.getElementById("result");
7+
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ["./*.html"], // This tells Tailwind to scan all HTML files in the root
4+
theme: {
5+
extend: {},
6+
},
7+
plugins: [],
8+
};

0 commit comments

Comments
 (0)