diff --git a/app/components/crate-header.hbs b/app/components/crate-header.hbs index 438a3731bed..49cd6cb7336 100644 --- a/app/components/crate-header.hbs +++ b/app/components/crate-header.hbs @@ -12,6 +12,11 @@ {{/if}} + {{#if @crate.description}} +
+ {{@crate.description}} +
+ {{/if}} diff --git a/app/components/crate-header.module.css b/app/components/crate-header.module.css index 3f3881432d7..131460b54fd 100644 --- a/app/components/crate-header.module.css +++ b/app/components/crate-header.module.css @@ -30,6 +30,11 @@ height: 32px; } +.description { + margin-top: 15px; + line-height: 1.35; +} + .nav { margin-bottom: 20px; } diff --git a/app/components/loading-spinner.module.css b/app/components/loading-spinner.module.css index 0738b271989..25207b434b0 100644 --- a/app/components/loading-spinner.module.css +++ b/app/components/loading-spinner.module.css @@ -1,19 +1,20 @@ .spinner { --spinner-color: black; --spinner-bg-color: rgba(0, 0, 0, .2); + --spinner-size: 16px; display: inline-block; - height: 16px; - width: 16px; + height: var(--spinner-size); + width: var(--spinner-size); &:after { content: " "; display: block; box-sizing: border-box; - width: 16px; - height: 16px; + width: var(--spinner-size); + height: var(--spinner-size); border-radius: 50%; - border: 3px solid var(--spinner-color); + border: calc(var(--spinner-size) / 5.5) solid var(--spinner-color); border-color: var(--spinner-bg-color) var(--spinner-bg-color) var(--spinner-color) var(--spinner-bg-color); animation: spinner 1.2s linear infinite; } diff --git a/app/styles/crate/version.module.css b/app/styles/crate/version.module.css index ce3e022ff78..26dd6887d12 100644 --- a/app/styles/crate/version.module.css +++ b/app/styles/crate/version.module.css @@ -31,6 +31,23 @@ margin-bottom: 20px; } +.readme-spinner, +.no-readme { + padding: 40px 15px; + text-align: center; + font-size: 20px; + font-weight: 300; + + code { + font-size: 18px; + font-weight: 500; + } +} + +.readme-spinner > div { + --spinner-size: 35px; +} + .crate-downloads { display: flex; flex-wrap: wrap; diff --git a/app/templates/crate/version.hbs b/app/templates/crate/version.hbs index 8989cd9c8e1..0ca7fb8570a 100644 --- a/app/templates/crate/version.hbs +++ b/app/templates/crate/version.hbs @@ -14,17 +14,18 @@ one that has not been yanked.

{{else}} - {{#if this.readme}} + {{#if this.loadReadmeTask.isRunning}} +
+ +
+ {{else if this.readme}}
{{else}} - {{#if this.crate.description}} -
-

About This Package

-

{{ this.crate.description }}

-
- {{/if}} +
+ {{this.crate.name}} v{{this.currentVersion.num}} appears to have no README.md file +
{{/if}} {{/if}}