fix youtube/twitter embed styling when there's text
This commit is contained in:
parent
6bc1b08606
commit
70e4b27c03
|
@ -86,7 +86,7 @@ function ItemEmbed ({ item }) {
|
|||
const youtube = item.url?.match(/(https?:\/\/)?((www\.)?(youtube(-nocookie)?|youtube.googleapis)\.com.*(v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)|youtu\.be\/)(?<id>[_0-9a-z-]+)((?:\?|&)(?:t|start)=(?<start>\d+))?/i)
|
||||
if (youtube?.groups?.id) {
|
||||
return (
|
||||
<div style={{ maxWidth: '640px', paddingRight: '15px' }}>
|
||||
<div className={styles.youtubeContainerContainer}>
|
||||
<YouTube
|
||||
videoId={youtube.groups.id} className={styles.youtubeContainer} opts={{
|
||||
playerVars: {
|
||||
|
|
|
@ -36,6 +36,19 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.youtubeContainerContainer {
|
||||
max-width: 640px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.twitterContainer:not(:first-child) {
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
.youtubeContainerContainer:not(:first-child) {
|
||||
margin-top: .75rem;
|
||||
}
|
||||
|
||||
.twitterContainer iframe {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue