diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-04 12:44:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 12:44:46 +0100 |
commit | 1512af2811cb5b2ffccac5452eb291b1af46f89d (patch) | |
tree | 4ed38403fd371798a3fc6aaba1145cb361e0f6ab /app | |
parent | acae1181206b4c11cc55a699343f302bd1471160 (diff) |
Display fallback link card thumbnail when none is given (#9715)
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/status/components/card.js | 6 | ||||
-rw-r--r-- | app/javascript/styles/mastodon/components.scss | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js index 235d209b8..8491299ef 100644 --- a/app/javascript/mastodon/features/status/components/card.js +++ b/app/javascript/mastodon/features/status/components/card.js @@ -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 ( diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 0f94d8a32..3b18b623f 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -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 { |