mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
feat(skills): add PHP and Laravel
This commit is contained in:
@ -2,10 +2,11 @@ import { useTheme } from 'next-themes'
|
||||
import Image from 'next/image'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
import type { SkillName } from './skills'
|
||||
import { skills } from './skills'
|
||||
|
||||
export interface SkillComponentProps {
|
||||
skill: string
|
||||
skill: SkillName
|
||||
}
|
||||
|
||||
export const SkillComponent: React.FC<SkillComponentProps> = (props) => {
|
||||
@ -14,10 +15,13 @@ export const SkillComponent: React.FC<SkillComponentProps> = (props) => {
|
||||
const { theme } = useTheme()
|
||||
|
||||
const image = useMemo(() => {
|
||||
if (typeof skillProperties.image !== 'string') {
|
||||
return skillProperties.image[theme ?? 'light']
|
||||
if (typeof skillProperties.image === 'string') {
|
||||
return skillProperties.image
|
||||
}
|
||||
return skillProperties.image
|
||||
if (theme === 'light') {
|
||||
return skillProperties.image.light
|
||||
}
|
||||
return skillProperties.image.dark
|
||||
}, [skillProperties, theme])
|
||||
|
||||
return (
|
||||
|
@ -13,6 +13,7 @@ export const Skills: React.FC = () => {
|
||||
<SkillComponent skill='TypeScript' />
|
||||
<SkillComponent skill='Python' />
|
||||
<SkillComponent skill='C/C++' />
|
||||
<SkillComponent skill='PHP' />
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title='Front-end'>
|
||||
@ -23,11 +24,11 @@ export const Skills: React.FC = () => {
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title='Back-end'>
|
||||
<SkillComponent skill='Laravel' />
|
||||
<SkillComponent skill='Node.js' />
|
||||
<SkillComponent skill='Fastify' />
|
||||
<SkillComponent skill='Prisma' />
|
||||
<SkillComponent skill='PostgreSQL' />
|
||||
<SkillComponent skill='MySQL' />
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title={t('home:skills.software-tools')}>
|
||||
|
@ -3,11 +3,7 @@ export interface Skill {
|
||||
image: string | { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface Skills {
|
||||
[key: string]: Skill
|
||||
}
|
||||
|
||||
export const skills: Skills = {
|
||||
export const skills = {
|
||||
JavaScript: {
|
||||
link: 'https://developer.mozilla.org/docs/Web/JavaScript',
|
||||
image: '/images/skills/JavaScript.png'
|
||||
@ -24,6 +20,14 @@ export const skills: Skills = {
|
||||
link: 'https://isocpp.org/',
|
||||
image: '/images/skills/C-Cpp.png'
|
||||
},
|
||||
PHP: {
|
||||
link: 'https://www.php.net/',
|
||||
image: '/images/skills/PHP.png'
|
||||
},
|
||||
Laravel: {
|
||||
link: 'https://laravel.com/',
|
||||
image: '/images/skills/Laravel.png'
|
||||
},
|
||||
Dart: {
|
||||
link: 'https://dart.dev/',
|
||||
image: '/images/skills/Dart.png'
|
||||
@ -107,3 +111,5 @@ export const skills: Skills = {
|
||||
image: '/images/skills/Docker.png'
|
||||
}
|
||||
} as const
|
||||
|
||||
export type SkillName = keyof typeof skills
|
||||
|
Reference in New Issue
Block a user