File tree 3 files changed +102
-1
lines changed
3 files changed +102
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ window.onload = async function () {
13
13
14
14
fillBoard ( weights , bias ) ;
15
15
16
+ document . querySelector ( ".loading" ) . style . display = "none" ;
17
+
16
18
document . querySelector ( ".reset" ) . addEventListener ( "click" , function ( ) {
17
19
data = Array . from ( { length : 784 } , ( ) => 0 ) ;
18
20
document . querySelector ( ".output" ) . innerHTML = "" ;
Original file line number Diff line number Diff line change 10
10
</ head >
11
11
< body >
12
12
13
+ < section class ="loading ">
14
+ < div class ="loading-icon "> </ div >
15
+ < div class ="loading-info "> Please wait downloading weights....</ div >
16
+ </ section >
13
17
< section class ="container ">
14
18
< section class ="header ">
15
19
< h1 > Deep Neural Network in pure JS < a href ="https://github.com/vishal-pandey/deep-neural-network-javascript "> < svg height ="20 " aria-hidden ="true " viewBox ="0 0 16 16 " version ="1.1 " width ="32 " data-view-component ="true " class ="octicon octicon-mark-github v-align-middle color-fg-default ">
Original file line number Diff line number Diff line change 68
68
padding : 10px 15px ;
69
69
width : 100% ;
70
70
border : 1px solid lightgrey;
71
- }
71
+ }
72
+
73
+ .loading {
74
+ width : 100% ;
75
+ height : 100% ;
76
+ position : absolute;
77
+ background-color : white;
78
+ display : flex;
79
+ align-items : center;
80
+ justify-content : center;
81
+ flex-direction : column;
82
+ font-size : 20px ;
83
+ color : grey;
84
+ }
85
+
86
+ .loading-icon {
87
+ box-sizing : border-box;
88
+ width : 100px ;
89
+ height : 100px ;
90
+ border : 10px solid grey;
91
+ border-radius : 50% ;
92
+ margin-bottom : 50px ;
93
+ position : relative;
94
+ padding : 0 ;
95
+ animation : spin 1s linear infinite;
96
+ }
97
+
98
+ .loading-icon ::before {
99
+ box-sizing : border-box;
100
+ content : '' ;
101
+ position : absolute;
102
+ transform-origin : 50% 50% ;
103
+ /* left: -10px; */
104
+ /* top: -10px; */
105
+ width : 100px ;
106
+ height : 100px ;
107
+ border : 10px solid rgb (91 , 91 , 91 );
108
+ border-radius : 50% ;
109
+ margin : 0 ;
110
+ padding : 0 ;
111
+ animation : spin 1s linear infinite;
112
+ }
113
+
114
+ .loading-icon ::after {
115
+ box-sizing : border-box;
116
+ content : '' ;
117
+ position : absolute;
118
+ transform-origin : 50% 50% ;
119
+ /* left: -10px; */
120
+ /* top: -10px; */
121
+ width : 100px ;
122
+ height : 100px ;
123
+ border : 10px solid rgb (80 , 80 , 80 );
124
+ border-radius : 50% ;
125
+ margin : 0 ;
126
+ padding : 0 ;
127
+ animation : spin1 1s linear infinite;
128
+ }
129
+
130
+
131
+ @keyframes spin {
132
+ 0% {
133
+ left : 0px ;
134
+ top : 0px ;
135
+ /* transform: rotate(0deg); */
136
+ }
137
+ 50% {
138
+ left : -20px ;
139
+ top : -20px ;
140
+ /* transform: rotate(360deg); */
141
+ }
142
+ 100% {
143
+ left : 0px ;
144
+ top : 0px ;
145
+ /* transform: rotate(0deg); */
146
+ }
147
+ }
148
+
149
+
150
+ @keyframes spin1 {
151
+ 0% {
152
+ left : 0px ;
153
+ top : 0px ;
154
+ /* transform: rotate(0deg); */
155
+ }
156
+ 50% {
157
+ left : 10px ;
158
+ top : 10px ;
159
+ /* transform: rotate(360deg); */
160
+ }
161
+ 100% {
162
+ left : 0px ;
163
+ top : 0px ;
164
+ /* transform: rotate(0deg); */
165
+ }
166
+ }
You can’t perform that action at this time.
0 commit comments