diff --git a/CSS/styles.css b/CSS/styles.css new file mode 100644 index 0000000..bc2ef14 --- /dev/null +++ b/CSS/styles.css @@ -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; +} \ No newline at end of file diff --git a/Logo.png b/IMAGES/Logo.png similarity index 100% rename from Logo.png rename to IMAGES/Logo.png diff --git a/JS/Vanilla.js b/JS/Vanilla.js new file mode 100644 index 0000000..f307a37 --- /dev/null +++ b/JS/Vanilla.js @@ -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; + } +}); \ No newline at end of file diff --git a/index.html b/index.html index 3f33014..6093de1 100644 --- a/index.html +++ b/index.html @@ -1,21 +1,24 @@ - - - - - COSSA VOTING POLL - - -
- Abuad logo -

Login

-
- -
- -
- -
- + + + + + + COSSA VOTING POLL + + + +
+ Abuad logo +

Login

+
+ +
+ +
+ +
+ + \ No newline at end of file diff --git a/note.txt b/note.txt new file mode 100644 index 0000000..e21523b --- /dev/null +++ b/note.txt @@ -0,0 +1,5 @@ +HTML: Page layout and design +CSS: Design +JS: Frontend +Node: Backend +Java Script \ No newline at end of file diff --git a/styles.css b/styles.css deleted file mode 100644 index bea2a47..0000000 --- a/styles.css +++ /dev/null @@ -1,29 +0,0 @@ -.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; -} \ No newline at end of file