Skip to content

Commit

Permalink
fix: padding and make images responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomKnight287 committed Sep 14, 2023
1 parent b35ad5e commit 761f29c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
body {
@apply bg-[#111010] text-white;
}

.image__container img {
position: unset !important;
}
17 changes: 9 additions & 8 deletions app/project/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ async function ProjectPage(props: Props) {
(p) => encodeURIComponent(p.slug) === encodeURIComponent(props.params.name)
)!;
return (
<div className="min-h-screen lg:pt-20 pt-10 container items-center justify-center flex-col lg:max-w-xl">
<div className="min-h-screen lg:pt-20 lg:p-0 p-5 container items-center justify-center flex-col lg:max-w-xl overflow-hidden">
<BackButton />
<Image
className="max-w-[850px] max-h-[450px] mx-auto rounded-md mt-5"
src={project.image?.url}
alt={project.image?.alt}
width={project.image?.width}
height={project.image?.height}
/>
<div className="w-full image__container">
<Image
className="mx-auto rounded-md mt-5 object-cover w-full h-[unset]"
src={project.image?.url}
alt={project.image?.alt}
fill
/>
</div>
{project.image.source ? (
<p className="text-center text-gray-400">
Source: {project.image.source}
Expand Down

0 comments on commit 761f29c

Please sign in to comment.