Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Contacts articles] Contacts 페이지(1/2) - 연락처 컴포넌트 구현 #4

Merged
merged 12 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const isBrowser = typeof window !== 'undefined';
module.exports = {
// debug: true,
i18n: {
defaultLocale: 'en',
locales: ['en', 'de', 'it'],
defaultLocale: 'ko',
locales: ['en'],
},
backend: {
backendOptions: [
Expand Down
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
const path = require('path');

const nextConfig = {
reactStrictMode: false,
sassOptions: {
includePaths: [path.join(__dirname, 'style')],
includePaths: [path.join(__dirname, 'src/styles/base')],
},
};

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"next": "13.5.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-lottie-player": "^1.5.5",
"react-simple-typewriter": "^5.0.1",
"sass": "^1.68.0"
},
"devDependencies": {
Expand All @@ -32,6 +34,7 @@
"@types/node": "20.6.3",
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"@types/react-typist": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"babel-jest": "^29.7.0",
Expand Down
44 changes: 42 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion public/fonts.ts → public/fonts/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import {
Megrim,
IBM_Plex_Mono,
Permanent_Marker,
Baloo_Bhaina_2,
Chakra_Petch,
Solway,
} from 'next/font/google';

// logo
Expand Down Expand Up @@ -33,10 +36,27 @@ export const IBMPlexMono = IBM_Plex_Mono({
variable: '--font-IBMPlexMono',
});

// style
export const solway = Solway({
subsets: ['latin'],
weight: '400',
variable: '--font-solway',
});

// style
export const permanentMarker = Permanent_Marker({
subsets: ['latin'],
weight: '400',
variable: '--font-permanentMarker',
});

export const balooBhaina = Baloo_Bhaina_2({
subsets: ['latin'],
weight: '400',
variable: '--font-balooBhaina',
});

export const chakraPatch = Chakra_Petch({
subsets: ['latin'],
weight: '400',
variable: '--font-chakraPatch',
});
Binary file added public/images/loading/Mango.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions src/app/[lng]/contacts/page.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@import 'mixins';

.container {
position: absolute;
top: 0;
@include center-center(column);
width: 100%;
height: calc(100vh - 80px);
margin-top: 80px;

.wrapper {
@include center-center(column);
width: 800px;

.title-wrapper {
@include center-center(column);
width: 90%;

.title-box {
@include flex(flex-start, center);
width: 95%;
height: 80px;
margin-bottom: 10px;
}

.title {
margin-right: 1rem;
font-family: var(--font-balooBhaina);
@include titleAgain(en);
}

.ko {
@include titleAgain(ko);
}
.sub-title {
margin-left: 2rem;
}
}
}
}

.contents-box {
display: flex;
width: 800px;
height: 100%;

.info-box {
padding-top: 5px;
}
}
46 changes: 46 additions & 0 deletions src/app/[lng]/contacts/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use client';

import { usePathname } from 'next/navigation';
import { useTranslation } from '@/app/i18n/client';
import TypingAni from '@/components/common/effect/TypingAni';
import ContactArticle from '@/components/contacts/ContactArticle';
import LngSwitchButtonCSR from '@/components/language-button/LngSwitchButtonCSR';
import { contactInfos } from '@/constants/contactInfos';
import { LngParamsProps } from '@/types/lngSwitch';
import { getPathFromURL } from '@/utils/common/getPathFromURL';
import styles from './page.module.scss';

export default function Contacts({ params: { lng } }: LngParamsProps) {
const { t } = useTranslation(lng, 'contacts');
const url = getPathFromURL(usePathname());

return (
<div className={styles.container}>
<LngSwitchButtonCSR lng={lng} url={url} />
<div className={styles.wrapper}>
<div className={styles['title-wrapper']}>
<div className={styles['title-box']}>
<h2 className={`${styles.title} ${lng === 'ko' && styles.ko}`}>
{t('title')}
</h2>
<div className={styles['sub-title']}>
<TypingAni lng={lng} />
</div>
</div>
</div>
<div className={styles['contents-box']}>
<div className={styles['info-box']}>
{contactInfos.map((info) => (
<ContactArticle
key={info.title}
title={info.title}
subTitle={info.subTitle}
url={info.url}
/>
))}
</div>
</div>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/[lng]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
mansalva,
megrim,
permanentMarker,
} from '../../../public/fonts';
} from '../../../public/fonts/fonts';
import { languages } from '../i18n/settings';

export async function generateStaticParams() {
Expand Down
8 changes: 8 additions & 0 deletions src/app/i18n/locales/en/contacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "Contacts",
"subTitle1":"prioritizing user experience,",
"subTitle2":"embracing diverse learning opportunities,",
"subTitle3":"ready to collaborate and grow together.",
"subTitle4":"A frontend developer, Seona Lee, who is..."
}

4 changes: 2 additions & 2 deletions src/app/i18n/locales/en/header.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"roadmap": "roadmap",
"dots": "dots"
"dots": "dots",
"contacts": "contacts"
}
8 changes: 8 additions & 0 deletions src/app/i18n/locales/ko/contacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "연결",
"subTitle1":"어제보다는 오늘이 더 나은,",
"subTitle2":"오늘보다는 내일이 더 나은,",
"subTitle3":"더 나은 사용자 경험을 위해 문제를 스스로 정의하고 해결하고자 하는",
"subTitle4":"프론트엔드 개발자 이선아입니다."
}

3 changes: 0 additions & 3 deletions src/app/i18n/locales/ko/dots.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/app/i18n/locales/ko/header.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"roadmap": "이정표",
"dots": "연결"
"dots": "연결",
"contacts": "연락"
}
15 changes: 6 additions & 9 deletions src/components/common/buttons/Button1.module.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
@import 'mixins';

.button-box {
display: flex;
align-items: center;
justify-content: center;
width: 130px;
height: 100%;
@include center-center();
}

.button {
width: 60px;
height: 40px;
padding: 5px 10px;
transition: all 0.5s ease-in-out;
border: 2px solid var(--color-primary);
border-radius: 17px;
color: var(--color-primary);
font-size: 1.3rem;
font-weight: 800;
font-size: 1.1rem;
font-weight: 600;
background: {
image: linear-gradient(45deg, var(--color-primary)50%, transparent 50%);
position: 100%;
Expand Down
15 changes: 8 additions & 7 deletions src/components/common/buttons/Button2.module.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
@import 'mixins';

.button-box {
display: flex;
align-items: center;
justify-content: center;
@include center-center();
width: 130px;
height: 100%;
}

.button {
display: flex;
justify-content: center;
@include center-center();
width: 50px;
height: 30px;
padding-top: 2px;
transition: all 0.3s ease-in-out;
border: 1.5px solid var(--color-light-primary);
border-radius: 17px;
border-radius: var(--rounded-default);
color: var(--color-gray4);
font-size: 1.3rem;
font-weight: 500;
font-size: 1.4rem;
font-weight: 600;
text-align: center;

&:hover {
color: var(--color-primary);
font-weight: 700;
}
}

14 changes: 14 additions & 0 deletions src/components/common/effect/TypingAni.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.box {
font-size: 1.3rem;
line-height: 1.6rem;

&.ko {
font-family: var(--font-ko-wooju);
}

.point {
height: 1.6rem;
color: var(--color-primary);
}
}

Loading