Skip to content

Commit c71a927

Browse files
committed
index: Replace loading spinners with list item placeholders
1 parent 1dbfbfe commit c71a927

File tree

12 files changed

+193
-81
lines changed

12 files changed

+193
-81
lines changed

app/components/category-list.hbs

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/components/crate-list-name-only.hbs

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/components/crate-list-newest.hbs

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/components/front-page-list.hbs

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/components/front-page-list.module.css

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
<li>
2-
<LinkTo @route={{@route}} @model={{@model}} local-class="link" ...attributes>
3-
<div local-class="left">
4-
<div local-class="title">{{@title}}</div>
5-
{{#if @subtitle}}<div local-class="subtitle">{{@subtitle}}</div>{{/if}}
6-
</div>
7-
{{svg-jar "chevron-right" local-class="right"}}
8-
</LinkTo>
9-
</li>
1+
<LinkTo @route={{@route}} @model={{@model}} local-class="link" ...attributes>
2+
<div local-class="left">
3+
<div local-class="title">{{@title}}</div>
4+
{{#if @subtitle}}<div local-class="subtitle">{{@subtitle}}</div>{{/if}}
5+
</div>
6+
{{svg-jar "chevron-right" local-class="right"}}
7+
</LinkTo>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div local-class="link" ...attributes>
2+
<div local-class="left">
3+
<div local-class="title"></div>
4+
{{#if @withSubtitle}}<div local-class="subtitle"></div>{{/if}}
5+
</div>
6+
{{svg-jar "chevron-right" local-class="right"}}
7+
</div>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.link {
2+
display: flex;
3+
align-items: center;
4+
width: 100%;
5+
min-height: 60px;
6+
margin: 8px 0;
7+
padding: 0 10px;
8+
background-color: var(--main-bg-dark);
9+
}
10+
11+
.left {
12+
flex-grow: 1;
13+
width: 0;
14+
}
15+
16+
.title {
17+
height: 16px;
18+
width: 150px;
19+
border-radius: 8px;
20+
background: rgb(118, 131, 138);
21+
opacity: 0.25;
22+
}
23+
24+
.subtitle {
25+
height: 13px;
26+
width: 90px;
27+
margin-top: 4px;
28+
border-radius: 6.5px;
29+
background: rgb(118, 131, 138);
30+
opacity: 0.2;
31+
}
32+
33+
.right {
34+
flex-shrink: 0;
35+
height: 16px;
36+
width: auto;
37+
margin-left: 10px;
38+
color: rgb(118, 131, 138);
39+
}

app/components/keyword-list.hbs

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/helpers/placeholders.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { helper } from '@ember/component/helper';
2+
3+
export default helper(([count]) => new Array(count));

0 commit comments

Comments
 (0)