Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 2f1e1fd

Browse files
committed
adding a spinner to code view when it takes a while to run the AJAX calls
1 parent 792f607 commit 2f1e1fd

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

public/styleguide/assets/spinner.gif

22.9 KB
Loading

public/styleguide/css/styleguide.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,28 @@
587587
color: gray;
588588
font-size: 1em; }
589589

590+
#sg-code-loader {
591+
display: none;
592+
position: absolute;
593+
left: 45%;
594+
top: 20%;
595+
width: 150px;
596+
padding: 10px;
597+
text-align: center;
598+
border-radius: 10px;
599+
background-color: #000;
600+
z-index: 100; }
601+
602+
.spinner {
603+
height: 30px;
604+
width: 30px;
605+
margin-left: auto; margin-right: auto;
606+
background-position: center center;
607+
background-repeat: no-repeat;
608+
background: url('../assets/spinner.gif');
609+
border-radius: 50%;
610+
opacity: .7; }
611+
590612
/* Pattern Lab icon fonts */
591613
@font-face {
592614
font-family: 'icons';

public/styleguide/css/styleguide.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,29 @@ $animate-quick: 0.2s;
813813
font-size: 1em;
814814
}
815815

816+
#sg-code-loader {
817+
display: none;
818+
position: absolute;
819+
left: 45%;
820+
top: 20%;
821+
width: 150px;
822+
padding: 10px;
823+
text-align: center;
824+
border-radius: 10px;
825+
background-color: #000;
826+
z-index: 100;
827+
}
828+
829+
.spinner {
830+
height: 30px;
831+
width: 30px;
832+
margin-left: auto; margin-right: auto;
833+
background-position: center center;
834+
background-repeat: no-repeat;
835+
background: url('../assets/spinner.gif');
836+
border-radius: 50%;
837+
opacity: .7;
838+
}
816839

817840
/* Pattern Lab icon fonts */
818841
@font-face {

0 commit comments

Comments
 (0)