diff --git a/src/components/ui/cards/EducationCard.astro b/src/components/ui/cards/EducationCard.astro new file mode 100644 index 0000000..443b7d8 --- /dev/null +++ b/src/components/ui/cards/EducationCard.astro @@ -0,0 +1,63 @@ +--- +import { Icon } from 'astro-icon/components'; +import Logo from '@components/ui/logos/Logo.astro'; + +interface Props { + topic: string; + area: string; + date: string; + url: string; + logoUrlLight?: string; + logoUrlDark?: string; + logoIcon?: string; +} + +const { topic, area, date, url, logoUrlLight, logoUrlDark, logoIcon } = Astro.props; +--- + +
+ +
+
+ {logoUrlLight ? ( +
+ +
+ ) : logoIcon ? ( +
+ +
+ ) : null} + +
+ + {topic} + + + {area} - {new Date(date).getFullYear()} + +
+
+
+
+
+ + Visit Page + + +
+
+
+
+
+
diff --git a/src/components/ui/cards/FeaturesCard.astro b/src/components/ui/cards/FeaturesCard.astro index a7ee143..8021f88 100644 --- a/src/components/ui/cards/FeaturesCard.astro +++ b/src/components/ui/cards/FeaturesCard.astro @@ -10,33 +10,26 @@ interface Props { const { title, description, url, icon } = Astro.props; -const baseClasses = 'smooth-reveal-2 group group-hover flex flex-col '; -const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; -const bgColorClasses = - 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; -const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg'; const sizeClasses = 'h-30 w-100 md:w-[300px]'; --- -
+
-
-
+
+
-
- +
+ {title} - + {description}
diff --git a/src/components/ui/cards/HighlightsCard.astro b/src/components/ui/cards/HighlightsCard.astro new file mode 100644 index 0000000..6a5a2b7 --- /dev/null +++ b/src/components/ui/cards/HighlightsCard.astro @@ -0,0 +1,72 @@ +--- +import { Icon } from 'astro-icon/components'; + +import Logo from '@components/ui/logos/Logo.astro'; + +interface Props { + title?: string; + description?: string; + url?: string; + logoUrlLight?: string; + logoUrlDark?: string; + highlights?: string[]; + visitSource?: boolean; +} + +const { title, description, url, logoUrlLight, logoUrlDark, highlights, visitSource } = Astro.props; + +const visitText = visitSource ? 'Visit Source' : 'Visit Page'; +const visitClass = visitSource ? 'card-hover-text-gitea' : 'card-hover-text-title'; +--- + +
diff --git a/src/components/ui/cards/WeatherCard.astro b/src/components/ui/cards/WeatherCard.astro new file mode 100644 index 0000000..46ed209 --- /dev/null +++ b/src/components/ui/cards/WeatherCard.astro @@ -0,0 +1,37 @@ +--- +interface Props { + dayName: string; + label: string; + icon: string; + temp: number; +} + +const { dayName, label, icon, temp } = Astro.props; + +const sizeClasses = 'w-32 md:w-40'; +--- + +
+
+
+ + {dayName} + +
+ {label} +
+
+ + {temp}°F + + + {label} + +
+
+
+
diff --git a/src/components/ui/sections/ApplicationSection.astro b/src/components/ui/sections/ApplicationSection.astro new file mode 100644 index 0000000..b01267d --- /dev/null +++ b/src/components/ui/sections/ApplicationSection.astro @@ -0,0 +1,30 @@ +--- +import { readItems } from '@directus/sdk'; + +import type { Application } from '@lib/directusTypes'; + +import directus from '@lib/directus'; +import HighlightsCard from '@components/ui/cards/HighlightsCard.astro'; + +const applications = ((await directus.request( + readItems('site_applications' as any, { + fields: ['*'], + sort: ['-isActive'], + }) +)) as unknown) as Application[]; +--- + +
+
+ {applications.map((application: Application) => ( + + ))} +
+
diff --git a/src/components/ui/sections/Applications.astro b/src/components/ui/sections/Applications.astro deleted file mode 100644 index dae4fff..0000000 --- a/src/components/ui/sections/Applications.astro +++ /dev/null @@ -1,71 +0,0 @@ ---- -import { Icon } from 'astro-icon/components'; -import { readItems } from '@directus/sdk'; -import Logo from '@components/ui/logos/Logo.astro'; - -import type { Application } from '@lib/directusTypes'; - -import directus from '@lib/directus'; - -const applications = await directus.request( - readItems('site_applications', { - fields: ['*'], - sort: ['-isActive'], - }) -); - -const baseClasses = 'smooth-reveal-cards rounded-xl flex flex-col group group-hover'; -const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; -const bgColorClasses = - 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; -const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg'; ---- - -
- -
diff --git a/src/components/ui/sections/Education.astro b/src/components/ui/sections/Education.astro deleted file mode 100644 index eea5b00..0000000 --- a/src/components/ui/sections/Education.astro +++ /dev/null @@ -1,135 +0,0 @@ ---- -import { Icon } from 'astro-icon/components'; -import { readItems } from '@directus/sdk'; -import Logo from '@components/ui/logos/Logo.astro'; - -import type { Education } from '@lib/directusTypes'; - -import directus from '@lib/directus'; -import { getDirectusImageURL } from '@lib/directusFunctions'; - -const education = await directus.request( - readItems('site_education', { - fields: ['*'], - sort: ['-graduationDate'], - }) -); - -const certificate = await directus.request( - readItems('site_certificate', { - fields: ['*'], - sort: ['-issuerDate'], - }) -); - -const baseClasses = 'rounded-xl flex flex-col group group-hover'; -const borderClasses = 'border border-neutral-100 dark:border-stone-500/20'; -const bgColorClasses = - 'bg-neutral-100/80 hover:bg-neutral-100 dark:bg-neutral-800/60 dark:hover:bg-neutral-800/90'; -const shadowClasses = 'shadow-xs hover:shadow-md dark:shadow-md dark:hover:shadow-lg'; ---- - -
-

- Education -

-
-

- College -

- -
- - { - certificate.length > 0 && ( -
-

- Certificates -

- -
- ) - } -
diff --git a/src/components/ui/sections/EducationSection.astro b/src/components/ui/sections/EducationSection.astro new file mode 100644 index 0000000..5122953 --- /dev/null +++ b/src/components/ui/sections/EducationSection.astro @@ -0,0 +1,65 @@ +--- +import { readItems } from '@directus/sdk'; + +import type { Education, Certificate} from '@lib/directusTypes'; + +import directus from '@lib/directus'; +import { getDirectusImageURL } from '@lib/directusFunctions'; +import EducationCard from '@components/ui/cards/EducationCard.astro'; + +const educations = ((await directus.request( + readItems('site_education' as any, { + fields: ['*'], + sort: ['-graduationDate'], + }) +)) as unknown) as Education[]; + +const certificates = ((await directus.request( + readItems('site_certificate' as any, { + fields: ['*'], + sort: ['-issuerDate'], + }) +)) as unknown) as Certificate[]; +--- + +
+

+ Education +

+
+

+ College +

+
+ {educations.map((education: Education) => ( + + ))} +
+
+ + {certificates.length > 0 && ( +
+

+ Certificates +

+
+ {certificates.map((certificate: Certificate) => ( + + ))} +
+
+ )} +
diff --git a/src/components/ui/sections/Experience.astro b/src/components/ui/sections/Experience.astro index 517b62e..ab53cad 100644 --- a/src/components/ui/sections/Experience.astro +++ b/src/components/ui/sections/Experience.astro @@ -18,7 +18,7 @@ const experiences = await directus.request( class:list={['flex flex-col gap-8', Astro.props.className]} > -

Experience

+

Experience

    { experiences.map( @@ -28,7 +28,7 @@ const experiences = await directus.request( return (
  • -
    +