Skip to content

Commit 92126d6

Browse files
committed
💄 Update skeletons styles
1 parent 4fcf1a3 commit 92126d6

File tree

6 files changed

+27
-21
lines changed

6 files changed

+27
-21
lines changed

src/app/features/home/components/websites-card/websites-card.component.css

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
12
.card.card-websites {
23
cursor: default;
34
opacity: 1;
45
margin: 0;
56
padding: 0 !important;
6-
position: fixed;
77
max-width: 300px;
88
display: flex;
99
flex-direction: column;
10-
transform: translate(0, 70px);
1110
}
1211

1312
.card.card-websites .card-title {

src/app/features/home/components/websites-card/websites-card.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
'Following' : 'Subscribe' }}</button>
1111
</div>
1212
<a class="item" routerLink="/websites">Show more...</a>
13-
</div>
13+
</div>

src/app/features/home/home.component.css

+12-3
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
}
1010

1111
.skeletons {
12-
margin-top: 0.5rem;
12+
display: flex;
13+
flex-direction: column;
14+
gap: 1rem;
1315
}
1416

1517
.news-container {
16-
margin: 0 1rem 1rem 1rem;
18+
margin: 1rem;
1719
}
1820

1921
.top-search {
2022
display: flex;
2123
align-items: center;
22-
position: fixed;
2324
width: inherit;
2425
min-height: 70px;
2526
}
@@ -28,6 +29,14 @@
2829
width: 100%;
2930
}
3031

32+
.websites-wrapper {
33+
position: sticky;
34+
top: 0;
35+
display: flex;
36+
flex-direction: column;
37+
gap: 1rem;
38+
}
39+
3140
@media (max-width: 1200px) {
3241
.home-section .recently .news {
3342
grid-template-columns: repeat(1, 100%);

src/app/features/home/home.component.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
</div>
2020
</section>
2121
<section class="websites">
22-
<div class="top-search">
23-
<app-search-input (search)="search($event)"></app-search-input>
22+
<div class="websites-wrapper">
23+
<div class="top-search">
24+
<app-search-input (search)="search($event)"></app-search-input>
25+
</div>
26+
<app-card-websites-a *ngIf="isLoading"></app-card-websites-a>
27+
<app-websites-card *ngIf="!isLoading" [websites]="websites"></app-websites-card>
2428
</div>
25-
<app-card-websites-a *ngIf="isLoading"></app-card-websites-a>
26-
<app-websites-card *ngIf="!isLoading" [websites]="websites"></app-websites-card>
2729
</section>
28-
</div>
30+
</div>

src/app/shared/skeletons/card-new/card-new.component.css

+6-9
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
min-height: 10rem;
88
height: 13rem;
99
max-height: 13rem;
10-
padding: 1rem 0.5rem;
11-
margin: 0 0 1rem;
10+
padding: 1rem;
1211
gap: 10px;
12+
flex-direction: row-reverse;
1313
}
1414

1515
.card-new .image {
1616
max-height: 100%;
1717
min-width: auto;
1818
height: 12rem;
1919
width: 12rem;
20-
border-radius: 50%;
20+
border-radius: 0.6rem
2121
}
2222

2323
.card-new .content {
@@ -39,15 +39,15 @@
3939
.line {
4040
height: 30px;
4141
border-radius: 8px;
42-
width: 100%;
42+
width: 50%;
4343
}
4444

4545
.line-1 {
4646
width: 90% !important;
4747
}
4848

4949
.line-2 {
50-
width: 70% !important;
50+
width: 60% !important;
5151
}
5252

5353
@media (max-width: 480px) {
@@ -59,11 +59,8 @@
5959
width: 95%;
6060
}
6161

62-
.line-1 {
63-
width: 100% !important;
64-
}
6562

6663
.line-2 {
67-
width: 78% !important;
64+
width: 68% !important;
6865
}
6966
}

src/app/shared/skeletons/card-websites-a/card-websites-a.component.css

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
gap: 1rem;
1515
opacity: 1;
1616
position: fixed;
17-
transform: translate(0, 78px);
1817
}
1918

2019
.card-website .item {

0 commit comments

Comments
 (0)