├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── server ├── config.json ├── database.json └── server.js ├── src ├── App.css ├── App.js ├── App.test.js ├── assets │ ├── banner-video.mp4 │ ├── fonts │ │ └── BMYEONSUNG.ttf │ ├── logo.png │ ├── main-items.jpg │ ├── main-parts.jpg │ ├── main-styles.jpg │ ├── main1.jpg │ ├── main2.jpg │ ├── main3.jpg │ └── part │ │ ├── deck1.jpg │ │ ├── deck2.jpg │ │ ├── etc1.jpg │ │ ├── etc2.jpg │ │ ├── etc3.jpg │ │ ├── truck1.webp │ │ ├── wheel1.png │ │ └── wheel2.jpg ├── components │ ├── BannerImage.js │ ├── BannerVideo.js │ ├── Card.js │ ├── Footer.js │ ├── Header.js │ ├── ImagesWithTitle.js │ ├── ItemGrid.js │ ├── Meta.js │ ├── Tabs.js │ ├── TextOnImg.js │ ├── ThreeColumns.js │ ├── TwoColumns.js │ └── YoutubePlayer.js ├── index.css ├── index.js ├── pages │ ├── ItemsPage.js │ ├── MainPage.js │ ├── PartPage.js │ └── RidingStylesPage.js ├── serviceWorker.js ├── setupTests.js ├── styles.css └── tailwind.css ├── tailwind.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .idea 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Lecture-3 2 | 3 | '프론트엔드 개발자를 위한, 실전 웹 성능 최적화(feat. React) - Part. 2'의 1번째 강의 소스입니다. 4 | 5 | ### 실행 6 | 7 | 1. download sources 8 | 9 | ``` 10 | $ git clone https://github.com/performance-lecture/lecture-3.git 11 | ``` 12 | 13 | 2. install dependencies 14 | 15 | ``` 16 | $ npm install 17 | or 18 | $ yarn 19 | ``` 20 | 21 | 3. start development server 22 | 23 | ``` 24 | $ npm start 25 | or 26 | $ yarn start 27 | ``` 28 | 29 | 4. start json-server 30 | 31 | ``` 32 | $ npm run server 33 | or 34 | $ yarn server 35 | ``` 36 | *3번의 dev server 와 다른 콘솔에서 띄워줍니다. 37 | 38 | ### 질문 39 | 40 | 궁금하신 부분은 강의 내 질문 & 답변 게시판 또는 해당 레포지토리의 Issues를 이용해주시기 바랍니다. 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lecture-3", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.3.2", 8 | "@testing-library/user-event": "^7.1.2", 9 | "axios": "^0.19.1", 10 | "express": "^4.17.1", 11 | "react": "^16.12.0", 12 | "react-dom": "^16.12.0", 13 | "react-router-dom": "^5.1.2", 14 | "react-scripts": "3.3.0", 15 | "tailwindcss": "^1.1.4" 16 | }, 17 | "scripts": { 18 | "start": "npm run build:style && react-scripts start", 19 | "build": "npm run build:style && react-scripts build", 20 | "build:style": "postcss src/tailwind.css -o src/styles.css", 21 | "serve": "node ./server/server.js", 22 | "server": "node ./node_modules/json-server/lib/cli/bin.js --watch ./server/database.json -c ./server/config.json" 23 | }, 24 | "eslintConfig": { 25 | "extends": "react-app" 26 | }, 27 | "browserslist": { 28 | "production": [ 29 | ">0.2%", 30 | "not dead", 31 | "not op_mini all" 32 | ], 33 | "development": [ 34 | "last 1 chrome version", 35 | "last 1 firefox version", 36 | "last 1 safari version" 37 | ] 38 | }, 39 | "devDependencies": { 40 | "autoprefixer": "^9.7.3", 41 | "json-server": "^0.15.1", 42 | "postcss-cli": "^7.1.0", 43 | "serve": "^11.3.2" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('tailwindcss')('./tailwind.js'), 4 | require('autoprefixer'), 5 | ], 6 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /server/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "port": 3001 3 | } -------------------------------------------------------------------------------- /server/database.json: -------------------------------------------------------------------------------- 1 | { 2 | "items": [ 3 | { 4 | "title": "OSTRICH 2019 – SIDEWALL", 5 | "link": "https://land-mfg.com/product/ostrich-2019-longboard-deck/", 6 | "price": "210,00", 7 | "image": "https://land-mfg.com/wp-content/uploads/alternative-longboards-ostrich-2019-1.jpg" 8 | }, 9 | { 10 | "title": "KAROO 2020 – GIRL WITH CORK", 11 | "link": "https://land-mfg.com/product/karoo-2020-girl-with-cork/", 12 | "price": "220,00", 13 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2016-GirlwithCork-kopia.jpg" 14 | }, 15 | { 16 | "title": "KAROO 2020 – BOY WITH STARS", 17 | "link": "https://land-mfg.com/product/karoo-2020-boy-with-stars/", 18 | "price": "220,00", 19 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2016-Boywithstars-kopia.jpg" 20 | }, 21 | { 22 | "title": "KAROO 2020 – BOY WITH MOON", 23 | "link": "https://land-mfg.com/product/karoo-2020-boy-with-moon/", 24 | "price": "220,00", 25 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2016-Boywithmoon-600x1320-01-kopia.jpg" 26 | }, 27 | { 28 | "title": "KAROO 2020 – BOY WITH BOAT", 29 | "link": "https://land-mfg.com/product/karoo-2020-boy-with-boat/", 30 | "price": "220,00", 31 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2016-Boywithboat-600x1320-01-kopia.jpg" 32 | }, 33 | { 34 | "title": "KAROO 2020 – BOY WITH SWORD", 35 | "link": "https://land-mfg.com/product/karoo-2020-boy-with-sword/", 36 | "price": "220,00", 37 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2017-Boy-01-kopia.jpg" 38 | }, 39 | { 40 | "title": "KAROO 2020 – MASK", 41 | "link": "https://land-mfg.com/product/karoo-2020-mask/", 42 | "price": "220,00", 43 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2017-Mask-01-kopia.jpg" 44 | }, 45 | { 46 | "title": "KAROO 2020 – ROBOT GIRL", 47 | "link": "https://land-mfg.com/product/karoo-2020-robot-girl/", 48 | "price": "220,00", 49 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2017-Robot-kopia.jpg" 50 | }, 51 | { 52 | "title": "KAROO 2020 – GIRL WITH GUN", 53 | "link": "https://land-mfg.com/product/karoo-2020-girl-with-gun/", 54 | "price": "220,00", 55 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2017-StandingGirl-01-kopia.jpg" 56 | }, 57 | { 58 | "title": "KAROO 2020 – GIRL WITH SMILE", 59 | "link": "https://land-mfg.com/product/karoo-2020-girl-with-smile/", 60 | "price": "220,00", 61 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2017-SittingGirl-01-kopia.jpg" 62 | }, 63 | { 64 | "title": "KAROO 2020 – SNAKE", 65 | "link": "https://land-mfg.com/product/karoo-2020-snake/", 66 | "price": "220,00", 67 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-w%C4%85%C5%BC-01-kopia.jpg" 68 | }, 69 | { 70 | "title": "KAROO 2020 – WORM", 71 | "link": "https://land-mfg.com/product/karoo-2020-worm/", 72 | "price": "220,00", 73 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-Robak-01-01-kopia.jpg" 74 | }, 75 | { 76 | "title": "KAROO 2020 – GIRL WITH APPLE", 77 | "link": "https://land-mfg.com/product/karoo-2020-girl-with-apple/", 78 | "price": "220,00", 79 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-Laska-z-jablkiem-01-kopia.jpg" 80 | }, 81 | { 82 | "title": "KAROO 2020 – GIRL WITH FLUTE", 83 | "link": "https://land-mfg.com/product/karoo-2020-girl-with-flute/", 84 | "price": "220,00", 85 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-Laska-z-fletem-01-kopia.jpg" 86 | }, 87 | { 88 | "title": "KAROO 2020 – RAVEN", 89 | "link": "https://land-mfg.com/product/karoo-2020-raven/", 90 | "price": "220,00", 91 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-Kruk-kopia.jpg" 92 | }, 93 | { 94 | "title": "KAROO 2020 – SKELETON", 95 | "link": "https://land-mfg.com/product/karoo-2020-skeleton/", 96 | "price": "220,00", 97 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-ko%C5%9Bciotrup-01-kopia.jpg" 98 | }, 99 | { 100 | "title": "KAROO 2020 – FUCK", 101 | "link": "https://land-mfg.com/product/karoo-2020-fuck/", 102 | "price": "220,00", 103 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-fuck-01-kopia.jpg" 104 | }, 105 | { 106 | "title": "KAROO 2020 – FACE", 107 | "link": "https://land-mfg.com/product/karoo-2020-face/", 108 | "price": "220,00", 109 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-FACE-01-kopia.jpg" 110 | }, 111 | { 112 | "title": "KAROO 2020 – BUDDHA", 113 | "link": "https://land-mfg.com/product/karoo-2020-buddha/", 114 | "price": "220,00", 115 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2018-ziomek-w-kwiatku-01-01-kopia.jpg" 116 | }, 117 | { 118 | "title": "KAROO 2020 – DOG WITH BONE", 119 | "link": "https://land-mfg.com/product/karoo-2020-dog-with-bone/", 120 | "price": "220,00", 121 | "image": "https://land-mfg.com/wp-content/uploads/Karoo2019-KidwithMask-01-kopia.jpg" 122 | }, 123 | { 124 | "title": "OSTRICH 2020 – GIRL WITH SMILE", 125 | "link": "https://land-mfg.com/product/ostrich-2020-girl-with-smile/", 126 | "price": "210,00", 127 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-laskasiedzaca-01-kopia.jpg" 128 | }, 129 | { 130 | "title": "OSTRICH 2020 – GIRL WITH APPLE", 131 | "link": "https://land-mfg.com/product/ostrich-2020-girl-with-apple/", 132 | "price": "210,00", 133 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-laska-z-jablkiem-01-kopia.jpg" 134 | }, 135 | { 136 | "title": "OSTRICH 2020 – GIRL WITH FLUTE", 137 | "link": "https://land-mfg.com/product/ostrich-2020-girl-with-flute/", 138 | "price": "210,00", 139 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-laska-z-fletem-01-01-kopia.jpg" 140 | }, 141 | { 142 | "title": "OSTRICH 2020 – RAVEN", 143 | "link": "https://land-mfg.com/product/ostrich-2020-raven/", 144 | "price": "210,00", 145 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-kruk-01-kopia.jpg" 146 | }, 147 | { 148 | "title": "OSTRICH 2020 – SKELETON", 149 | "link": "https://land-mfg.com/product/ostrich-2020-skeleton/", 150 | "price": "210,00", 151 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-kosciotrup-01-01-kopia.jpg" 152 | }, 153 | { 154 | "title": "OSTRICH 2020 – ROOSTER", 155 | "link": "https://land-mfg.com/product/ostrich-2020-rooster/", 156 | "price": "210,00", 157 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-kogut-01-kopia.jpg" 158 | }, 159 | { 160 | "title": "OSTRICH 2020 – FUCK", 161 | "link": "https://land-mfg.com/product/ostrich-2020-fuck/", 162 | "price": "210,00", 163 | "image": "https://land-mfg.com/wp-content/uploads/Ostrich2017-fuck-01-kopia.jpg" 164 | }, 165 | { 166 | "title": "FLAMINGO 2020 – GIRL IN THE VALLEY", 167 | "link": "https://land-mfg.com/product/flamingo-2020-girl-in-the-valley/", 168 | "price": "205,00", 169 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2013-laska_Obszar-roboczy-1-kopia.jpg" 170 | }, 171 | { 172 | "title": "FLAMINGO 2020 – CAT", 173 | "link": "https://land-mfg.com/product/flamingo-2020-cat/", 174 | "price": "205,00", 175 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2013-kot_Obszar-roboczy-1-kopia.jpg" 176 | }, 177 | { 178 | "title": "FLAMINGO 2020 – LUMBERJACK", 179 | "link": "https://land-mfg.com/product/flamingo-2020-lumberjack/", 180 | "price": "205,00", 181 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2013-Drwal_Obszar-roboczy-1-kopia.jpg" 182 | }, 183 | { 184 | "title": "FLAMINGO 2020 – BEAR", 185 | "link": "https://land-mfg.com/product/flamingo-2020-bear/", 186 | "price": "205,00", 187 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2013-bear_Obszar-roboczy-1-kopia.jpg" 188 | }, 189 | { 190 | "title": "FLAMINGO 2020 – MEN WITH PANDA", 191 | "link": "https://land-mfg.com/product/flamingo-2020-men-with-panda/", 192 | "price": "205,00", 193 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2015-ziomek-z-panda_Obszar-roboczy-1-kopia.jpg" 194 | }, 195 | { 196 | "title": "FLAMINGO 2020 – GIRL WITH ARROW", 197 | "link": "https://land-mfg.com/product/flamingo-2020-girl-with-arrow/", 198 | "price": "205,00", 199 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2015-laska-ze-strza%C5%82a_Obszar-roboczy-1-kopia.jpg" 200 | }, 201 | { 202 | "title": "FLAMINGO 2020 – GIRL WITH SKULL", 203 | "link": "https://land-mfg.com/product/flamingo-2020-girl-with-skull/", 204 | "price": "205,00", 205 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2015-laska-z-czaszka_Obszar-roboczy-1-kopia.jpg" 206 | }, 207 | { 208 | "title": "FLAMINGO 2020 – BOY WITH BOAT", 209 | "link": "https://land-mfg.com/product/flamingo-2020-boy-with-boat/", 210 | "price": "205,00", 211 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2016-ziomek-z-lodka_Obszar-roboczy-1-kopia.jpg" 212 | }, 213 | { 214 | "title": "FLAMINGO 2020 – BOY WITH MOON", 215 | "link": "https://land-mfg.com/product/flamingo-2020-boy-with-moon/", 216 | "price": "205,00", 217 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2016-ziomek-z-ksiezycem_Obszar-roboczy-1-kopia.jpg" 218 | }, 219 | { 220 | "title": "FLAMINGO 2020 – BOY WITH STARS", 221 | "link": "https://land-mfg.com/product/flamingo-2020-boy-with-stars/", 222 | "price": "205,00", 223 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2016-ziomek-z-gwiazdami_Obszar-roboczy-1-kopia.jpg" 224 | }, 225 | { 226 | "title": "FLAMINGO 2020 – GIRL WITH CORK", 227 | "link": "https://land-mfg.com/product/flamingo-2020-girl-with-cork/", 228 | "price": "205,00", 229 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2016-laska-z-korkiem_Obszar-roboczy-1-kopia.jpg" 230 | }, 231 | { 232 | "title": "FLAMINGO 2020 – BOY WITH SWORD", 233 | "link": "https://land-mfg.com/product/flamingo-2020-boy-with-sword/", 234 | "price": "205,00", 235 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-ziomek-z-mieczem_Obszar-roboczy-1-kopia.jpg" 236 | }, 237 | { 238 | "title": "FLAMINGO 2020 – ROBOT GIRL", 239 | "link": "https://land-mfg.com/product/flamingo-2020-robot-girl/", 240 | "price": "205,00", 241 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-robot_Obszar-roboczy-1-kopia.jpg" 242 | }, 243 | { 244 | "title": "FLAMINGO 2020 – MASK", 245 | "link": "https://land-mfg.com/product/flamingo-2020-mask/", 246 | "price": "205,00", 247 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-maska_Obszar-roboczy-1-kopia.jpg" 248 | }, 249 | { 250 | "title": "FLAMINGO 2020 – GIRL WITH SMILE", 251 | "link": "https://land-mfg.com/product/flamingo-2020-girl-with-smile/", 252 | "price": "205,00", 253 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-laska-siedzaca_Obszar-roboczy-1-kopia.jpg" 254 | }, 255 | { 256 | "title": "FLAMINGO 2020 – CTHULHU", 257 | "link": "https://land-mfg.com/product/flamingo-2020-cthulhu/", 258 | "price": "205,00", 259 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-thzulu_Obszar-roboczy-1-kopia.jpg" 260 | }, 261 | { 262 | "title": "FLAMINGO 2020 – ROBOT", 263 | "link": "https://land-mfg.com/product/flamingo-2020-robot/", 264 | "price": "205,00", 265 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-robot-mackami_Obszar-roboczy-1-kopia.jpg" 266 | }, 267 | { 268 | "title": "FLAMINGO 2020 – EAGLE WITH OCTOPUS", 269 | "link": "https://land-mfg.com/product/flamingo-2020-eagle-with-octopus/", 270 | "price": "205,00", 271 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-ptak_Obszar-roboczy-1_Obszar-roboczy-1-kopia.jpg" 272 | }, 273 | { 274 | "title": "FLAMINGO 2020 – GODZILLA", 275 | "link": "https://land-mfg.com/product/flamingo-2020-godzilla/", 276 | "price": "205,00", 277 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2017-gozilla_Obszar-roboczy-1-kopia.jpg" 278 | }, 279 | { 280 | "title": "FLAMINGO 2020 – BUDDHA", 281 | "link": "https://land-mfg.com/product/flamingo-2020-buddha/", 282 | "price": "205,00", 283 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2018-ziomek-w-kwiatku_Obszar-roboczy-1-kopia.jpg" 284 | }, 285 | { 286 | "title": "FLAMINGO 2020 – SNAKE", 287 | "link": "https://land-mfg.com/product/flamingo-2020-snake/", 288 | "price": "205,00", 289 | "image": "https://land-mfg.com/wp-content/uploads/Flamingo2018-waz_Obszar-roboczy-1-kopia.jpg" 290 | } 291 | ] 292 | } -------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const app = express() 3 | const port = 5000 4 | const path = require('path') 5 | 6 | 7 | const header = { 8 | setHeaders: (res, path) => { 9 | res.setHeader('Cache-Control', 'private, no-cache, no-store, must-revalidate') 10 | res.setHeader('Expires', '-1') 11 | res.setHeader('Pragma', 'no-cache') 12 | }, 13 | } 14 | 15 | app.use(express.static(path.join(__dirname, '../build'), header)) 16 | app.get('*', (req, res) => { 17 | res.sendFile(path.join(__dirname, '../build/index.html')) 18 | }) 19 | 20 | app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`)) 21 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | .react-player iframe { 2 | height: 100% !important; 3 | } 4 | 5 | @font-face { 6 | font-family: BMYEONSUNG; 7 | src: url('./assets/fonts/BMYEONSUNG.ttf'); 8 | } 9 | 10 | .BannerVideo { 11 | font-family: 'BMYEONSUNG', sans-serif; 12 | } 13 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {Switch, Route} from 'react-router-dom' 3 | import './App.css' 4 | import './styles.css' 5 | 6 | import Header from './components/Header' 7 | import Footer from './components/Footer' 8 | import MainPage from './pages/MainPage' 9 | import ItemsPage from './pages/ItemsPage' 10 | import PartPage from './pages/PartPage' 11 | import RidingStylesPage from './pages/RidingStylesPage' 12 | 13 | function App() { 14 | return ( 15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
27 | ) 28 | } 29 | 30 | export default App 31 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | const { getByText } = render(); 7 | const linkElement = getByText(/learn react/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /src/assets/banner-video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/banner-video.mp4 -------------------------------------------------------------------------------- /src/assets/fonts/BMYEONSUNG.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/fonts/BMYEONSUNG.ttf -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/main-items.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main-items.jpg -------------------------------------------------------------------------------- /src/assets/main-parts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main-parts.jpg -------------------------------------------------------------------------------- /src/assets/main-styles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main-styles.jpg -------------------------------------------------------------------------------- /src/assets/main1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main1.jpg -------------------------------------------------------------------------------- /src/assets/main2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main2.jpg -------------------------------------------------------------------------------- /src/assets/main3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/main3.jpg -------------------------------------------------------------------------------- /src/assets/part/deck1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/deck1.jpg -------------------------------------------------------------------------------- /src/assets/part/deck2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/deck2.jpg -------------------------------------------------------------------------------- /src/assets/part/etc1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/etc1.jpg -------------------------------------------------------------------------------- /src/assets/part/etc2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/etc2.jpg -------------------------------------------------------------------------------- /src/assets/part/etc3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/etc3.jpg -------------------------------------------------------------------------------- /src/assets/part/truck1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/truck1.webp -------------------------------------------------------------------------------- /src/assets/part/wheel1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/wheel1.png -------------------------------------------------------------------------------- /src/assets/part/wheel2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/performance-lecture/lecture-3/5db56604d229ddc818355ffa60472f58f57e601e/src/assets/part/wheel2.jpg -------------------------------------------------------------------------------- /src/components/BannerImage.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function BannerImage(props) { 4 | return ( 5 |
6 |
7 | 8 |
9 |
10 |
11 |
{props.text}
12 |
13 |
14 |
15 | ) 16 | } 17 | 18 | export default BannerImage 19 | -------------------------------------------------------------------------------- /src/components/BannerVideo.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import video from '../assets/banner-video.mp4' 3 | 4 | function BannerVideo() { 5 | return ( 6 |
7 |
8 |
10 |
11 |
12 |
KEEP
13 |
CALM
14 |
AND
15 |
RIDE
16 |
LONGBOARD
17 |
18 |
19 |
20 | ) 21 | } 22 | 23 | export default BannerVideo 24 | -------------------------------------------------------------------------------- /src/components/Card.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Card(props) { 4 | return ( 5 |
6 | 7 |
8 | {props.children} 9 |
10 |
11 | ) 12 | } 13 | 14 | export default Card 15 | -------------------------------------------------------------------------------- /src/components/Footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Footer(props) { 4 | return ( 5 |
6 | ©Performance Optimization Lecture for React 7 |
8 | ) 9 | } 10 | 11 | export default Footer 12 | -------------------------------------------------------------------------------- /src/components/Header.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react' 2 | import {Link} from 'react-router-dom' 3 | import logo from '../assets/logo.png' 4 | 5 | function Header(props) { 6 | const [isOpened, setIsOpened] = useState(false) 7 | 8 | const toggleSidebar = () => { 9 | setIsOpened(!isOpened) 10 | } 11 | 12 | return ( 13 | <> 14 |
15 |
16 |
17 | 18 |
19 |
20 | 21 | logo 22 | 23 |

Longboard

24 |
25 |
26 | 27 |
28 | 33 |
34 |
35 | 36 | Main 37 | 38 | 39 | Items 40 | 41 | 42 | Part of Board 43 | 44 | 45 | Riding Styles 46 | 47 |
48 |
49 |
50 | 51 |
52 |
53 |
54 |
55 |
56 |
57 | 62 |
63 | Main 64 | Items 65 | Part of Board 66 | Riding Styles 67 |
68 |
69 | 70 | ) 71 | } 72 | 73 | 74 | 75 | export default Header 76 | -------------------------------------------------------------------------------- /src/components/ImagesWithTitle.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ImagesWithTitle(props) { 4 | return ( 5 |
6 |
7 |
{props.title}
8 | {props.images.map((img) => ( 9 |
10 | ))} 11 |
12 |
13 | ) 14 | } 15 | 16 | export default ImagesWithTitle 17 | -------------------------------------------------------------------------------- /src/components/ItemGrid.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ItemGrid(props) { 4 | const makeSrcset = (src) => { 5 | const _src = src.replace('.jpg', '') 6 | return ( 7 | _src + '-675x844.jpg 675w,' + 8 | _src + '-540x675.jpg 540w,' + 9 | _src + '-240x300.jpg 240w,' + 10 | _src + '-819x1024.jpg 819w,' + 11 | _src + '.jpg 1280w' 12 | ) 13 | } 14 | 15 | return ( 16 | 29 | ) 30 | } 31 | 32 | export default ItemGrid 33 | -------------------------------------------------------------------------------- /src/components/Meta.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {Link} from 'react-router-dom' 3 | 4 | function Meta(props) { 5 | return ( 6 |
7 |
8 | {props.title} 9 |
10 |
11 | {props.content} 12 |
13 |
14 | 15 | 보러가기 16 | 17 | 18 | 19 | 20 |
21 |
22 | ) 23 | } 24 | 25 | export default Meta 26 | -------------------------------------------------------------------------------- /src/components/Tabs.js: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react' 2 | 3 | function Tabs(props) { 4 | const [tab, setTab] = useState(0) 5 | return ( 6 |
7 |
8 | {props.data.map((item, index) => ( 9 |
{setTab(index)}} 13 | > 14 | {item.title} 15 |
16 | ))} 17 |
18 |
19 | {props.data.map((item, index) => ( 20 |
21 | {item.content} 22 |
23 | ))} 24 |
25 |
26 | ) 27 | } 28 | 29 | export default Tabs 30 | -------------------------------------------------------------------------------- /src/components/TextOnImg.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function TextOnImg(props) { 4 | return ( 5 |
6 | TextOnImg 7 |
8 | ) 9 | } 10 | 11 | export default TextOnImg 12 | -------------------------------------------------------------------------------- /src/components/ThreeColumns.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function ThreeColumns(props) { 4 | return ( 5 |
6 |
7 |
8 | {props.columns[0]} 9 |
10 |
11 | {props.columns[1]} 12 |
13 |
14 | {props.columns[2]} 15 |
16 |
17 |
18 | ) 19 | } 20 | 21 | export default ThreeColumns 22 | -------------------------------------------------------------------------------- /src/components/TwoColumns.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function TwoColumns(props) { 4 | return ( 5 |
6 |
7 |
8 | {props.columns[0]} 9 |
10 |
11 | {props.columns[1]} 12 |
13 |
14 |
15 | ) 16 | } 17 | 18 | export default TwoColumns 19 | -------------------------------------------------------------------------------- /src/components/YoutubePlayer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default function YoutubePlayer(props) { 4 | return ( 5 |
6 |