Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.
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
52 changes: 52 additions & 0 deletions oh_queue/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,58 @@ a:hover {
text-decoration:none;
}

/* Loading Spinner */
.spinner {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

margin: 100px auto;
width: 40px;
height: 40px;
position: relative;
text-align: center;

-webkit-animation: sk-rotate 2.0s infinite linear;
animation: sk-rotate 2.0s infinite linear;
}

.dot1, .dot2 {
width: 60%;
height: 60%;
display: inline-block;
position: absolute;
top: 0;
background-color: #333;
border-radius: 100%;

-webkit-animation: sk-bounce 2.0s infinite ease-in-out;
animation: sk-bounce 2.0s infinite ease-in-out;
}

.dot2 {
top: auto;
bottom: 0;
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}

@-webkit-keyframes sk-rotate { 100% { -webkit-transform: rotate(360deg) }}
@keyframes sk-rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg) }}

@-webkit-keyframes sk-bounce {
0%, 100% { -webkit-transform: scale(0.0) }
50% { -webkit-transform: scale(1.0) }
}

@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 50% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}



/* Queue styles */

.container,
Expand Down
9 changes: 7 additions & 2 deletions oh_queue/static/js/components/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ let Base = ({state, children}) => {
requestNotificationPermission();
}

// TODO loading indicator instead of blank screen
if (!state.loaded) return null;
// TODO better loading indicator (less jarring)
if (!state.loaded) return (
<div className="spinner">
<div className="dot1"></div>
<div className="dot2"></div>
</div>
)

return (
<div>
Expand Down