1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01:00

feat: add new skills

This commit is contained in:
divlo 2021-06-24 19:46:44 +02:00
parent f5bdd85b73
commit 235c072c21
No known key found for this signature in database
GPG Key ID: 185ED2F15F104E52
11 changed files with 72 additions and 26 deletions

View File

@ -31,9 +31,9 @@ export interface Divlo {
'Open-Source enthusiast' 'Open-Source enthusiast'
] ]
skills: { skills: {
languages: ['JavaScript', 'TypeScript', 'Python', 'Dart'] languages: ['JavaScript', 'TypeScript', 'Python', 'C/C++']
frontEnd: ['HTML', 'CSS', 'SASS', 'React.js (+ Next.js)', 'Flutter'] frontEnd: ['HTML', 'CSS', 'Tailwind CSS', 'React.js (+ Next.js)']
backEnd: ['Node.js', 'Strapi', 'MySQL'] backEnd: ['Node.js', 'Fastify', 'Prisma', 'PostgreSQL', 'MySQL']
tools: ['Ubuntu', 'Hyper Terminal', 'VSCode', 'Git', 'Docker'] tools: ['Ubuntu', 'Hyper Terminal', 'VSCode', 'Git', 'Docker']
} }
} }

View File

@ -1,14 +1,24 @@
import { useTheme } from 'next-themes'
import Image from 'next/image' import Image from 'next/image'
import { useMemo } from 'react'
import { skills } from './skills' import { skills } from './skills'
export interface SkillProps { export interface SkillComponentProps {
skill: keyof typeof skills skill: string
} }
export const Skill: React.FC<SkillProps> = (props) => { export const SkillComponent: React.FC<SkillComponentProps> = (props) => {
const { skill } = props const { skill } = props
const skillProperties = skills[skill] const skillProperties = skills[skill]
const { theme } = useTheme()
const image = useMemo(() => {
if (typeof skillProperties.image !== 'string') {
return skillProperties.image[theme ?? 'light']
}
return skillProperties.image
}, [skillProperties, theme])
return ( return (
<a <a
@ -18,7 +28,7 @@ export const Skill: React.FC<SkillProps> = (props) => {
rel='noopener noreferrer' rel='noopener noreferrer'
> >
<div className='text-center'> <div className='text-center'>
<Image width={60} height={60} alt={skill} src={skillProperties.image} /> <Image width={60} height={60} alt={skill} src={image} />
<p className='mt-1'>{skill}</p> <p className='mt-1'>{skill}</p>
</div> </div>
</a> </a>

View File

@ -1,6 +1,6 @@
import useTranslation from 'next-translate/useTranslation' import useTranslation from 'next-translate/useTranslation'
import { Skill } from './Skill' import { SkillComponent } from './Skill'
import { SkillsSection } from './SkillsSection' import { SkillsSection } from './SkillsSection'
export const Skills: React.FC = () => { export const Skills: React.FC = () => {
@ -9,32 +9,33 @@ export const Skills: React.FC = () => {
return ( return (
<> <>
<SkillsSection title={t('home:skills.languages')}> <SkillsSection title={t('home:skills.languages')}>
<Skill skill='JavaScript' /> <SkillComponent skill='JavaScript' />
<Skill skill='TypeScript' /> <SkillComponent skill='TypeScript' />
<Skill skill='Python' /> <SkillComponent skill='Python' />
<Skill skill='Dart' /> <SkillComponent skill='C/C++' />
</SkillsSection> </SkillsSection>
<SkillsSection title='Front-end'> <SkillsSection title='Front-end'>
<Skill skill='HTML' /> <SkillComponent skill='HTML' />
<Skill skill='CSS' /> <SkillComponent skill='CSS' />
<Skill skill='SASS' /> <SkillComponent skill='Tailwind CSS' />
<Skill skill='React.js (+ Next.js)' /> <SkillComponent skill='React.js (+ Next.js)' />
<Skill skill='Flutter' />
</SkillsSection> </SkillsSection>
<SkillsSection title='Back-end'> <SkillsSection title='Back-end'>
<Skill skill='Node.js' /> <SkillComponent skill='Node.js' />
<Skill skill='Strapi' /> <SkillComponent skill='Fastify' />
<Skill skill='MySQL' /> <SkillComponent skill='Prisma' />
<SkillComponent skill='PostgreSQL' />
<SkillComponent skill='MySQL' />
</SkillsSection> </SkillsSection>
<SkillsSection title={t('home:skills.softwareTools')}> <SkillsSection title={t('home:skills.softwareTools')}>
<Skill skill='Ubuntu' /> <SkillComponent skill='Ubuntu' />
<Skill skill='Hyper' /> <SkillComponent skill='Hyper' />
<Skill skill='Visual Studio Code' /> <SkillComponent skill='Visual Studio Code' />
<Skill skill='Git' /> <SkillComponent skill='Git' />
<Skill skill='Docker' /> <SkillComponent skill='Docker' />
</SkillsSection> </SkillsSection>
</> </>
) )

View File

@ -1,4 +1,13 @@
export const skills = { export interface Skill {
link: string
image: string | { [key: string]: string }
}
export interface Skills {
[key: string]: Skill
}
export const skills: Skills = {
JavaScript: { JavaScript: {
link: 'https://developer.mozilla.org/docs/Web/JavaScript', link: 'https://developer.mozilla.org/docs/Web/JavaScript',
image: '/images/skills/JavaScript.png' image: '/images/skills/JavaScript.png'
@ -11,6 +20,10 @@ export const skills = {
link: 'https://www.python.org/', link: 'https://www.python.org/',
image: '/images/skills/Python.png' image: '/images/skills/Python.png'
}, },
'C/C++': {
link: 'https://isocpp.org/',
image: '/images/skills/C-Cpp.png'
},
Dart: { Dart: {
link: 'https://dart.dev/', link: 'https://dart.dev/',
image: '/images/skills/Dart.png' image: '/images/skills/Dart.png'
@ -27,6 +40,10 @@ export const skills = {
link: 'https://developer.mozilla.org/docs/Web/CSS', link: 'https://developer.mozilla.org/docs/Web/CSS',
image: '/images/skills/CSS.png' image: '/images/skills/CSS.png'
}, },
'Tailwind CSS': {
link: 'https://tailwindcss.com/',
image: '/images/skills/TailwindCSS.png'
},
SASS: { SASS: {
link: 'https://sass-lang.com/', link: 'https://sass-lang.com/',
image: '/images/skills/SASS.svg' image: '/images/skills/SASS.svg'
@ -39,6 +56,24 @@ export const skills = {
link: 'https://nodejs.org/', link: 'https://nodejs.org/',
image: '/images/skills/NodeJS.png' image: '/images/skills/NodeJS.png'
}, },
Fastify: {
link: 'https://www.fastify.io/',
image: {
light: '/images/skills/Fastify-light.png',
dark: '/images/skills/Fastify-dark.png'
}
},
Prisma: {
link: 'https://www.prisma.io/',
image: {
light: '/images/skills/Prisma-light.png',
dark: '/images/skills/Prisma-dark.png'
}
},
PostgreSQL: {
link: 'https://www.postgresql.org/',
image: '/images/skills/PostgreSQL.png'
},
MySQL: { MySQL: {
link: 'https://www.mysql.com/', link: 'https://www.mysql.com/',
image: '/images/skills/MySQL.png' image: '/images/skills/MySQL.png'

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB