-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add view transitions for PostCard everywhere
- Loading branch information
Showing
14 changed files
with
139 additions
and
24 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -32,7 +32,8 @@ const configData: ConfigType = { | |
SITE_URL: process.env.SITE_URL, | ||
SITE_TITLE: 'Nemanja Mitic', | ||
SITE_DESCRIPTION: 'I am Nemanja, full stack developer', | ||
PAGE_SIZE: { POST_CARD: 3, POST_CARD_SMALL: 10 }, | ||
PAGE_SIZE_POST_CARD: 3, | ||
PAGE_SIZE_POST_CARD_SMALL: 10, | ||
MORE_POSTS_COUNT: 3, | ||
AUTHOR_NAME: 'Nemanja Mitic', | ||
AUTHOR_EMAIL: '[email protected]', | ||
|
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,28 @@ | ||
export interface TransitionNameArgs { | ||
elementId: string; | ||
pageSlug: string; | ||
} | ||
|
||
export type TransitionElementId = Pick<TransitionNameArgs, 'elementId'>; | ||
export type TransitionPageSlug = Pick<TransitionNameArgs, 'pageSlug'>; | ||
|
||
export const getTransitionName = ({ elementId, pageSlug }: TransitionNameArgs): string => | ||
`${elementId}-${pageSlug}`; | ||
|
||
/** apply only slug, returns getTransitionNameFromElementId({elementId}) function */ | ||
export const setTransitionSlug = | ||
({ pageSlug }: TransitionPageSlug) => | ||
({ elementId }: TransitionElementId) => | ||
getTransitionName({ elementId, pageSlug }); | ||
|
||
export const TRANSITION_ELEMENT_IDS = { | ||
POST_CARD: { | ||
HERO_IMAGE: 'post-card-hero-image', | ||
TITLE: 'post-card-title', | ||
DESCRIPTION: 'post-card-description', | ||
META: 'post-card-meta', | ||
}, | ||
EXPLORE: { | ||
YEAR: 'explore-year', | ||
}, | ||
} as const; |
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
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