DmitrMakeev
commited on
Commit
•
91f68a0
1
Parent(s):
f628a8a
Update upl_csv.html
Browse files- upl_csv.html +28 -4
upl_csv.html
CHANGED
@@ -64,6 +64,32 @@
|
|
64 |
transform: translate(-50%, -50%);
|
65 |
z-index: 1000;
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
</style>
|
68 |
</head>
|
69 |
<body>
|
@@ -83,9 +109,7 @@
|
|
83 |
<input id="uploadButton" type="submit" value="Upload">
|
84 |
</form>
|
85 |
<div id="result"></div>
|
86 |
-
<div class="
|
87 |
-
<span class="sr-only">Loading...</span>
|
88 |
-
</div>
|
89 |
|
90 |
<!-- Подключение скрипта Notyf -->
|
91 |
<script src="https://cdn.jsdelivr.net/npm/notyf/notyf.min.js"></script>
|
@@ -97,7 +121,7 @@
|
|
97 |
document.getElementById('uploadForm').addEventListener('submit', function(event) {
|
98 |
event.preventDefault();
|
99 |
const form = new FormData(this);
|
100 |
-
const loader = document.querySelector('.
|
101 |
loader.style.display = 'block'; // Показываем спиннер
|
102 |
fetch('/upload_csv', {
|
103 |
method: 'POST',
|
|
|
64 |
transform: translate(-50%, -50%);
|
65 |
z-index: 1000;
|
66 |
}
|
67 |
+
.loader {
|
68 |
+
--b: 10px; /* border thickness */
|
69 |
+
--n: 10; /* number of dashes*/
|
70 |
+
--g: 10deg; /* gap between dashes*/
|
71 |
+
--c: green; /* the color */
|
72 |
+
|
73 |
+
width: 100px; /* size */
|
74 |
+
aspect-ratio: 1;
|
75 |
+
border-radius: 50%;
|
76 |
+
padding: 1px; /* get rid of bad outlines */
|
77 |
+
background: conic-gradient(#0000, var(--c)) content-box;
|
78 |
+
--_m: /* we use +/-1deg between colors to avoid jagged edges */
|
79 |
+
repeating-conic-gradient(#0000 0deg,
|
80 |
+
#000 1deg calc(360deg/var(--n) - var(--g) - 1deg),
|
81 |
+
#0000 calc(360deg/var(--n) - var(--g)) calc(360deg/var(--n))),
|
82 |
+
radial-gradient(farthest-side, #0000 calc(98% - var(--b)), #000 calc(100% - var(--b)));
|
83 |
+
-webkit-mask: var(--_m);
|
84 |
+
mask: var(--_m);
|
85 |
+
-webkit-mask-composite: destination-in;
|
86 |
+
mask-composite: intersect;
|
87 |
+
animation: load 1s infinite steps(var(--n));
|
88 |
+
display: none;
|
89 |
+
}
|
90 |
+
@keyframes load {
|
91 |
+
to { transform: rotate(1turn); }
|
92 |
+
}
|
93 |
</style>
|
94 |
</head>
|
95 |
<body>
|
|
|
109 |
<input id="uploadButton" type="submit" value="Upload">
|
110 |
</form>
|
111 |
<div id="result"></div>
|
112 |
+
<div class="loader center-spinner"></div>
|
|
|
|
|
113 |
|
114 |
<!-- Подключение скрипта Notyf -->
|
115 |
<script src="https://cdn.jsdelivr.net/npm/notyf/notyf.min.js"></script>
|
|
|
121 |
document.getElementById('uploadForm').addEventListener('submit', function(event) {
|
122 |
event.preventDefault();
|
123 |
const form = new FormData(this);
|
124 |
+
const loader = document.querySelector('.loader');
|
125 |
loader.style.display = 'block'; // Показываем спиннер
|
126 |
fetch('/upload_csv', {
|
127 |
method: 'POST',
|