Skip to content

Commit

Permalink
Move max-width to container
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm committed Nov 13, 2023
1 parent aa477af commit a06271f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/components/ImageViewer.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
position: relative;
cursor: pointer;

// TODO: should be on a conaitner div
max-width: 770px;
margin: 0 auto;

&:hover .right,
&:hover .left {
opacity: 1;
Expand Down
5 changes: 5 additions & 0 deletions src/pages/Post.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@
max-width: var(--content-page-width-wide);
}
}

.image-viewer-container {
max-width: var(--content-page-width);
margin: 0 auto;
}
4 changes: 3 additions & 1 deletion src/pages/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const PostPage: VoidComponent = () => {
<img class={styles.indexImage} src={data()!.post.indexImage} alt="" />
<PageRenderer content={data()!.post.content} />
<Show when={!!images()}>
<ImageViewer images={images()} />
<div class={styles.imageViewerContainer}>
<ImageViewer images={images()} />
</div>
</Show>
</div>
</Show>
Expand Down

0 comments on commit a06271f

Please sign in to comment.