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
32 changes: 32 additions & 0 deletions CSS/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.container {
background-color: rgb(249, 250, 250);
text-align: center;
margin-top: 190px;
}

h1 {
font-size: 200%;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
margin: 5px;
}

input {
font-size: 100%;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
background-color: rgb(208, 213, 218);
margin: 10px;
border-radius: 5px;
border: 2px solid transparent;
}

.result {
font-size: 10%, 1;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
background-color: #3f5181;
color: white;
padding: 10px 2px;
margin: 5px 0;
width: 10%;
border: 2px solid transparent;
border-radius: 10px;
}
File renamed without changes
46 changes: 46 additions & 0 deletions JS/Vanilla.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const up_vote_span = document.querySelector('.up-vote');
const down_vote_span = document.querySelector('.down-vote');
let count = document.querySelector('.number');

let upVote = false;
let downVote = false;

up_vote_span.addEventListener('click', function() {

if (downVote === true) {

up_vote_span.style.color = "#3CBC8D";
down_vote_span.style.color = "dimgray";
count.innerHTML = parseInt(count.innerHTML) + 2;
upVote = true;
downVote = false;

} else if (upVote === false) {
up_vote_span.style.color = "#3CBC8D";
count.innerHTML = parseInt(count.innerHTML) + 1;
upVote = true;
} else if (upVote === true) {
up_vote_span.style.color = "dimgray";
count.innerHTML = parseInt(count.innerHTML) - 1;
upVote = false;
}
});

down_vote_span.addEventListener('click', function() {

if (upVote === true) {
up_vote_span.style.color = "dimgray";
down_vote_span.style.color = "#3CBC8D";
count.innerHTML = parseInt(count.innerHTML) - 2;
downVote = true;
upVote = false;
} else if (downVote === false) {
down_vote_span.style.color = "#3CBC8D";
count.innerHTML = parseInt(count.innerHTML) - 1;
downVote = true;
} else if (downVote === true) {
down_vote_span.style.color = "dimgray";
count.innerHTML = parseInt(count.innerHTML) + 1;
downVote = false;
}
});
39 changes: 21 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href= "styles.css">
<link rel = "icon" type = "logo" href= "Logo.png">
<title>COSSA VOTING POLL</title>
</head>
<body>
<div class="container">
<img src="Logo.png" alt="Abuad logo" style="width:110px;height: 145px;">
<h1>Login</h1>
<br>
<input type="text" placeholder = "matric number">
<br>
<input type="password" placeholder="password">
<br>
<button class="result" type="submit">login</button>
</div>
</body>

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/styles.css">
<link rel="icon" type="logo" href="img/Logo.png">
<title>COSSA VOTING POLL</title>
</head>

<body>
<div class="container">
<img src="Logo.png" alt="Abuad logo" style="width:110px;height: 145px;">
<h1>Login</h1>
<br>
<input type="text" placeholder="matric number">
<br>
<input type="password" placeholder="password">
<br>
<button class="result" type="submit">login</button>
</div>
</body>

</html>
5 changes: 5 additions & 0 deletions note.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
HTML: Page layout and design
CSS: Design
JS: Frontend
Node: Backend
Java Script
29 changes: 0 additions & 29 deletions styles.css

This file was deleted.