Skip to content

Commit 8eb8ad8

Browse files
authored
Merged the "release/v1.0.0" branch to the "main" branch: Release v1.0.0 — Add Counter Program (merge release/v1.0.0 into main)
This merge brings the v1.0.0 Counter Program into main. The release adds a simple web UI (index.html) with a numeric display and three control buttons, a lightweight script (counter-program.js) that manages the count state and onclick handlers for increase, decrease and reset operations, and responsive styling (style/style.css) including a media query. README.md is added to document the project, usage, and contribution guidance. Two small fixes are included: the HTML title typo was corrected from "Cunter Program" to "Counter Program" and a misspelled CSS selector in the media query (buttun:hover) was fixed to button:hover. Before finalizing, confirm the Increase button increments by one, Decrease decrements by one, Reset returns the display to zero, the browser tab shows "Counter Program", responsive font/button sizing behaves on narrow viewports, and the page loads without console errors.
2 parents 3e17a84 + a0883cd commit 8eb8ad8

4 files changed

Lines changed: 159 additions & 0 deletions

File tree

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# **Counter Program**
2+
3+
A simple web-based counter application built using HTML/JavaScript.
4+
5+
6+
7+
## **Version**
8+
9+
**v1.0.0** (Release)
10+
11+
> This is the first official release of the Counter-Program.
12+
13+
14+
15+
## **Table of Contents**
16+
17+
- [Overview](#overview)
18+
- [Features](#features)
19+
- [Getting Started](#getting-started)
20+
- [Prerequisites](#prerequisites)
21+
- [Usage](#usage)
22+
- [Configuration](#configuration)
23+
- [Contributing](#contributing)
24+
- [License](#license)
25+
- [Acknowledgement](#acknowledgement)
26+
27+
28+
29+
## **Overview**
30+
31+
The Counter-Program is a minimalistic web application that allows users to increment, decrement, and reset a displayed count. It is designed for demonstration and learning purposes, showcasing how simple UI and JavaScript logic can interact.
32+
33+
34+
35+
## **Features**
36+
37+
- Increment the counter by clicking the increase button
38+
- Decrement the counter by clicking the decrease button
39+
- Reset the counter to zero
40+
- Simple UI layout with HTML and vanilla JavaScript
41+
- Lightweight and dependency-free
42+
43+
44+
45+
46+
## **Getting Started**
47+
48+
49+
### **Prerequisites**
50+
51+
You only need a modern web browser (Chrome, Firefox, Edge, Safari) — no server setup required.
52+
53+
54+
55+
### **Usage**
56+
57+
1. Visit the [Counter Program](https://amnoor.github.io/Counter-Program) website in your browser.
58+
2. You will see the counter UI with buttons to increment, decrement, and reset.
59+
3. Click the buttons to operate the counter.
60+
61+
62+
63+
## **Configuration**
64+
65+
There’s no build or bundler configuration required for this release. The code uses plain HTML + JavaScript. Future releases may introduce additional features or tooling.
66+
67+
## **Contributing**
68+
69+
Thank you for your interest in contributing!
70+
71+
1. Please fork the repository and create a branch off `develop` (e.g., `feature/your-feature`) and make your changes.
72+
2. After you’ve made your changes, **add your GitHub username** and link it to your GitHub profile in the [Acknowledgement](#acknowledgement) section (for example: `[YourName](https://github.com/YourName)`).
73+
3. Submit a pull request to the `develop` branch for review.
74+
4. Once `develop` is stable and well-tested, we’ll create a release branch (`release/v1.x.x`), merge into `main`, tag it, and publish.
75+
76+
77+
78+
## **License**
79+
80+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
81+
82+
83+
84+
## **Acknowledgement**
85+
86+
A big thank you to everyone who helped test, review, and improve this project. Your contributions are valued and appreciated.
87+
88+
```Acknowledgement
89+
90+
```

counter-program.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const num = document.getElementById("num");
2+
const decreasebtn = document.getElementById("decrease-button");
3+
const resetbtn = document.getElementById("reset-button");
4+
const increasebtn = document.getElementById("increase-button");
5+
let count = 0;
6+
7+
decreasebtn.onclick = function(){
8+
count -= 1;
9+
num.textContent = count;
10+
}
11+
resetbtn.onclick = function(){
12+
count = 0;
13+
num.textContent = count;
14+
}
15+
increasebtn.onclick = function(){
16+
count += 1;
17+
num.textContent = count;
18+
}

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<title>Counter Program</title>
7+
<link rel="stylesheet" href="style/style.css">
8+
</head>
9+
<body>
10+
<div class="container">
11+
<h1 id="num">0</h1>
12+
<button id="decrease-button">Decrease</button>
13+
<button id="reset-button">Reset</button>
14+
<button id="increase-button">Increase</button>
15+
</div>
16+
<script src="counter-program.js"></script>
17+
</body>
18+
</html>

style/style.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.container{
2+
height: 90vh;
3+
text-align: center;
4+
}
5+
#num{
6+
margin-top: 200px;
7+
margin-bottom: 0px;
8+
font-size: 300px;
9+
}
10+
button{
11+
background-color: hsl(0, 100%, 50%);
12+
font-size: x-large;
13+
margin-right: 10px;
14+
margin-left: 10px;
15+
}
16+
button:hover{
17+
cursor: pointer;
18+
font-size: xx-large;
19+
}
20+
@media (max-width: 768px){
21+
#num{
22+
margin-top: 250px;
23+
font-size: 200px;
24+
}
25+
button{
26+
font-size: large;
27+
margin-right: 5px;
28+
margin-left: 5px;
29+
}
30+
button:hover{
31+
font-size: x-large;
32+
}
33+
}

0 commit comments

Comments
 (0)