diff --git a/src/components/sections/experience/experience-section.tsx b/src/components/sections/experience/experience-section.tsx new file mode 100644 index 0000000..74eb295 --- /dev/null +++ b/src/components/sections/experience/experience-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { ExperienceSection as ExperienceSectionProps } from '@/types/experience-section'; + +export const ExperienceSection = (props: ExperienceSectionProps) => Experience section; diff --git a/src/components/sections/experience/index.ts b/src/components/sections/experience/index.ts new file mode 100644 index 0000000..fe825c4 --- /dev/null +++ b/src/components/sections/experience/index.ts @@ -0,0 +1 @@ +export { ExperienceSection } from './experience-section'; diff --git a/src/components/sections/favorites/favorites-section.tsx b/src/components/sections/favorites/favorites-section.tsx new file mode 100644 index 0000000..eebba44 --- /dev/null +++ b/src/components/sections/favorites/favorites-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { FavoritesSection as FavoritesSectionProps } from '@/types/favorites-section'; + +export const FavoritesSection = (props: FavoritesSectionProps) => Favorites section; diff --git a/src/components/sections/favorites/index.ts b/src/components/sections/favorites/index.ts new file mode 100644 index 0000000..0c0af80 --- /dev/null +++ b/src/components/sections/favorites/index.ts @@ -0,0 +1 @@ +export { FavoritesSection } from './favorites-section'; diff --git a/src/components/sections/main/index.ts b/src/components/sections/main/index.ts new file mode 100644 index 0000000..ffde7f5 --- /dev/null +++ b/src/components/sections/main/index.ts @@ -0,0 +1 @@ +export { MainSection } from './main-section'; diff --git a/src/components/sections/main/main-section.tsx b/src/components/sections/main/main-section.tsx new file mode 100644 index 0000000..d21e829 --- /dev/null +++ b/src/components/sections/main/main-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { MainSection as MainSectionProps } from '@/types/main-section'; + +export const MainSection = (props: MainSectionProps) => Main section; diff --git a/src/components/sections/portfolio/index.ts b/src/components/sections/portfolio/index.ts new file mode 100644 index 0000000..d1885d8 --- /dev/null +++ b/src/components/sections/portfolio/index.ts @@ -0,0 +1 @@ +export { PortfolioSection } from './portfolio-section'; diff --git a/src/components/sections/portfolio/portfolio-section.tsx b/src/components/sections/portfolio/portfolio-section.tsx new file mode 100644 index 0000000..6b5d6f7 --- /dev/null +++ b/src/components/sections/portfolio/portfolio-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { PortfolioSection as PortfolioSectionProps } from '@/types/portfolio-section'; + +export const PortfolioSection = (props: PortfolioSectionProps) => Portfolio section; diff --git a/src/components/sections/skills/index.ts b/src/components/sections/skills/index.ts new file mode 100644 index 0000000..6c700da --- /dev/null +++ b/src/components/sections/skills/index.ts @@ -0,0 +1 @@ +export { SkillsSection } from './skills-section'; diff --git a/src/components/sections/skills/skills-section.tsx b/src/components/sections/skills/skills-section.tsx new file mode 100644 index 0000000..6695388 --- /dev/null +++ b/src/components/sections/skills/skills-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { SkillsSection as SkillsSectionProps } from '@/types/skills-section'; + +export const SkillsSection = (props: SkillsSectionProps) => Skills section; diff --git a/src/components/sections/testimonials/index.ts b/src/components/sections/testimonials/index.ts new file mode 100644 index 0000000..a1b341b --- /dev/null +++ b/src/components/sections/testimonials/index.ts @@ -0,0 +1 @@ +export { TestimonialsSection } from './testimonials-section'; diff --git a/src/components/sections/testimonials/testimonials-section.tsx b/src/components/sections/testimonials/testimonials-section.tsx new file mode 100644 index 0000000..d2cfa67 --- /dev/null +++ b/src/components/sections/testimonials/testimonials-section.tsx @@ -0,0 +1,4 @@ +import { SectionCard } from '@/atoms/section-card'; +import type { TestimonialsSection as TestimonialsSectionProps } from '@/types/testimonials-section'; + +export const TestimonialsSection = (props: TestimonialsSectionProps) => Testimonials section; diff --git a/src/data.ts b/src/data.ts new file mode 100644 index 0000000..b838937 --- /dev/null +++ b/src/data.ts @@ -0,0 +1,32 @@ +import myImage from '@/assets/my-image.jpeg'; +import type { Data } from '@/types/data'; + +export const data: Data = { + seo: { + title: 'Mark Freeman - Senior React Developer', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sodales ac dui at vestibulum. In condimentum metus id dui tincidunt, in blandit mi vehicula.', + }, + main: { + config: { + icon: '', + }, + image: { src: myImage, alt: 'Mark Freeman picture' }, + fullName: 'Mark Freeman', + role: 'Senior React Developer', + details: [ + { label: 'Phone', value: '+48 604 343 212' }, + { label: 'Email', value: 'veeeery.long.email.address@gmail.com' }, + { label: 'From', value: 'Warsaw, Poland' }, + { label: 'Salary range', value: '18 000 - 25 000 PLN' }, + ], + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sodales ac dui at vestibulum. In condimentum metus id dui tincidunt, in blandit mi vehicula. Nulla lacinia, erat sit amet elementum vulputate, lectus mauris volutpat mi, vitae accumsan metus elit ut nunc. Vestibulum lacinia enim eget eros fermentum scelerisque. Proin augue leo, posuere ut imperdiet vitae, fermentum eu ipsum. Sed sed neque sagittis, posuere urna nec, commodo leo. Pellentesque posuere justo vitae massa volutpat maximus.', + tags: [{ name: 'Open for freelance' }, { name: 'Available for mentoring' }, { name: 'Working on side project' }], + action: { + label: 'Download CV', + href: '#', + }, + socials: [], + }, +}; diff --git a/src/data/types/seo.ts b/src/data/types/seo.ts deleted file mode 100644 index 32e1b34..0000000 --- a/src/data/types/seo.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Seo { - title: string; - description: string; -} diff --git a/src/pages/index.astro b/src/pages/index.astro index 1900b37..841ae94 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,11 @@ --- -import { SectionCard } from '@/atoms/section-card'; -import { Typography } from '@/atoms/typography'; -import { LabelledValue } from '@/atoms/labelled-value'; +import { ExperienceSection } from '@/sections/experience'; +import { FavoritesSection } from '@/sections/favorites'; +import { MainSection } from '@/sections/main'; +import { PortfolioSection } from '@/sections/portfolio'; +import { SkillsSection } from '@/sections/skills'; +import { TestimonialsSection } from '@/sections/testimonials'; +import { data } from '../data'; --- @@ -11,22 +15,17 @@ import { LabelledValue } from '@/atoms/labelled-value'; - Welcome to Astro + {data.seo.title} +
- - Main title - Main subtitle - Section title - Section subtitle - Item title - Item subtitle - Tile title - Tile subtitle - Paragraph - +48 604 343 212 - + + {data.skills && } + {data.experience && } + {data.portfolio && } + {data.testimonials && } + {data.favorites && }
diff --git a/src/data/types/common.ts b/src/types/common.ts similarity index 84% rename from src/data/types/common.ts rename to src/types/common.ts index 0a7d4b4..97139e1 100644 --- a/src/data/types/common.ts +++ b/src/types/common.ts @@ -1,5 +1,10 @@ export type Icon = string; +export type LocalImage = { + src: string; + alt: string; +}; + export interface Detail { label: string; value: string | string[]; diff --git a/src/data/types/index.ts b/src/types/data.ts similarity index 100% rename from src/data/types/index.ts rename to src/types/data.ts diff --git a/src/data/types/experience-section.ts b/src/types/experience-section.ts similarity index 100% rename from src/data/types/experience-section.ts rename to src/types/experience-section.ts diff --git a/src/data/types/favorites-section.ts b/src/types/favorites-section.ts similarity index 76% rename from src/data/types/favorites-section.ts rename to src/types/favorites-section.ts index 2518347..ac3e14b 100644 --- a/src/data/types/favorites-section.ts +++ b/src/types/favorites-section.ts @@ -1,28 +1,28 @@ -import type { SectionConfig } from './common'; +import type { LocalImage, SectionConfig } from './common'; interface Book { title: string; - cover: string; + cover: LocalImage; author: string; url?: string; } interface Person { name: string; - image: string; + image: LocalImage; url?: string; } interface Video { title: string; - thumbnail: string; + thumbnail: LocalImage; url: string; } interface Media { title: string; type: string; - image: string; + image: LocalImage; url: string; } diff --git a/src/data/types/main-section.ts b/src/types/main-section.ts similarity index 65% rename from src/data/types/main-section.ts rename to src/types/main-section.ts index 8212837..f4c031a 100644 --- a/src/data/types/main-section.ts +++ b/src/types/main-section.ts @@ -1,7 +1,7 @@ -import type { Detail, SectionConfig, Social, Tag } from './common'; +import type { Detail, LocalImage, SectionConfig, Social, Tag } from './common'; export interface MainSection { - image: string; + image: LocalImage; fullName: string; role: string; details: Detail[]; @@ -9,7 +9,7 @@ export interface MainSection { tags: Tag[]; action: { label: string; - url: string; + href: string; }; socials: Social[]; config: Omit; diff --git a/src/data/types/portfolio-section.ts b/src/types/portfolio-section.ts similarity index 82% rename from src/data/types/portfolio-section.ts rename to src/types/portfolio-section.ts index b70bab3..0811137 100644 --- a/src/data/types/portfolio-section.ts +++ b/src/types/portfolio-section.ts @@ -1,8 +1,8 @@ -import type { Detail, SectionConfig, Social, Tag } from './common'; +import type { Detail, LocalImage, SectionConfig, Social, Tag } from './common'; interface Project { name: string; - image?: string; + image?: LocalImage; startDate: Date; endDate: Date | null; details: Detail[]; diff --git a/src/types/seo.ts b/src/types/seo.ts new file mode 100644 index 0000000..e17f632 --- /dev/null +++ b/src/types/seo.ts @@ -0,0 +1,11 @@ +export interface Seo { + /** + * Title that will be displayed in Google search results and as tab name. To be fully visible in search results, it should be no longer than 60 characters. + */ + title: string; + + /** + * Description that will be displayed in Google search results. To be fully visible in search results, it should be no longer than 160 characters. + */ + description: string; +} diff --git a/src/data/types/skills-section.ts b/src/types/skills-section.ts similarity index 100% rename from src/data/types/skills-section.ts rename to src/types/skills-section.ts diff --git a/src/data/types/testimonials-section.ts b/src/types/testimonials-section.ts similarity index 69% rename from src/data/types/testimonials-section.ts rename to src/types/testimonials-section.ts index c2a0a7c..9edb7a2 100644 --- a/src/data/types/testimonials-section.ts +++ b/src/types/testimonials-section.ts @@ -1,7 +1,7 @@ -import type { SectionConfig } from './common'; +import type { LocalImage, SectionConfig } from './common'; interface Testimonial { - image: string; + image: LocalImage; author: string; relation: string; content: string; diff --git a/tsconfig.json b/tsconfig.json index cd82b3b..5f7bd2f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,7 +32,10 @@ // Add aliases for common paths. "baseUrl": ".", "paths": { - "@/atoms/*": ["src/components/atoms/*"] + "@/atoms/*": ["src/components/atoms/*"], + "@/sections/*": ["src/components/sections/*"], + "@/assets/*": ["src/assets/*"], + "@/types/*": ["src/types/*"] } } }