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

Refactor 20230108 #660

Merged
merged 4 commits into from
Jan 8, 2024
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
Binary file added public/static/favicon.ico
Binary file not shown.
27 changes: 14 additions & 13 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
import '@acab/reset.css'
import type { FC, ReactNode } from 'react'

import Tracker from '@nasustim.com/components/molecules/SEO/Tracker'
import { SITE_DOMAIN, SITE_TITLE } from '../constants'
import { type ReactNode } from 'react'
import Tracker from '@/components/molecules/SEO/Tracker'
import { SITE_DOMAIN, SITE_TITLE } from '@/constants/values'
import { signikaNegative, workSans } from 'src/font'

type Props = {
children: ReactNode
}

const RootLayout: FC<Props> = ({ children }) => (
<html lang='ja'>
<head>
<Tracker gaTrackingId={process.env.GA_MEASUREMENT_ID} />
</head>
<body className={`${signikaNegative.variable} ${workSans.variable}`}>{children}</body>
</html>
)
function RootLayout({ children }: Props) {
return (
<html lang='ja'>
<head>
<Tracker gaTrackingId={process.env.GA_MEASUREMENT_ID} />
</head>
<body className={`${signikaNegative.variable} ${workSans.variable}`}>{children}</body>
</html>
)
}

export default RootLayout

export const metadata = {
title: `top - ${SITE_TITLE}`,
title: `${SITE_TITLE}`,
alternates: {
canonical: `${SITE_DOMAIN}/`,
},
Expand Down
5 changes: 2 additions & 3 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use client'
import Template from '@/components/templates/error'

import Template from '@nasustim.com/components/templates/error'

const Page = () => {
function Page() {
const error = new Error('404 Not Found')
return <Template error={error} />
}
Expand Down
3 changes: 1 addition & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client'

import Index from '@nasustim.com/components/templates/index/index'
import Index from '@/components/templates/index/index'

const Page = () => {
return <Index />
Expand Down
21 changes: 10 additions & 11 deletions src/app/works/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import { Metadata } from 'next'

import { SITE_DOMAIN, SITE_TITLE } from '../../../constants'
import Layout from '@nasustim.com/components/templates/works'
import { SITE_DOMAIN, SITE_TITLE } from '@/constants/values'
import Layout from '@/components/templates/works'

type Props = {
slug: string
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Page = ({ params }: { params: Props }) => {
function Page({ params }: { params: Props }) {
return (
<Layout>
<div>🚧 Under Construction 🚧</div>
</Layout>
)
}

export const generateStaticParams = () => {
// 以前のページで用意していた個別ページ
// ToDo: コンテンツを復活させる
const slugList = [
/**
* Following contents were exists on past portfolio page
* ToDo: remake following contents
*/
export function generateStaticParams() {
return [
'slash-module-slash-whom',
'shokei-no-kagami',
'aster-as-code',
Expand All @@ -31,8 +32,6 @@ export const generateStaticParams = () => {
'oton-glass',
'iamasonic-2019',
].map((slug) => ({ slug }))

return slugList
}

export default Page
Expand All @@ -41,7 +40,7 @@ export async function generateMetadata({ params }: { params: Props }): Promise<M
const slug = params.slug

return {
title: `works - ${SITE_TITLE}`,
title: `${slug} - ${SITE_TITLE}`,
alternates: {
canonical: `${SITE_DOMAIN}/works/${slug}`,
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/Icons/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../constants.scss" as c;
@use "../../../constants/style.scss" as c;

.icon {
width: 100%;
Expand Down
2 changes: 0 additions & 2 deletions src/components/atoms/Icons/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { type FC } from 'react'

import style from './index.module.scss'

import type { IconType } from 'react-icons'
import { AiFillGithub, AiFillFacebook } from 'react-icons/ai'
import { FaKeybase } from 'react-icons/fa'
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/ProfileImage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type FC } from 'react'
import Image from 'next/image'
import styles from './index.module.scss'
import ProfileImageSrc from '@nasustim.com/statics/profile_400x400.jpg'
import ProfileImageSrc from '@/statics/profile_400x400.jpg'

type Props = { width: number; height: number }

Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/Text/H1/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../constants.scss" as c;
@use "../../../../constants/style.scss" as c;

.h1 {
color: c.$color-text-primary;
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/Text/H2/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../constants.scss" as c;
@use "../../../../constants/style.scss" as c;

.h2 {
color: c.$color-text-primary;
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/Text/Link/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../constants.scss" as c;
@use "../../../../constants/style.scss" as c;

.link {
color: c.$color-text-link;
Expand Down
2 changes: 1 addition & 1 deletion src/components/atoms/Text/Plain/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../constants.scss" as c;
@use "../../../../constants/style.scss" as c;

.plain {
color: c.$color-text-primary__sub;
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/ButtonList/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../constants.scss" as c;
@use "../../../constants/style.scss" as c;

.button-list {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/List/li.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Text from '@nasustim.com/components/atoms/Text/Plain'
import Text from '@/components/atoms/Text/Plain'
import type { FC, ReactNode } from 'react'

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/HeaderProfile/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../constants.scss" as c;
@use "../../../constants/style.scss" as c;

.header-profile {
display: flex;
Expand Down
14 changes: 7 additions & 7 deletions src/components/organisms/HeaderProfile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type FC } from 'react'
import style from './index.module.scss'
import ProfileImage from '@nasustim.com/components/atoms/ProfileImage'
import { Facebook, GitHub, Keybase, Blog } from '@nasustim.com/components/atoms/Icons'
import Button from '@nasustim.com/components/atoms/Button'
import ButtonList from '@nasustim.com/components/molecules/ButtonList'
import H1 from '@nasustim.com/components/atoms/Text/H1'
import Link from '@nasustim.com/components/atoms/Text/Link'
import P from '@nasustim.com/components/atoms/Text/Plain'
import ProfileImage from '@/components/atoms/ProfileImage'
import { Facebook, GitHub, Keybase, Blog } from '@/components/atoms/Icons'
import Button from '@/components/atoms/Button'
import ButtonList from '@/components/molecules/ButtonList'
import H1 from '@/components/atoms/Text/H1'
import Link from '@/components/atoms/Text/Link'
import P from '@/components/atoms/Text/Plain'

const imageSize = 144
const snsIconSize = 32
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/_utils/Section/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../constants.scss" as c;
@use "../../../../constants/style.scss" as c;

.section {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { FC } from 'react'
import style from '../index.module.scss'

import Section from '../_utils/Section'
import H1 from '@nasustim.com/components/atoms/Text/H1'
import H1 from '@/components/atoms/Text/H1'

interface Props {
error?: Error
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../constants" as c;
@use "../../constants/style.scss" as c;

.template {
background-color: c.$color-bg-white;
Expand Down
2 changes: 1 addition & 1 deletion src/components/templates/index/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react'
import style from '../index.module.scss'
import Section from '../_utils/Section'
import HeaderProfile from '@nasustim.com/components/organisms/HeaderProfile'
import HeaderProfile from '@/components/organisms/HeaderProfile'

const Template: FC = () => (
<div className={style.template}>
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ //
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": {
"@nasustim.com/statics/*": ["./public/static/*"],
"@nasustim.com/components/*": ["./src/components/*"],
"@/statics/*": ["./public/static/*"],
"@/components/*": ["./src/components/*"],
"@/constants/*": ["./src/constants/*"],
//"containers/*": ["./containers"],
//"pages/*": ["./pages"],
//"repositories/*": ["./repositories"],
Expand Down