From 6a452a457f9741dddeb85cfc4baccebe0fc6d68a Mon Sep 17 00:00:00 2001
From: Szymon Kin <68154191+hoolek77@users.noreply.github.com>
Date: Tue, 17 Jan 2023 19:39:21 +0100
Subject: [PATCH] Create education section (#150)
---
src/data/index.ts | 4 ++
src/data/sections/education.ts | 30 +++++++++++++
src/pages/index.astro | 2 +
src/sections/education/education-item.astro | 42 +++++++++++++++++++
.../education/education-section.astro | 30 +++++++++++++
src/sections/main/main-section.astro | 2 +-
src/types/data.ts | 2 +
src/types/education-section.ts | 15 +++++++
src/utils/is-section-key.ts | 1 +
9 files changed, 127 insertions(+), 1 deletion(-)
create mode 100644 src/data/sections/education.ts
create mode 100644 src/sections/education/education-item.astro
create mode 100644 src/sections/education/education-section.astro
create mode 100644 src/types/education-section.ts
diff --git a/src/data/index.ts b/src/data/index.ts
index 705112e..88aec02 100644
--- a/src/data/index.ts
+++ b/src/data/index.ts
@@ -1,3 +1,4 @@
+import type { EducationSection } from '@/types/education-section';
import type { ExperienceSection } from '@/types/experience-section';
import type { FavoritesSection } from '@/types/favorites-section';
import type { I18n } from '@/types/i18n';
@@ -7,6 +8,7 @@ import type { Seo } from '@/types/seo';
import type { SkillsSection } from '@/types/skills-section';
import type { TestimonialsSection } from '@/types/testimonials-section';
+import educationData from './sections/education';
import experienceData from './sections/experience';
import favoritesData from './sections/favorites';
import mainData from './sections/main';
@@ -21,6 +23,7 @@ export interface Data {
skills?: SkillsSection;
experience?: ExperienceSection;
portfolio?: PortfolioSection;
+ education?: EducationSection;
testimonials?: TestimonialsSection;
favorites?: FavoritesSection;
}
@@ -41,6 +44,7 @@ const data: Data = {
skills: skillsData,
experience: experienceData,
portfolio: portfolioData,
+ education: educationData,
testimonials: testimonialsData,
favorites: favoritesData,
};
diff --git a/src/data/sections/education.ts b/src/data/sections/education.ts
new file mode 100644
index 0000000..33bceec
--- /dev/null
+++ b/src/data/sections/education.ts
@@ -0,0 +1,30 @@
+import type { EducationSection } from '@/types/education-section';
+
+import { website } from '../socials';
+
+const educationData: EducationSection = {
+ config: {
+ title: 'Education',
+ icon: 'fa6-solid:graduation-cap',
+ },
+ educationItems: [
+ {
+ title: 'Information Technology',
+ institution: 'Wrocław University of Science and Technology',
+ startDate: new Date('2014.10'),
+ endDate: new Date('2016.07'),
+ description: 'Master degree. Specialization in software development.',
+ socials: [website('#')],
+ },
+ {
+ title: 'Information Technology',
+ institution: 'Wrocław University of Science and Technology',
+ startDate: new Date('2011.10'),
+ endDate: new Date('2014.07'),
+ description: "Bachelor's degree. Specialization in application development.",
+ socials: [website('#')],
+ },
+ ],
+};
+
+export default educationData;
diff --git a/src/pages/index.astro b/src/pages/index.astro
index a0b6462..9f4a53e 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,6 +1,7 @@
---
import Sidebar from '@/components/sidebar.astro';
import ThemeToggle from '@/components/theme-toggle.astro';
+import EducationSection from '@/sections/education/education-section.astro';
import ExperienceSection from '@/sections/experience/experience-section.astro';
import FavoritesSection from '@/sections/favorites/favorites-section.astro';
import MainSection from '@/sections/main/main-section.astro';
@@ -50,6 +51,7 @@ const seoImage = seo.image ? seo.image : '/favicon.svg';
{data.skills &&