Skip to content

Commit

Permalink
Merge pull request #46 from piny940/profile
Browse files Browse the repository at this point in the history
プロフィールにqiitaとgithubのアイコンを追加
  • Loading branch information
piny940 authored Oct 23, 2023
2 parents 5a6033d + af4d102 commit 45a7e1c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/components/Portfolio/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { useTheme } from '@/context/ThemeProvider'
import { Profile } from '@/models/profile'
import Image from 'next/image'
import Link from 'next/link'
import styled from 'styled-components'
import githubWhiteIcon from '../../resources/images/common/github-white.png'
import githubIcon from '../../resources/images/common/github.png'
import qiitaIcon from '../../resources/images/common/qiita.png'

const BgDiv = styled.div`
background-image: url('/images/profile/background.png');
Expand Down Expand Up @@ -29,6 +34,8 @@ export const Profiles: React.FC<ProfilesProps> = ({
className = '',
profile,
}) => {
const { theme } = useTheme()

return (
<div
className={
Expand All @@ -45,6 +52,31 @@ export const Profiles: React.FC<ProfilesProps> = ({
className="rounded-circle"
/>
<h1 className="mt-2">Piny940</h1>
<ul className="list-unstyled mt-2 mb-1 d-flex align-items-center">
<li>
<Link
target="_blank"
href={profile.getGithub()}
className="unstyled mx-1"
>
<Image
src={theme === 'light' ? githubIcon : githubWhiteIcon}
width={31}
height={31}
alt="github-icon"
/>
</Link>
</li>
<li>
<Link
href={profile.getQiita()}
target="_blank"
className="unstyled mx-1"
>
<Image src={qiitaIcon} width={31} height={31} alt="qiita-icon" />
</Link>
</li>
</ul>
<p className="mt-3 top-profile">{profile.getFrontDescription()}</p>
</ProfileDiv>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/data/profile.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
frontDescription: 大学進学と共にプログラミングの勉強を始め、Rails・Reactを用いてアルバイト/個人の趣味開発としてwebアプリの開発を行っています。
qiita: https://qiita.com/piny940
github: https://github.com/piny940
4 changes: 4 additions & 0 deletions src/models/profile.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export interface ProfileData {
frontDescription: string
qiita: string
github: string
}

export class Profile {
Expand All @@ -10,4 +12,6 @@ export class Profile {
}

getFrontDescription = () => this.#data.frontDescription
getQiita = () => this.#data.qiita
getGithub = () => this.#data.github
}

0 comments on commit 45a7e1c

Please sign in to comment.