Skip to content

Commit

Permalink
feat(cmpts): add unoptimized prop to work image
Browse files Browse the repository at this point in the history
- Added `unoptimized` prop to `IWorkImageProps` interface in WorkImage.tsx
- Set default value of `unoptimized` prop to `false` in WorkSingleImage function
- Updated Image component to pass `unoptimized` prop
- Modified MDX files to include `unoptimized` attribute in WorkImage instances
  • Loading branch information
FradSer committed May 14, 2024
1 parent 40bc9fb commit f2256b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/WorkPage/WorkImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type IWorkImageProps = {
height: number
alt: string
position: ImagePosition
unoptimized: boolean
}

enum ImagePosition {
Expand All @@ -24,6 +25,7 @@ function WorkSingleImage({
height,
alt,
position = ImagePosition.inline,
unoptimized = false,
}: Readonly<IWorkImageProps>) {
// * Styling
const workImageClass = classNames('w-full overflow-hidden', {
Expand All @@ -44,6 +46,7 @@ function WorkSingleImage({
height={height}
alt={alt}
loading="eager"
unoptimized={unoptimized}
/>
<span className="work-caption">{alt}</span>
</div>
Expand Down
2 changes: 2 additions & 0 deletions content/works/pachino.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Pomodoro Technique timer is an app that requires people to be focused for a cert
height="500"
alt="When people accomplish their daily goals."
position="underH2"
unoptimized="true"
/>

In addition, people often do not get instant pleasure from using an efficient app, so the design should also consider some incentives. So by designing daily goals, Pachino gives a valuable and straightforward incentive to the people who use it.
Expand All @@ -53,6 +54,7 @@ In addition, people often do not get instant pleasure from using an efficient ap
height="1920"
alt="Timer screenshot of iOS and macOS."
position="underH2"
unoptimized="true"
/>

In Pomodoro Technique, the idea is that people should have some relaxation after concentrating, and it is a new challenge to exhibit in Pachino. People often get a sense of peace from repetitive and changing graphics, so experimenting with Generative art may be a fun and valuable practice. Once an idea is in your head, it can be impossible to resist the desire to try it. After experimenting with low-level languages like Metal and GLSL, I realized that there are many ways to implement this idea and that the most crucial challenge is the most efficient way to do it. Thanks to p5.js, I quickly implemented Generative art on the browser and achieved very nice results. Finally, to gain an immersive experience, the design removes the status bar in iOS and uses a more unobtrusive color to display the remaining time, a page called zen mode.
Expand Down

0 comments on commit f2256b4

Please sign in to comment.