Skip to content

Commit

Permalink
code cleanup + deploy test week 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanvit-Katrekar committed Nov 20, 2024
1 parent 5a10941 commit 505472a
Show file tree
Hide file tree
Showing 14 changed files with 1,605 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.vscode
*__pycache__*
.venv
.DS_Store
instance/
*.db
2 changes: 0 additions & 2 deletions Week 3: Final Project Development/.gitignore

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion Week 3: Final Project Development/README.md

This file was deleted.

Binary file removed Week 3: Final Project Development/comments.db
Binary file not shown.
23 changes: 0 additions & 23 deletions Week 3: Final Project Development/setup_db.py

This file was deleted.

84 changes: 84 additions & 0 deletions docs/Week 2: HTML CSS JS (Frontend)/src/FINALCODE..md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# A Simple Counter Application

### HTML/CSS:

```html
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basketball Score</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<style>
.counter-display {
font-size: 2rem;
margin: 20px 0;
}
</style>
</head>

<body>
<div class="container text-center">
<h1 class="my-4">🏀 Basketball Score</h1>

<!-- Counter Display -->
<div id="counter" class="counter-display">0</div>

<!-- Buttons -->
<div class="d-flex justify-content-center gap-3">
<button id="increase-2" class="btn btn-success">2 Pointer</button>
<button id="increase-3" class="btn btn-success">3 Pointer</button>
<button id="decrease" class="btn btn-danger">Decrease</button>
<button id="reset" class="btn btn-secondary">Reset</button>
</div>
</div>

<!-- JavaScript -->
<script src="script.js"></script>
</body>
</body>

</html>
```

### JavaScript:

```javascript
// Initialize the counter variable
let count = 0;

// Select the display element
const counterDisplay = document.getElementById("counter");

// Function to update the display
function updateDisplay() {
counterDisplay.innerText = count;
}

// Increase count
document.getElementById("increase-2").addEventListener("click", () => {
count += 2;
updateDisplay();
});

// Increase count
document.getElementById("increase-3").addEventListener("click", () => {
count += 3;
updateDisplay();
});

// Decrease count
document.getElementById("decrease").addEventListener("click", () => {
count--;
updateDisplay();
});

// Reset count
document.getElementById("reset").addEventListener("click", () => {
count = 0;
updateDisplay();
});
```
Loading

0 comments on commit 505472a

Please sign in to comment.