Browse Source

Reduce the custom content width and center it. For #1860

pull/2032/head
Gabe Kangas 3 years ago
parent
commit
44dde66b08
No known key found for this signature in database
GPG Key ID: 9A56337728BC81EA
  1. 15
      web/components/ui/CustomPageContent/CustomPageContent.module.scss
  2. 6
      web/components/ui/CustomPageContent/CustomPageContent.tsx

15
web/components/ui/CustomPageContent/CustomPageContent.module.scss

@ -1,12 +1,25 @@
@import 'styles/mixins.scss';
.pageContentContainer {
@include flexCenter;
}
.customPageContent { .customPageContent {
font-size: 16px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
margin: 0; margin: 0;
padding: 0; padding: 0;
width: 80%;
max-width: 1200px;
color: var(--theme-text); color: var(--theme-text);
background-color: var(--theme-background-secondary); background-color: var(--theme-background-secondary);
padding: 0.175em 1em; padding: 1em;
// Allow the content to fill the width on narrow screens.
@media only screen and (max-width: 768px) {
width: 100%;
}
hr { hr {
margin: 1.35em 0; margin: 1.35em 0;

6
web/components/ui/CustomPageContent/CustomPageContent.tsx

@ -7,5 +7,9 @@ interface Props {
export default function CustomPageContent(props: Props) { export default function CustomPageContent(props: Props) {
const { content } = props; const { content } = props;
// eslint-disable-next-line react/no-danger // eslint-disable-next-line react/no-danger
return <div className={s.customPageContent} dangerouslySetInnerHTML={{ __html: content }} />; return (
<div className={s.pageContentContainer}>
<div className={s.customPageContent} dangerouslySetInnerHTML={{ __html: content }} />
</div>
);
} }

Loading…
Cancel
Save