Make exception for markdown files
This commit is contained in:
parent
9309fa1677
commit
2ae3255d01
2 changed files with 15 additions and 3 deletions
|
@ -20,14 +20,19 @@ type Props = {
|
|||
nsfw: boolean,
|
||||
claim: StreamClaim,
|
||||
thumbnail: ?string,
|
||||
contentType: string,
|
||||
fileType: string,
|
||||
};
|
||||
|
||||
function LayoutWrapperText(props: Props) {
|
||||
const { uri, claim, title, nsfw } = props;
|
||||
const { uri, claim, title, nsfw, contentType, fileType } = props;
|
||||
|
||||
const markdownType = ['md', 'markdown'];
|
||||
const isMd = markdownType.includes(fileType) || contentType === 'text/markdown' || contentType === 'text/md';
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="main__document-wrapper">
|
||||
<div className={`main__document-wrapper${isMd ? '-md' : ''}`}>
|
||||
<ClaimUri uri={uri} />
|
||||
|
||||
<div className="media__title">
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
|
||||
.main__document-wrapper {
|
||||
max-width: 100%;
|
||||
min-width: 80%;
|
||||
min-width: 40em;
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
margin-bottom: var(--spacing-xlarge);
|
||||
|
@ -112,3 +112,10 @@
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.main__document-wrapper-md {
|
||||
@extend .main__document-wrapper;
|
||||
width: 40em;
|
||||
max-width: unset;
|
||||
min-width: unset;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue