Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions passenger-counter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# App counter

## About this project

This is a passenger counter app which can be used to count people on a particular railway station. This project is made using HTML , CSS , and Javascript .
Its an iteresting app that you should check out .

# To see the output [CLICK HERE](https://deeps65.github.io/passenger-counter/)


Happy Coding!
38 changes: 38 additions & 0 deletions passenger-counter/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
body {
background-image: url("station.jpg");
background-size: cover;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-weight: bold;
text-align: center;
}

h1 {
margin-top: 10px;
margin-bottom: 10px;
}

h2 {
font-size: 50px;
margin-top: 0;
margin-bottom: 20px;
}

button {
border: none;
padding-top: 10px;
padding-bottom: 10px;
color: white;
font-weight: bold;
width: 200px;
margin-bottom: 5px;
border-radius: 5px;
}

#increment-btn {
background: darkred;
}

#save-btn {
background: darkgreen;
}

15 changes: 15 additions & 0 deletions passenger-counter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<html>
<head><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css">
<link rel="stylesheet" href="index.css">
</head>
<body>
<h1>People entered:</h1>
<h2 id="count-el">0</h2>
<button id="increment-btn" onclick="increment()">INCREMENT</button>
<button id="save-btn" onclick="save()">SAVE</button>
<p id="save-el">Previous entries: </p>
<script src="index.js">
nnerText
</script>
</body>
</html>
15 changes: 15 additions & 0 deletions passenger-counter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
let saveEl = document.getElementById("save-el")
let countEl = document.getElementById("count-el")
let count = 0

function increment() {
count += 1
countEl.textContent = count
}

function save() {
let countStr = count + " - "
saveEl.textContent += countStr
countEl.textContent = 0
count = 0
}
Binary file added passenger-counter/station.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added passenger-counter/yarn.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.