Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 피그마
- 스파르타코딩클럽
- 기획자도서추천
- 이미준PO
- SQLD공부방법
- AICE시험후기
- SQL
- 기획관련도서
- css생활코딩
- SW캠프단점
- Til
- 생활코딩
- 웬즈데잇
- 서비스기획스쿨
- 처음부터다시배우는웹기획
- 생활코딩html
- css독학
- html독학
- SW캠프솔직후기
- 코린이독학
- html
- 도그냥
- 도그냥강연
- 기획자책
- SW캠프장점
- HTML공부
- SW캠프비전공자후기
- AICEBASICE
- sql독학
- 기획공부
Archives
- Today
- Total
브리의 성장기
[TIL] 221218 본문
728x90
😀 TIL #221218
- 스파르타 코딩클럽 웹개발 종합반 2주차
2주차 9회 ~ 3주차 1회
* 따릉이 api, 날씨 api 불러오기 추가 연습
* 영화 api 불러오기 연습
* 파이썬 설치하기
영화 api 불러오기는 강의를 다 듣고 두번 연습해봤다.
왜 선생님이 하면 오류 없이 작동하는데, 내가 하면 오류가 열개는 되는걸까 ? ^^;;
하나하나 차근차근 고쳐가며 결국 api 불러오는데 성공했다.
장하다 브리야 !! 🙌
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<title>스파르타코딩클럽 | 부트스트랩 연습하기</title>
<link href="https://fonts.googleapis.com/css2?family=Gowun+Dodum&display=swap" rel="stylesheet">
<style>
* {
font-family: 'Gowun Dodum', sans-serif;
}
.mytitle {
background-color: green;
width:100%;
height:250px;
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(https://movie-phinf.pstatic.net/20210715_95/1626338192428gTnJl_JPEG/movie_image.jpg);
background-position: center;
background-size:cover;
color:white;
display:flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.mytitle > button {
width: 200px;
height: 50px;
background-color: transparent;
color: white;
border-radius: 50px;
border: 1px solid white;
margin-top: 10px;
}
.mytitle > button:hover{
border: 2px solid whitesmoke;
}
.mycomment {
color: gray;
}
.wrap {
max-size: 1200px;
size: 95%;
margin: 20px auto 0px auto;
}
.mydata {
max-width: 500px;
width: 95%;
margin: 20px auto 20px auto;
padding: 20px;
box-shadow: 0px 0px 3px 0px gray;
display : none;
}
.mybtn {
margin: 20px auto 0px auto;
display:flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.mybtn > button {
margin-right: 15px;
}
</style>
<script>
function open_box(){
$('#post-box').show()
}
function hide_box(){
$('#post-box').hide()
}
$(document).ready(function(){
listing();
});
function listing() {
$('cards-box').empty()
$.ajax({
type: "GET",
url: "http://spartacodingclub.shop/web/api/movie",
data: {},
success: function (response) {
let movies = response['movies']
for (let i = 0; i < movies.length; i++) {
let movie = movies[i]
let title = movie['title']
let desc = movie['desc']
let image = movie['image']
let star = movie['star']
let comment = movie['comment']
let star_img = '🤍'.repeat(star)
let temp_html =
`<div class="col">
<div class="card h-100">
<img src="${image}"
class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">${title}</h5>
<p class="card-text">${desc}</p>
<p>${star_img}</p>
<p class="mycomment">${comment}</p>
</div>
</div>
</div>`
$('#cards-box').append(temp_html)
}
}
})
}
</script>
</head>
<body>
<div class="mytitle">
<h1>내 생애 최고의 영화들</h1>
<button onclick="open_box()">영화 기록하기 💖</button>
</div>
<div class="mydata" id="post-box">
<div class="form-floating mb-3">
<input type="email" class="form-control" id="url" placeholder="name@example.com">
<label for="floatingInput">영화 URL</label>
</div>
<div class="input-group mb-3">
<label class="input-group-text" for="inputGroupSelect01">별점</label>
<select class="form-select" id="inputGroupSelect01">
<option selected>선택하기</option>
<option value="1">⭐</option>
<option value="2">⭐⭐</option>
<option value="3">⭐⭐⭐</option>
</select>
</div>
<div class="form-floating">
<textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2" style="height: 100px"></textarea>
<label for="floatingTextarea2">코멘츠</label>
</div>
<div class="mybtn">
<button type="button" class="btn btn-dark">기록하기</button>
<button type="button" onclick="hide_box()" class="btn btn-light">닫기</button>
</div>
</div>
<div class="wrap">
<div class="row row-cols-1 row-cols-md-4 g-4" id="cards-box"></div>
</div>
</body>
</html>
728x90
'종종 올리는 요즘 근황' 카테고리의 다른 글
[TIL] 221220 (0) | 2022.12.20 |
---|---|
[TIL] 221219 (0) | 2022.12.19 |
[TIL] 221217 (2) | 2022.12.17 |
[TIL] 221215 (0) | 2022.12.15 |
[TIL] 221214 (0) | 2022.12.14 |
Comments