Browse Source

Display fallback link card thumbnail when none is given (#9715)

pull/4/head
Eugen Rochko 5 years ago
committed by GitHub
parent
commit
1512af2811
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions
  1. +6
    -0
      app/javascript/mastodon/features/status/components/card.js
  2. +9
    -0
      app/javascript/styles/mastodon/components.scss

+ 6
- 0
app/javascript/mastodon/features/status/components/card.js View File

@ -195,6 +195,12 @@ export default class Card extends React.PureComponent {
{thumbnail}
</div>
);
} else {
embed = (
<div className='status-card__image'>
<i className='fa fa-file-text' />
</div>
);
}
return (

+ 9
- 0
app/javascript/styles/mastodon/components.scss View File

@ -2587,6 +2587,15 @@ a.status-card {
flex: 0 0 100px;
background: lighten($ui-base-color, 8%);
position: relative;
.fa {
font-size: 21px;
position: absolute;
transform-origin: 50% 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.status-card.horizontal {

Loading…
Cancel
Save