Skip to content

Commit

Permalink
Merge pull request #71 from FAC-11/progressBar
Browse files Browse the repository at this point in the history
Progress bar
  • Loading branch information
dangerdak authored Oct 12, 2017
2 parents ec7bcc3 + 3579f39 commit 45a75ce
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 28 deletions.
4 changes: 1 addition & 3 deletions public/modal.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
var modal = document.getElementById('modal');
var close = document.getElementsByClassName('close')[0];

var lightbulbs = [].slice.call(
document.querySelectorAll('.lightbulb');
);
var lightbulbs = [].slice.call(document.querySelectorAll('.lightbulb'));

lightbulbs.forEach(function(lightbulb){
lightbulb.addEventListener('click', function () {
Expand Down
10 changes: 0 additions & 10 deletions public/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
color: rgba(165, 84, 236, 1);
}


#myBar {
width: 10%;
height: 30px;
background-color: #4CAF50;
text-align: center; /* To center it horizontally (if you want) */
line-height: 30px; /* To center it vertically */
color: white;
}

.header-background-colour{
background-color: rgba(18, 192, 191, 1);
}
Expand Down
1 change: 1 addition & 0 deletions src/controllers/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports.get = (req, res) => {
res.render('about', {
activePage: { about: true },
pageTitle: 'About Me',
progressPercentage: '60',
previousPage: '/symptoms',
nextPage: '/background',
data,
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/appointments.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports.get = (req, res) => {
pageTitle: 'Your appointment',
data,
checked,
percentage: '15%',
progressPercentage: '20',
previousPage: '/progress',
nextPage: '/symptoms',
});
Expand All @@ -42,7 +42,7 @@ exports.post = (req, res) => {
res.render('appointments', {
activePage: { appointments: true },
pageTitle: 'Your appointment',
percentage: '15%',
progressPercentage: '15%',
previousPage: '/progress',
nextPage: '/symptoms',
messages: [{ error: true, content: 'Sorry - the appointments section couldn\'t be saved' }],
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports.get = (req, res) => {
res.render('background', {
activePage: { background: true },
pageTitle: 'Your background',
percentage: '85%',
progressPercentage: '80',
previousPage: '/about',
nextPage: '/send',
data,
Expand All @@ -17,7 +17,7 @@ exports.get = (req, res) => {
res.render('background', {
activePage: { background: true },
pageTitle: 'Your background',
percentage: '85%',
progressPercentage: '60%',
previousPage: '/about',
nextPage: '/send',
});
Expand Down
1 change: 0 additions & 1 deletion src/controllers/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ exports.get = (req, res) => {
res.render('send', {
activePage: { send: true },
pageTitle: 'Send',
percentage: '95%',
});
};
4 changes: 2 additions & 2 deletions src/controllers/symptoms.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports.get = (req, res) => {
res.render('symptoms', {
activePage: { symptoms: true },
pageTitle: 'Symptoms & Difficulties',
percentage: '40%',
progressPercentage: '40',
previousPage: '/appointments',
nextPage: '/about',
data,
Expand All @@ -30,7 +30,7 @@ exports.post = (req, res) => {
res.render('symptoms', {
activePage: { symptoms: true },
pageTitle: 'Symptoms & Difficulties',
percentage: '40%',
progressPercentage: '40',
previousPage: '/appointments',
nextPage: '/about',
messages: [{ error: true, content: 'Sorry - the symptoms section couldn\'t be saved' }],
Expand Down
2 changes: 1 addition & 1 deletion src/views/appointments.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{> header }}
{{> header }} {{> progress_bar }}


<section class="tc">
Expand Down
5 changes: 0 additions & 5 deletions src/views/helpers/progress.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/views/partials/navbar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<footer class="navbar list flex justify-around pt3 bt b--black-20">
<div class=""><a href={{previousPage}}><img src="https://files.gitter.im/foundersandcoders/AllAboutMe/hAmU/image.png" alt="progress icon"></img></a></div>
<div class=""><a href=/progress><img src="https://files.gitter.im/foundersandcoders/AllAboutMe/UUxu/image.png" alt="progress icon"></img></a></div>
<div class=""><a href={{nextPage}}><img src="https://files.gitter.im/foundersandcoders/AllAboutMe/AMao/image.png" alt="progress icon"></img></a></div>
<div class=""><a href={{nextPage}}><img src="https://files.gitter.im/foundersandcoders/AllAboutMe/AMao/image.png" alt="progress icon" class="nextButton"></img></a></div>
</footer>

</nav>
2 changes: 1 addition & 1 deletion src/views/partials/progress_bar.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div id="myProgress">
<div id="myBar">{{percentage}}</div>
<progress id="myBar" value="{{progressPercentage}}" max="100" class="progressBar w-100 bg-light-green">{{progressPercentage}}</progress>
</div>

0 comments on commit 45a75ce

Please sign in to comment.