Skip to content

Commit

Permalink
Merge pull request #216 from mismith0227/edit-profile
Browse files Browse the repository at this point in the history
プロフィールページの修正
  • Loading branch information
mismith0227 authored Nov 7, 2024
2 parents cd6b4a2 + d1c2b18 commit fed3f36
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 12 deletions.
28 changes: 27 additions & 1 deletion components/pages/AboutContainer/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,37 @@ export const worksData = [
},
]

export const FeaturedInData = [
export const featuredInData = [
{
id: '2024-04-cizucu',
date: '2024年4月',
name: 'cizucu Magazine',
link: 'https://www.cizucu.com/magazines/2024-04-mismith',
},
]

export const awardData = [
{
id: 'domestic',
heading: '国内',
items: [
{
id: '2024-9-sagamihara',
date: '2024年9月',
name: 'フォトシティさがみはら アマチュアの部',
rank: '入選',
},
{
id: '2023-12-houfutenjin',
date: '2023年12月',
name: '天神おんな神輿写真コンテスト',
rank: '特選山口県議会議長賞',
},
],
},
{
id: 'overseas',
heading: '海外',
items: [],
},
]
42 changes: 34 additions & 8 deletions components/pages/AboutContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import { Container } from '@/components/organisms/Container'
import media from '@/styles/media'

import {
awardData,
biographies,
booksData,
exhibitionsData,
FeaturedInData,
featuredInData,
worksData,
} from './data'

Expand All @@ -30,11 +31,6 @@ const StyledHeading = styled(Heading)`
}
`

const StyledLogo = styled(Logo)`
margin-right: 16px;
font-size: 2rem;
`

const Section = styled.section`
margin: 80px 0 0;
Expand Down Expand Up @@ -160,13 +156,14 @@ const ExternalLink = styled.a`

const List = styled.ul`
list-style: none;
margin: 0;
margin: 16px 0 0;
padding: 0;
`

const ListItem = styled.li`
display: flex;
gap: 0 16px;
margin-top: 8px;
`

const ListItemText = styled.p`
Expand All @@ -176,6 +173,7 @@ const ListItemText = styled.p`

const ListItemNote = styled.p`
margin: 0;
flex: 1;
font-weight: bold;
`

Expand Down Expand Up @@ -297,6 +295,34 @@ export const AboutContainer = () => (
</SectionInner>
</Section>

<Section>
<Heading level={2}>Award</Heading>
<SectionInner>
{awardData.map((item) => {
if (item.items.length === 0) {
return null
}
return (
<SectionContent key={item.id}>
<Heading level={3}>{item.heading}</Heading>
<List>
{item.items.map((data) => {
return (
<ListItem key={data.id}>
<ListItemText>{data.date}</ListItemText>
<ListItemNote>
{data.name} {data.rank}
</ListItemNote>
</ListItem>
)
})}
</List>
</SectionContent>
)
})}
</SectionInner>
</Section>

<Section>
<Heading level={2}>Exhibitions</Heading>
<SectionInner>
Expand Down Expand Up @@ -357,7 +383,7 @@ export const AboutContainer = () => (
<Heading level={2}>Featured in</Heading>
<SectionInner>
<List>
{FeaturedInData.map((data) => {
{featuredInData.map((data) => {
return (
<ListItem key={data.id}>
<ListItemText>{data.date}</ListItemText>
Expand Down
11 changes: 8 additions & 3 deletions components/pages/NoteDetailContainer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import dayjs from 'dayjs'
import Image from 'next/image'

import { Heading } from '@/components/atoms/Heading'
import { LinkButton } from '@/components/atoms/LinkButton'
import { ReadNext } from '@/components/molecules/ReadNext'
import { Container } from '@/components/organisms/Container'
import media from '@/styles/media'
Expand Down Expand Up @@ -178,6 +179,11 @@ const StyledReadNext = styled(ReadNext)`
}
`

const BackLink = styled(LinkButton)`
margin: 80px auto 0;
width: min(100%, 300px);
`

type Props = {
data: Blog
body: string
Expand All @@ -193,7 +199,6 @@ export const NoteDetailContainer = ({ data, body }: Props) => (
</Date>
</DateArea>
<Title>{data.title}</Title>

{data.thumbnail && (
<MainVisual
src={data.thumbnail.url}
Expand All @@ -203,18 +208,18 @@ export const NoteDetailContainer = ({ data, body }: Props) => (
loading={'eager'}
/>
)}

<BodyWrap>
<Body
dangerouslySetInnerHTML={{
__html: body,
}}
/>
</BodyWrap>

{data.related_post && data.related_post.length > 0 && (
<StyledReadNext readNestPosts={data.related_post} />
)}

<BackLink href="/note">note一覧へ</BackLink>
</Inner>
</StyledContainer>
)

0 comments on commit fed3f36

Please sign in to comment.