-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.ts
75 lines (65 loc) · 2.2 KB
/
constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
Constants that are used throughout the application
--------------------------------------------------
*/
import type {
AbsolutePathString,
UrlString,
WorkingPathString,
} from '../types/strings.ts';
// Constants
const FADE_TRANSITION_VARIANTS = {
hidden: {
opacity: 0,
scale: 0.8,
},
show: {
opacity: 1,
scale: 1,
},
} as const;
// Directories
export const PAGE_TEMPLATES_DIR: WorkingPathString = './src/templates/page';
export const SOCIAL_IMAGE_TEMPLATES_DIR: WorkingPathString =
'./src/templates/social-image';
// Paths
export const INDEX_PATH: AbsolutePathString = '/';
export const ABOUT_PATH: AbsolutePathString = '/about';
export const EXPERIENCE_PATH: AbsolutePathString = '/experience';
export const PROJECTS_PATH: AbsolutePathString = '/projects';
export const PROJECTS_PATH_SHORT: AbsolutePathString = '/p';
export const CONTACT_PATH: AbsolutePathString = '/contact';
export const RESUME_PATH: AbsolutePathString = '/resume';
export const COVER_LETTER_PATH: AbsolutePathString = '/cover-letter';
export const PRIVACY_POLICY_PATH: AbsolutePathString = '/privacy-policy';
export const NOT_FOUND_PATH: AbsolutePathString = '/404';
export const SOCIAL_IMAGES_PATH: AbsolutePathString =
'/__generatedSocialImages';
export const JSON_LD_AUTHOR_PATH: AbsolutePathString = '/author';
// ID used to group together elements for the title animation
export const TITLE_LAYOUT_ID = 'title-layout' as const;
export const BOTPOISON_PUBLIC_KEY =
'pk_eca5c4ea-ccb4-46da-beb0-15c581b6980e' as const;
export const CONTACT_FORM_POST_URL: UrlString =
'https://submit-form.com/re6Xbd2gs' as const;
// Options for the useInView hook. Margin is used to offset the height of the navbar
export const USE_IN_VIEW_OPTIONS = {
amount: 0,
margin: '-68px',
} as const;
// Props for enabling a fade-in animation for a Motion component
export const FADE_IN_ANIMATION_PROPS = {
initial: FADE_TRANSITION_VARIANTS.hidden,
animate: FADE_TRANSITION_VARIANTS.show,
exit: FADE_TRANSITION_VARIANTS.hidden,
} as const;
// Props for setting a spring transition on a Motion component
export const SPRING_TRANSITION_PROPS = {
transition: {
type: 'spring',
stiffness: 220,
damping: 20,
restSpeed: 0.2,
restDelta: 0.08,
},
} as const;