-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
407 additions
and
219 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
const ProjectLoading = () => ( | ||
<div className="animate-pulse mb-20 lg:mb-24 last:mb-0 flex relative flex-col"> | ||
<div className="aspect-w-1 aspect-h-1 bg-gray-100"></div> | ||
<div className="flex flex-col gap-8"> | ||
<div className="h-[550px] bg-slate-300 w-full" /> | ||
|
||
<div className="bg-slate-300 h-10" /> | ||
</div> | ||
|
||
<div className="bg-slate-300 h-8 w-48 mt-4" /> | ||
|
||
<div className="flex flex-col gap-2 mt-4"> | ||
<div className="bg-slate-300 h-4 w-[80%]" /> | ||
<div className="bg-slate-300 h-4 w-full" /> | ||
<div className="bg-slate-300 h-4 w-[60%]" /> | ||
</div> | ||
</div> | ||
); | ||
|
||
export const ProjectsListLoading = () => { | ||
return <div>Loading...</div>; | ||
return ( | ||
<div id="projects-container" className="bg-white"> | ||
<div className="min-h-[90vh] px-8 md:px-16 lg:px-32 xl:px-60 py-12 lg:py-24 gap-x-20 flex flex-col md:flex-row md:justify-between"> | ||
<div className="flex-1 flex flex-col mt-0"> | ||
{Array.from({ length: 2 }, () => null).map((_, i) => ( | ||
<ProjectLoading key={i} /> | ||
))} | ||
</div> | ||
|
||
<div className="flex-1 flex flex-col mt-20 lg:mt-12"> | ||
{Array.from({ length: 2 }, () => null).map((_, i) => ( | ||
<ProjectLoading key={i} /> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import classnames from "classnames"; | ||
import Image from "next/image"; | ||
|
||
import { | ||
BaseBlock, | ||
GridBlock as IGridBlock, | ||
GridBlockSpacing, | ||
ProjectBlock, | ||
ProjectBlockType, | ||
} from "@/types/global"; | ||
|
||
export function blockIsGridBlock( | ||
block: Partial<BaseBlock> | ProjectBlock | ||
): block is IGridBlock { | ||
return block.type === ProjectBlockType.GRID_BLOCK; | ||
} | ||
|
||
interface FullScreenBlockProps { | ||
block: IGridBlock; | ||
} | ||
|
||
export const GridBlock: React.FC<FullScreenBlockProps> = ({ block }) => ( | ||
<div | ||
className={classnames("flex flex-col px-4 lg:px-24 mb-24", { | ||
"gap-y-0.5": block.spacing === GridBlockSpacing.EXTRA_SMALL, | ||
"gap-y-1": block.spacing === GridBlockSpacing.SMALL, | ||
"gap-y-2": block.spacing === GridBlockSpacing.MEDIUM, | ||
"gap-y-4": block.spacing === GridBlockSpacing.LARGE, | ||
"gap-y-8": block.spacing === GridBlockSpacing.EXTRA_LARGE, | ||
"gap-y-16": block.spacing === GridBlockSpacing.EXTRA_EXTRA_LARGE, | ||
})} | ||
> | ||
{block.gridImages.map((gridImage, index) => ( | ||
<div | ||
key={index} | ||
className={classnames("flex flex-col lg:flex-row", { | ||
"gap-0.5": block.spacing === GridBlockSpacing.EXTRA_SMALL, | ||
"gap-1": block.spacing === GridBlockSpacing.SMALL, | ||
"gap-2": block.spacing === GridBlockSpacing.MEDIUM, | ||
"gap-4": block.spacing === GridBlockSpacing.LARGE, | ||
"gap-8": block.spacing === GridBlockSpacing.EXTRA_LARGE, | ||
"gap-16": block.spacing === GridBlockSpacing.EXTRA_EXTRA_LARGE, | ||
})} | ||
> | ||
{gridImage.images.map((image, index) => ( | ||
<div key={index} className="relative w-full flex-1"> | ||
<Image | ||
alt={image.description || ""} | ||
src={image.url || ""} | ||
loading="lazy" | ||
width={image.details.width || 0} | ||
height={image.details.height || 0} | ||
style={{ | ||
objectFit: "cover", | ||
}} | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
))} | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.