Skip to content

Commit

Permalink
init(www.daangnpay.com): init project (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim authored Jun 4, 2021
1 parent e253758 commit 2cea123
Show file tree
Hide file tree
Showing 13 changed files with 416 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true
charset = utf-8
end_of_line = lf

[*.{ts,tsx,js,jsx}]
indent_size = 2
indent_style = space
insert_final_newline = true

[*.json]
indent_size = 2
indent_style = space
insert_final_newline = true
195 changes: 195 additions & 0 deletions _packages/@karrotmarket/prismic-config/schema/pay_contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"Main": {
"body": {
"type": "Slices",
"fieldset": "Slice zone",
"config": {
"labels": {
"hero": []
},
"choices": {
"hero": {
"type": "Slice",
"fieldset": "Hero",
"description": "Hero 섹션",
"icon": "face",
"display": "list",
"non-repeat": {
"image": {
"type": "Image",
"config": {
"constraint": {
"width": 1920,
"height": 1080
},
"thumbnails": [],
"label": "이미지"
}
}
},
"repeat": {}
},
"title_and_description": {
"type": "Slice",
"fieldset": "Title and Description",
"description": "제목과 설명 텍스트가 있는 섹션",
"icon": "subtitles",
"display": "grid",
"non-repeat": {
"key_text": {
"type": "Text",
"config": {
"label": "키 텍스트 (한 단어)"
}
},
"title": {
"type": "StructuredText",
"config": {
"single": "heading1",
"label": "섹션 제목"
}
},
"inverted": {
"type": "Boolean",
"config": {
"placeholder_false": "왼쪽",
"placeholder_true": "오른쪽",
"default_value": false,
"label": "넓은 화면에서 제목 위치"
}
},
"link": {
"type": "Link",
"config": {
"label": "링크",
"placeholder": "바로가기 링크"
}
},
"link_text": {
"type": "Text",
"config": {
"label": "링크 텍스트",
"placeholder": "바로가기 링크 텍스트 (기본 값: 자세히 보기)"
}
},
"description": {
"type": "StructuredText",
"config": {
"multi": "paragraph, strong, em, hyperlink",
"label": "설명"
}
}
},
"repeat": {}
},
"title_and_illustration": {
"type": "Slice",
"fieldset": "Title and Illustration",
"description": "제목과 일러스트가 있는 섹션",
"icon": "subtitles",
"display": "list",
"non-repeat": {
"key_text": {
"type": "Text",
"config": {
"label": "키 텍스트 (한 단어)"
}
},
"title": {
"type": "StructuredText",
"config": {
"single": "heading1",
"label": "섹션 제목"
}
},
"inverted": {
"type": "Boolean",
"config": {
"placeholder_false": "왼쪽",
"placeholder_true": "오른쪽",
"default_value": false,
"label": "넓은 화면에서 제목 위치"
}
},
"link": {
"type": "Link",
"config": {
"label": "바로가기 링크",
"placeholder": "바로가기 링크"
}
},
"link_text": {
"type": "Text",
"config": {
"label": "링크 텍스트",
"placeholder": "바로가기 링크 텍스트 (기본값: 자세히 보기)"
}
},
"illustration": {
"type": "Image",
"config": {
"constraint": {
"width": 560,
"height": 420
},
"thumbnails": [],
"label": "일러스트 이미지"
}
}
},
"repeat": {}
},
"wide_banner": {
"type": "Slice",
"fieldset": "Wide Banner",
"description": "넓은 영역에 걸쳐 섬네일과 문구가 있는 섹션",
"icon": "panorama",
"display": "list",
"non-repeat": {
"thumbnail": {
"type": "Image",
"config": {
"constraint": {
"width": 2160,
"height": 675
},
"thumbnails": [],
"label": "섬네일 이미지"
}
},
"title": {
"type": "StructuredText",
"config": {
"single": "heading1",
"label": "제목"
}
},
"link": {
"type": "Link",
"config": {
"label": "웹 링크",
"placeholder": "웹 바로가기 링크 (없으면 안나옴)"
}
},
"link_text": {
"type": "Text",
"config": {
"label": "링크 텍스트",
"placeholder": "값이 없는 경우 '자세히 보기'로 표시 됨"
}
},
"background_color": {
"type": "Text",
"config": {
"label": "배경 색상 코드",
"placeholder": "e.g. #01AB1C, $carrot500, rgba(0,0,0,0.5)"
}
}
},
"repeat": {}
}
}
}
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"_packages/**",
"team.daangn.com",
"mbti.daangn.com",
"uk.karrotmarket.com"
"uk.karrotmarket.com",
"www.daangnpay.com"
],
"resolutions": {
"react": "0.0.0-experimental-d75105fa9",
Expand Down
8 changes: 8 additions & 0 deletions www.daangnpay.com/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*.js
/*.d.ts

/.cache/
/public/

# v3 존버
/src/__generated__/
77 changes: 77 additions & 0 deletions www.daangnpay.com/gatsby/gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import type { GatsbyConfig } from 'gatsby';

const siteMetadata = {
siteUrl: 'https://daangnpay.com/',
siteName: '당근페이',
};

const config: GatsbyConfig = {
flags: {
FAST_DEV: true,
QUERY_ON_DEMAND: true,
LAZY_IMAGES: true,
PARALLEL_SOURCING: true,
DEV_SSR: false,
},
siteMetadata,
plugins: [
'gatsby-plugin-concurrent-mode',
'gatsby-theme-stitches',
'gatsby-plugin-svgr',
'gatsby-plugin-react-helmet-async',
{
resolve: 'gatsby-plugin-sharp',
options: {
defaults: {
formats: ['avif', 'webp', 'auto'],
placeholder: 'dominantColor',
quality: 80,
breakpoints: [576, 768, 992, 1200, 1400, 1920],
backgroundColor: 'transparent',
tracedSVGOptions: {},
blurredOptions: {},
jpgOptions: {},
pngOptions: {},
webpOptions: {},
avifOptions: {},
},
},
},
'gatsby-transformer-sharp',
'gatsby-plugin-image',
{
resolve: 'gatsby-plugin-typegen',
options: {
outputPath: 'src/__generated__/gatsby-types.d.ts',
emitSchema: {
'src/__generated__/gatsby-schema.graphql': true,
'src/__generated__/gatsby-introspection.json': true,
},
emitPluginDocuments: {
'src/__generated__/gatsby-plugin-documents.graphql': true,
},
},
},
{
resolve: 'gatsby-plugin-manifest',
options: {
name: siteMetadata.siteName,
start_url: '/',
background_color: '#FFFFFF',
icon: 'src/assets/maskable_icon.svg',
},
},
{
resolve: 'gatsby-source-prismic',
options: {
repositoryName: 'karrot',
accessToken: process.env.PRISMIC_ACCESS_TOKEN,
schemas: {
pay_contents: require('@karrotmarket/prismic-config/schema/pay_contents.json'),
},
},
},
],
};

export default config;
17 changes: 17 additions & 0 deletions www.daangnpay.com/gatsby/gatsby-node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { GatsbyNode } from 'gatsby';

export const onCreateBabelConfig: GatsbyNode['onCreateBabelConfig'] = ({
actions,
}) => {
actions.setBabelPlugin({
name: require.resolve('@babel/plugin-transform-react-jsx'),
options: {
runtime: 'automatic',
},
});

actions.setBabelPlugin({
name: require.resolve('babel-plugin-polished'),
options: {},
});
};
9 changes: 9 additions & 0 deletions www.daangnpay.com/graphql.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
schema: src/__generated__/gatsby-introspection.json
documents: src/__generated__/gatsby-plugin-documents.graphql
extensions:
endpoints:
default:
url: http://localhost:8000/___graphql
headers:
user-agent: JS GraphQL
introspect: false
55 changes: 55 additions & 0 deletions www.daangnpay.com/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "www.daangnpay.com",
"version": "0.0.0",
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/daangn/websites.git",
"directory": "daangnpay.com"
},
"maintainers": [
{
"name": "Dylan Ju",
"email": "[email protected]"
},
{
"name": "Tim Kim",
"email": "[email protected]"
}
],
"scripts": {
"prepare-gatsby": "babel gatsby -d . -x .ts,.tsx --presets gatsby-package",
"postinstall": "yarn prepare-gatsby",
"develop": "yarn prepare-gatsby && gatsby develop",
"build": "yarn prepare-gatsby && gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean"
},
"dependencies": {
"@stitches/react": "^0.1.9",
"gatsby": "^3.6.0",
"gatsby-plugin-concurrent-mode": "^0.2.1",
"gatsby-plugin-image": "^1.6.0",
"gatsby-plugin-react-helmet-async": "^1.2.0",
"gatsby-plugin-sharp": "^3.6.0",
"gatsby-plugin-svgr": "^3.0.0-beta.0",
"gatsby-plugin-typegen": "^2.2.4",
"gatsby-source-prismic": "^3.3.6",
"gatsby-theme-stitches": "^0.1.1",
"polished": "^4.1.2",
"react": "experimental",
"react-dom": "experimental",
"react-helmet-async": "^1.0.9",
"sharp": "^0.28.3"
},
"devDependencies": {
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/plugin-transform-react-jsx": "^7.14.3",
"@babel/plugin-transform-typescript": "^7.14.3",
"@karrotmarket/react-stitches": "^0.1.1-0",
"babel-plugin-polished": "^1.1.0",
"babel-preset-gatsby-package": "^1.6.0",
"typescript": "^4.2.4"
}
}
4 changes: 4 additions & 0 deletions www.daangnpay.com/src/assets/maskable_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2cea123

Please sign in to comment.