Skip to content

Commit 1b2f42d

Browse files
committed
[PRAC/ret] Correct logic to create "spinner"
Add for "spinner" wrap, text (for more information). core: B-3 / JS-BL
1 parent d5e161b commit 1b2f42d

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/css/spinner.css

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
.crm__output-table-body-loading-row td {
2+
border-bottom: none;
3+
height: 325px;
4+
}
5+
6+
.spinner-wrap {
27
display: flex;
8+
flex-direction: column;
39
justify-content: center;
410
align-items: center;
5-
border-bottom: none;
6-
height: 325px;
11+
row-gap: 10px;
712
}
813

914
.spinner {
@@ -24,3 +29,23 @@
2429
transform: rotate(360deg);
2530
}
2631
}
32+
33+
.spinner-text {
34+
font-size: 16px;
35+
color: var(--text-gray);
36+
}
37+
38+
/* media queries, any-hover */
39+
40+
@media (max-width: 320px) {
41+
.spinner {
42+
width: 50px;
43+
height: 50px;
44+
border: 10px solid var(--light-purple);
45+
border-top-color: var(--main-purple);
46+
}
47+
48+
.spinner-text {
49+
font-size: 13px;
50+
}
51+
}

core-courses/3-js-basic-level/practicum-js-basic-level/sb-crm-client/js/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,12 @@
434434
loadingTableTrRow.classList.add('crm__output-table-body-loading-row');
435435

436436
loadingTableTdCell.colSpan = 6; // объединение всех колонок
437-
loadingTableTdCell.innerHTML = '<div class="spinner"></div>';
437+
loadingTableTdCell.innerHTML = `
438+
<div class="spinner-wrap">
439+
<div class="spinner"></div>
440+
<span class="spinner-text">Идёт загрузка данных.. подождите!</span>
441+
</div>
442+
`;
438443
loadingTableTdCell.style.textAlign = 'center';
439444
loadingTableTrRow.append(loadingTableTdCell);
440445

0 commit comments

Comments
 (0)