Skip to content
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
Binary file added .DS_Store
Binary file not shown.
Binary file added 1215/.DS_Store
Binary file not shown.
46 changes: 46 additions & 0 deletions 1215/과제1/1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script>
const dataContainer = document.getElementById("dataContainer");

async function weatherApi() {
try {
const secretKey =
"EMgqEnqkqKmSbz8fPK2k5l7tmQHLmpnDIseKxOr1%2FTUztPnF7Ui%2Ft5sKbZ6u8ltN0wXF5MyS6II%2FjIg7KOy9xw%3D%3D".toString();
const { data } = await axios.get(
`https://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getVilageFcst?serviceKey=${secretKey}&pageNo=1&numOfRows=168&dataType=JSON&base_date=20230827&base_time=0000&nx=55&ny=127`
); //7일치 한번에
// const { data } = await axios.get(
// `https://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getVilageFcst?serviceKey=${secretKey}&pageNo=1&numOfRows=24&dataType=JSON&base_date=20230827&base_time=0000&nx=55&ny=127`
// ); //하루치
const items = data.response.body.items.item;
const popArray = items.filter((item) => item.category === "POP"); // 강수 확률
const tmnArray = items.filter((item) => item.category === "TMN"); // 최저 기온
const tmxArray = items.filter((item) => item.category === "TMX"); // 최고 기온

//TODO 각 날짜별로 필터링 해주고 날짜 POP -> 강수확률

console.log(popArray);
console.log(tmnArray);
console.log(tmxArray);

for (let i = 0; i < popArray.length(); ++i) {
let div = document.createElement("div");
div.setAttribute("속성", popArray);
}
} catch (err) {
console.log(err);
}
}
</script>
<body>
<div id="dataContainer"></div>
<button onclick="{weatherApi()}">h1</button>
</body>
</html>
131 changes: 131 additions & 0 deletions 1215/과제1/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
width: 100%;
}
ul,
li {
list-style: none;
}
.logo {
font-size: 32px;
color: #1485ee;
margin-left: 10%;
font-weight: bold;
}
a,
button {
text-decoration: none;
color: black;
display: inline-block;
}
.header {
display: flex;
justify-content: space-between;
}
.bar {
display: flex;
justify-content: space-between;
width: 15%;
margin-right: 10%;
}
.bar > li > a {
font-size: 20px;
}
header {
width: 100%;
height: 80px;
position: fixed;
top: 0;
left: 0;
text-align: center;
padding: 25px;
background-color: #fff;
z-index: 100;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
}
.box {
margin-top: 3%;
position: absolute;
width: 450px;
height: 550px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 10px;
border: 1px solid #c1c1c1;
}
.box .item1 p:nth-child(1) {
font-size: 24px;
text-align: center;
color: #1485ee;
font-weight: bold;
margin-top: 18%;
}
.box .item1 p:nth-child(2) {
font-size: 36px;
text-align: center;
color: #000;
font-weight: bold;
}
.box .item2 {
display: flex;
justify-content: center;
}
.box .item2 > div {
width: 350px;
margin-top: 30px;
}
.box .item2 p {
font-size: 14px;
color: #1485ee;
font-weight: bold;
line-height: 25px;
margin-top: 20px;
}
.box .item2 input::placeholder {
color: #909090;
font-size: 16px;
margin-left: 10%;
}
.box .item2 input {
width: 350px;
height: 40px;
border-radius: 10px;
border: 1px solid #c1c1c1;
background: #fff;
font-size: 16px;
}

input {
padding-left: 10px;
}
.box .item3 {
display: flex;
justify-content: center;
margin-top: 40px;
}
.box .item3 > div {
width: 200px;
height: 70px;
text-align: center;
}
.login {
display: block;
width: 200px;
height: 50px;
border-radius: 50px;
background-color: #1485ee;
color: #fff;
font-size: 20px;
border: none;
}
.box .item3 > div > a {
color: #1485ee;
font-size: 13px;
font-weight: bold;
margin-top: 10px;
}
58 changes: 58 additions & 0 deletions 1215/과제1/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./login.css" />
<title>Document</title>
</head>
<body>
<header>
<div class="header">
<a href="#" class="logo">CNS</a>

<ul class="bar">
<li>
<a href="login">로그인</a>
</li>
<li>
<a href="sigin">회원가입</a>
</li>
</ul>
</div>
</header>
<div class="box">
<div class="item1">
<p>Care aNd Service</p>
<p>로그인</p>
</div>
<div class="item2">
<div>
<p class="dkdlel">아이디</p>
<input
type="text"
placeholder="아이디를 입력하세요."
maxlength="10"
/>
<p>비밀번호</p>
<input
type="password"
placeholder="비밀번호를 입력하세요."
maxlength="15"
/>
</div>
</div>
<div class="item3">
<div>
<button
type="submit"
class="login"
onClick="location.href='과제1/1.html'"
>
로그인
</button>
<a href="#">계정이 없으신가요?</a>
</div>
</div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
![Group 3](https://github.com/2023NewCNSMember/Frontend-Assignment/assets/101560583/87ca165b-df46-4003-9912-417cbf8dba9b)
3. 클론이 되었으면 자신의 branch를 선택한뒤 vsc를 열고 자신의 학번으로 폴더를 새로 열고 개발을 하시면 됩니다.<br/>
![newcns3](https://github.com/2023NewCNSMember/Frontend-Assignment/assets/101560583/7b93c510-d7cd-4d99-aef6-51cfeb029295)
![newcns3-1](https://github.com/2023NewCNSMember/Frontend-Assignment/assets/101560583/07df326c-5afb-4538-a38f-62ad905854b8)
![newcns333](https://github.com/2023NewCNSMember/Frontend-Assignment/assets/101560583/a75b3a2f-0651-467b-9aa1-8e05ee20e4d4)

4. 만약 개발이 다 된 상태라면 create pull request를 눌러 자신의 학번이름으로 제목을 입력한뒤<br/>
내용엔 간단한 코드 설명을 적으시면 됩니다.(미리보기 사진이 있으면 더 좋습니다.)<br/>
Expand Down