Skip to content

Commit

Permalink
205 projects individual mobile responsiveness (#272)
Browse files Browse the repository at this point in the history
* style(frontend): 💄 Style project page, change the view from flex to grid

* style(frontend): 💄 style the grid in project page to make it more responsive

* refactor(frontend): ⚰️ remove unecessary stylings

* style(frontend): 💄 add tailwind typography styling to cardtitle and preview text

* style(frontend): 💄 Add responsivness on blocksrenderer
  • Loading branch information
luctra02 authored and GitHub committed Apr 14, 2024
1 parent 0d072ae commit 1273218
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
4 changes: 1 addition & 3 deletions frontend/src/app/blog/[articleSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export default async function Page({

return (
<div className="flex flex-col items-center gap-4">
<div className="w-1/2">
<BlockRendererClient content={content} />
</div>
<BlockRendererClient content={content} />
<div className="flex w-1/2 flex-row items-center gap-1">
<div className="flex flex-1 justify-start gap-1">
{avatarURL && (
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/app/projects/[projectSlug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ export default async function Page({
}
return (
<div className="flex flex-col items-center gap-4">
<div className="w-1/2">
<BlockRendererClient content={content} />
</div>
<BlockRendererClient content={content} />
{graphqlData.data.projects?.data[0].attributes?.satellites?.data
.length != 0 && (
<h1 className="mb-2 mt-2 text-xl font-bold">
Expand Down
27 changes: 15 additions & 12 deletions frontend/src/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default async function ProjectsPage() {
</PageHeaderAndSubtitle>
</div>

<div className="flex flex-wrap justify-center gap-4 md:justify-start">
<div className="grid grid-cols-1 gap-12 md:grid-cols-2 md:gap-16 lg:grid-cols-3 xl:grid-cols-4">
{graphqlData.data.projects.data.map((project) => {
let previewImage =
project?.attributes?.previewImage?.data?.attributes
Expand All @@ -81,14 +81,14 @@ export default async function ProjectsPage() {
}
return (
<Link
className="m-1 transition-transform duration-300 ease-in-out hover:scale-110 hover:transform sm:m-4"
className="h-full transition-transform duration-200 ease-in-out hover:scale-105 hover:transform sm:m-4"
href={"/projects/" + project?.attributes?.slug}
key={project.id}
>
<Card className="md:w-68 flex h-full w-64 flex-col lg:w-72">
<Card className="h-full w-full">
<CardHeader></CardHeader>
<CardContent>
<div className="h-64">
<div className="w-full">
{previewImage ? (
<Image
className="max-h-full max-w-full object-contain"
Expand All @@ -103,14 +103,17 @@ export default async function ProjectsPage() {
</div>
)}
</div>
<CardTitle className="mb-2 mt-2 text-xl font-bold">
{project?.attributes?.title}
</CardTitle>
<p className="break-words">
{SlicePreviewText(
project?.attributes?.content ?? [],
)}
</p>
<div className="prose prose-invert">
<CardTitle className="mb-2 mt-6">
{project?.attributes?.title}
</CardTitle>
<p className="break-words">
{SlicePreviewText(
project?.attributes?.content ??
[],
)}
</p>
</div>
</CardContent>
</Card>
</Link>
Expand Down

0 comments on commit 1273218

Please sign in to comment.