Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/front-page-list/item/placeholder.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div local-class="link" ...attributes>
<div local-class="left">
<div local-class="title"></div>
{{#if @withSubtitle}}<div local-class="subtitle"></div>{{/if}}
<Placeholder local-class="title" />
{{#if @withSubtitle}}<Placeholder local-class="subtitle" />{{/if}}
</div>
{{svg-jar "chevron-right" local-class="right"}}
</div>
6 changes: 4 additions & 2 deletions app/components/front-page-list/item/placeholder.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.link {
--shadow: 0 2px 3px hsla(51, 50%, 44%, .35);
--placeholder-bg: hsla(59, 19%, 50%, 1.0);
--placeholder-bg2: hsla(59, 19%, 50%, 0.7);

display: flex;
align-items: center;
Expand All @@ -23,15 +25,15 @@
height: 16px;
width: 150px;
border-radius: 8px;
background: hsla(59deg, 19%, 50%, 0.25);
opacity: 0.25;
}

.subtitle {
height: 13px;
width: 90px;
margin-top: 4px;
border-radius: 6.5px;
background: hsla(59deg, 19%, 50%, 0.2);
opacity: 0.2;
}

.right {
Expand Down
1 change: 1 addition & 0 deletions app/components/placeholder.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div local-class="placeholder" ...attributes></div>
22 changes: 22 additions & 0 deletions app/components/placeholder.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.placeholder {
position: relative;
display: block;
overflow: hidden;
background: linear-gradient(to right, var(--placeholder-bg) 8%, var(--placeholder-bg2) 16%, var(--placeholder-bg) 29%);
background-size: 1200px 100%;
animation-name: backgroundAnimation;
animation-duration: 1.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-fill-mode: forwards;
}

@keyframes backgroundAnimation {
0% {
background-position: -500px;
}

100% {
background-position: 500px;
}
}
3 changes: 3 additions & 0 deletions app/styles/application.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
--link-color: rgb(0, 172, 91);
--link-hover-color: #007940;
--separator-color: #284725;

--placeholder-bg: hsl(212, 7%, 57%);
--placeholder-bg2: hsl(213, 16%, 75%);
}

:global(.new-design) {
Expand Down
25 changes: 22 additions & 3 deletions app/styles/crate/version.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
}
}

.readme-spinner,
.no-readme {
padding: 40px 15px;
text-align: center;
Expand All @@ -47,8 +46,28 @@
}
}

.readme-spinner > div {
--spinner-size: 35px;
.placeholder-title {
width: 30%;
height: 25px;
margin: 15px 0 25px;
border-radius: 5px;
opacity: 0.6;
}

.placeholder-subtitle {
width: 50%;
height: 20px;
margin: 35px 0 25px;
border-radius: 5px;
opacity: 0.6;
}

.placeholder-text {
width: 100%;
height: 16px;
margin-top: 15px;
border-radius: 5px;
opacity: 0.3;
}

.sidebar {
Expand Down
11 changes: 10 additions & 1 deletion app/templates/crate/version.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@
<div local-class="docs">
{{#if this.loadReadmeTask.isRunning}}
<div local-class="readme-spinner">
<LoadingSpinner/>
<Placeholder local-class="placeholder-title" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-subtitle" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
<Placeholder local-class="placeholder-text" />
</div>
{{else if this.readme}}
<article aria-label="Readme">
Expand Down