Redesign 1 bcrypt #226

Merged
bones7242 merged 156 commits from redesign-1-bcrypt into master 2017-10-30 15:55:14 +01:00
3 changed files with 43 additions and 15 deletions
Showing only changes of commit 37685c3d33 - Show all commits

View file

@ -539,6 +539,14 @@ table {
text-align: center; text-align: center;
} }
.progress-bar--inactive {
color: lightgrey;
}
.progress-bar--active {
color: dodgerblue;
}
/* ---- grid items ---- */ /* ---- grid items ---- */
.grid-item { .grid-item {

View file

@ -62,22 +62,43 @@ function toggleSection(event){
} }
} }
function createProgressBar(element, size){ function createProgressBar(element, size){
var x = 1; console.log('creating progress bar');
var x = 0;
var adder = 1; var adder = 1;
function addOne(){ // create the bar holder & place it
var bars = '<p>|'; var barHolder = document.createElement('p');
for (var i = 0; i < x; i++){ bars += ' | '; } for (var i = 0; i < size; i++) {
bars += '</p>'; const bar = document.createElement('span');
element.innerHTML = bars; bar.innerText = '| ';
if (x === size){ bar.setAttribute('class', 'progress-bar progress-bar--inactive');
adder = -1; barHolder.appendChild(bar);
} else if ( x === 0){ }
adder = 1; element.appendChild(barHolder);
} // get the bars
x += adder; const bars = document.getElementsByClassName('progress-bar');
// function to update the bars' classes
function updateOneBar(){
// update the appropriate bar
if (x > -1 && x < size){
if (adder === 1){
bars[x].setAttribute('class', 'progress-bar progress-bar--active');
} else {
bars[x].setAttribute('class', 'progress-bar progress-bar--inactive');
}
}
// set x
if (x === size){
adder = -1;
} else if ( x === -1){
adder = 1;
}
// update the adder
x += adder;
}; };
setInterval(addOne, 300); // start updater
setInterval(updateOneBar, 300);
} }
function setCookie(key, value) { function setCookie(key, value) {

View file

@ -39,7 +39,6 @@
</div> </div>
</div> </div>
</div> </div>
<div id="publish-status" class="hidden"> <div id="publish-status" class="hidden">
<div id="publish-update" class="row align-content-center"></div> <div id="publish-update" class="row align-content-center"></div>
<div id="publish-progress-bar" class="row align-content-center"></div> <div id="publish-progress-bar" class="row align-content-center"></div>