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

Week03/seunghyun #18

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions week03/seunghyun/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
env: {browser: true, es2020: true},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'standard',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@babel/eslint-parser',
parserOptions: {ecmaVersion: 'latest', sourceType: 'module'},
settings: {react: {version: '18.2'}},
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': ['warn', {allowConstantExport: true}],
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
},
};
24 changes: 24 additions & 0 deletions week03/seunghyun/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
10 changes: 10 additions & 0 deletions week03/seunghyun/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false,
"printWidth": 120,
"tabWidth": 2,
"semi": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
8 changes: 8 additions & 0 deletions week03/seunghyun/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
11 changes: 11 additions & 0 deletions week03/seunghyun/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import { fixupConfigRules } from "@eslint/compat";


export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...fixupConfigRules(pluginReactConfig),
];
12 changes: 12 additions & 0 deletions week03/seunghyun/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Youtube</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
39 changes: 39 additions & 0 deletions week03/seunghyun/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "seunghyun",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"babel-eslint": "^10.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.2.1",
"react-router-dom": "^6.23.1",
"styled-components": "^6.1.11"
},
"devDependencies": {
"@eslint/compat": "^1.0.3",
"@eslint/js": "^9.4.0",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "9.x",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"globals": "^15.3.0",
"husky": "^9.0.11",
"prettier": "3.3.0",
"vite": "^5.2.0"
},
"husky": {
"gitDir": "../.git"
}
}
15 changes: 15 additions & 0 deletions week03/seunghyun/src/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';

import Header from './components/section/Header';
import Main from './components/section/Main';

const App = () => {
return (
<div>
<Header />
<Main />
</div>
);
};

export default App;
5 changes: 5 additions & 0 deletions week03/seunghyun/src/assets/img/icon/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week03/seunghyun/src/assets/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions week03/seunghyun/src/assets/style/section/card.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.main {
padding-top: 100px;
}
.card-frame {
margin-top: 40px;
margin-left: 40px;
display: inline-flex;
flex-direction: column;
background-color: rgb(255, 255, 255);
gap: 20px;
cursor: pointer;
}

.card {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 25px;
}

.card-img {
width: 300px;
height: 150px;
object-fit: cover;
border-radius: 16px;
background-color: grey;
transition: all 1s;
}

.card-img:hover {
border-radius: 0;
}

.card-text {
display: flex;
align-items: flex-start;
gap: 16px;
}

.author-img {
background: grey;
width: 30px;
height: 30px;
border-radius: 20px;
}

.text-section {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
}

.title {
width: 230px;
overflow: hidden;
color: #000;

font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: normal;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}

.text-caption {
color: #999999;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
57 changes: 57 additions & 0 deletions week03/seunghyun/src/assets/style/section/header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.header__logo {
display: flex;
padding: 1rem 2rem 0.9rem 2em;
flex-direction: row;
align-items: center;
gap: 30px;
}
.header__menu {
padding: 10px 0;
}

header li {
margin-bottom: 5px;
}

.header__menu a {
font-size: 1rem;
display: block;
padding: 0.9rem 2rem 0.9rem 3.125rem;
margin: 0 0.625rem;
border-radius: 12px;
position: relative;
line-height: 1;
color: black;
text-decoration: none;
transition: all 0.3s;
}

.header__menu a:hover {
background: rgb(231, 231, 231);
}

.menu__text {
font-size: 1rem;
display: block;
padding: 0.9rem 2rem 0.9rem 2rem;
position: relative;
line-height: 1;
color: black;
}

.active {
background: rgb(231, 231, 231);
}

.header__menu svg {
width: 1.25rem;
height: 1.25rem;
position: absolute;
left: 1.25rem;
top: 0.75rem;
}

.menu__div {
border-bottom: 1px solid rgb(195, 195, 195);
margin-bottom: 10px;
}
16 changes: 16 additions & 0 deletions week03/seunghyun/src/assets/style/section/layout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#header {
position: fixed;
left: 0;
top: 0;
width: 260px;
height: 100%;
z-index: 10000;
background-color: #ffffff;
}

#main {
min-height: 100vh;
margin: 0 auto;
padding-left: 260px;
background-color: #ffffff;
}
70 changes: 70 additions & 0 deletions week03/seunghyun/src/assets/style/section/search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#search {
position: fixed;
width: 100%;
height: 100px;
padding: 17px 40px;
background-color: rgb(255, 255, 255);
}
.search__inner {
width: 80%;
display: flex;
flex-direction: row;
align-items: center;
}

.search__bar {
display: flex;
width: 80%;
height: 40px;
}

.search__bar input {
background-color: rgb(255, 255, 255);
border: 1px solid rgb(230, 230, 230);
border-right: none;
width: 100%;
padding: 14px 20px;
border-radius: 40px 0px 0px 40px;
font-size: 16px;
}

.search__bar img {
background-color: rgb(245, 245, 245);
border: 1px solid rgb(230, 230, 230);
padding: 8px;
width: 70px;
border-radius: 0px 40px 40px 0px;
}

.btn__inner {
width: 80%;
display: flex;
flex-direction: row;
align-items: center;
white-space: nowrap;
}

.search-btn {
border-radius: 8px;
border: none;
padding: 8px 12px;
margin-right: 10px;
margin-top: 20px;
background-color: rgb(245, 245, 245);
font-weight: 600;
cursor: pointer;
}

.search-btn:hover {
background-color: rgb(235, 235, 235);
}

.btn-active {
background-color: rgb(20, 20, 20);
color: #fff;
}

.btn-active:hover {
background-color: rgb(20, 20, 20);
color: #fff;
}
Loading