Skip to content

Commit

Permalink
add loading symbol to panel since it takes a while
Browse files Browse the repository at this point in the history
  • Loading branch information
insanj committed Dec 29, 2020
1 parent 1df268b commit 7dc8dce
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<body>
<div id="sammy-panel">
<div class="panel-header">
sammy.best
sammy.best <div id="sammy-loadin">[loadin, gimme just a moment]</div>
</div>

<div class="panel-subtitle">
Expand Down
6 changes: 5 additions & 1 deletion public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ turnAllMaterials = (thing, hex='ffacac', checkSelected=true) => {
}
}


let fadeAllMaterials = (thing, opacity) => {};
fadeAllMaterials = (thing, opacity) => {
if (!thing) {
Expand Down Expand Up @@ -511,6 +510,11 @@ function loadSammy() {
// }

playSammySoundtrack();

const loadinDiv = document.getElementById('sammy-loadin');
if (loadinDiv) {
loadinDiv.outerHTML = '';
}
}).catch(error => {
alert(error);
});
Expand Down
13 changes: 13 additions & 0 deletions public/sammy.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ footer a {
/* text-shadow: 0px -1px 1px rgba(255,255,250,0.1); */
}

#sammy-loadin {
display: inline-block;
vertical-align: top;

font-size: 10px;
font-weight: 400;
line-height: 1;
overflow: hidden;

width: 60px;
height: 24px;
}

.panel-subtitle {
line-height: 1;
padding: 0px 6px 0px 16px;
Expand Down

0 comments on commit 7dc8dce

Please sign in to comment.