Showing
3 changed files
with
80 additions
and
55 deletions
1 | +@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@500&display=swap'); | ||
2 | + | ||
1 | *{ | 3 | *{ |
2 | padding:0; | 4 | padding:0; |
3 | margin:0; | 5 | margin:0; |
4 | - box-sizing:border-box; | 6 | + box-sizing:border-box; |
7 | +} | ||
8 | +body{ | ||
9 | + height: 100vh; | ||
10 | + background-image: url('https://images.unsplash.com/photo-1533035353720-f1c6a75cd8ab?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80'); | ||
11 | + background-position: center; | ||
12 | + background-repeat: repeat; | ||
13 | + background-size: cover; | ||
14 | + background-attachment: scroll; | ||
15 | +} | ||
16 | +flex-containter{ | ||
17 | + font-size:100px; | ||
18 | + font-family: 'Noto Sans KR', sans-serif; | ||
19 | +} | ||
20 | +form input{ | ||
21 | + width:60%; | ||
22 | + padding:7px; | ||
23 | + background-color:white; | ||
24 | + border-radius:30px; | ||
5 | } | 25 | } |
6 | .containter{ | 26 | .containter{ |
7 | position:relative; | 27 | position:relative; |
8 | - width:90%; | 28 | + width:80%; |
9 | height:auto; | 29 | height:auto; |
10 | - max-width:1200px; | 30 | + max-width:3200px; |
11 | margin:0;/*auto*/ | 31 | margin:0;/*auto*/ |
12 | color:black; | 32 | color:black; |
33 | + font-size:100px; | ||
34 | + font-family: 'Noto Sans KR', sans-serif; | ||
13 | } | 35 | } |
14 | form{ | 36 | form{ |
15 | width:90%; | 37 | width:90%; |
16 | border-radius:4px; | 38 | border-radius:4px; |
17 | margin-top:-10px; | 39 | margin-top:-10px; |
18 | margin-left:10px; | 40 | margin-left:10px; |
19 | - background-color:white; | 41 | +/* background-color:white; |
20 | -} | 42 | + */} |
21 | form{ | 43 | form{ |
22 | display:inline-block; | 44 | display:inline-block; |
23 | } | 45 | } |
... | @@ -25,13 +47,29 @@ form{ | ... | @@ -25,13 +47,29 @@ form{ |
25 | /*여러줄로 보여주기 위해선 grid 사용해야하는데, 우선은 영상목록 뽑아보고 결정*/ | 47 | /*여러줄로 보여주기 위해선 grid 사용해야하는데, 우선은 영상목록 뽑아보고 결정*/ |
26 | /*grid로 바꿔놓음. 여러 열로 사진들이 정렬됨*/ | 48 | /*grid로 바꿔놓음. 여러 열로 사진들이 정렬됨*/ |
27 | display:grid; | 49 | display:grid; |
28 | - grid-gap:25px; | 50 | + row-gap:15%; |
29 | - grid-template:auto/repeat(auto-fit,minmax(300px,1fr)); | 51 | + grid-template-columns: repeat(auto-fill, minmax(25%, auto)); |
52 | +/* grid-template:auto/repeat(auto-fill,minmax(250px,1fr)); */ | ||
30 | margin-top:50px; | 53 | margin-top:50px; |
31 | - width:100%; | 54 | + width:200%; |
32 | margin-left:265px; | 55 | margin-left:265px; |
56 | + margin-bottom:100px; | ||
57 | +} | ||
58 | +/*form input{ | ||
59 | + width:80%; | ||
60 | + padding:10px; | ||
61 | + border:none; | ||
62 | + outline:none; | ||
63 | + font-size:1.8rem; | ||
64 | + display:inline-block; | ||
65 | +} | ||
66 | +*/ form ion-icon{ | ||
67 | + width:9%; | ||
68 | + font-size:3rem; | ||
69 | + margin-left:10px; | ||
70 | + margin-top:15px; | ||
71 | + color:rgb(75,75,75); | ||
33 | } | 72 | } |
34 | - | ||
35 | .search-box{ | 73 | .search-box{ |
36 | margin-left:-10px; | 74 | margin-left:-10px; |
37 | margin-top:10px; | 75 | margin-top:10px; |
... | @@ -42,32 +80,20 @@ img{ | ... | @@ -42,32 +80,20 @@ img{ |
42 | object-fit:cover; | 80 | object-fit:cover; |
43 | } | 81 | } |
44 | html{ | 82 | html{ |
45 | - font-size:12px; | 83 | + font-size:15px; |
84 | + font-family: 'Nanum Pen Script', cursive; | ||
46 | } | 85 | } |
47 | section{ | 86 | section{ |
48 | - min-height:10vh; | 87 | + min-height:100vh; |
49 | width:100%; | 88 | width:100%; |
50 | display:flex; | 89 | display:flex; |
51 | - padding:100px 0; | 90 | + padding:100px 0; |
91 | + align-items:stretch; | ||
92 | + | ||
52 | } | 93 | } |
53 | .brand{ | 94 | .brand{ |
54 | margin-top:-70px; | 95 | margin-top:-70px; |
55 | font-size:4rem; | 96 | font-size:4rem; |
56 | color:black; | 97 | color:black; |
57 | - margin-bottom:30px; | 98 | + margin-bottom:30px; |
58 | } | 99 | } |
59 | -/*form input{ | ||
60 | - width:80%; | ||
61 | - padding:10px; | ||
62 | - border:none; | ||
63 | - outline:none; | ||
64 | - font-size:1.8rem; | ||
65 | - display:inline-block; | ||
66 | -} | ||
67 | -form ion-icon{ | ||
68 | - width:9%; | ||
69 | - font-size:3rem; | ||
70 | - margin-left:10px; | ||
71 | - margin-top:15px; | ||
72 | - color:rgb(75,75,75); | ||
73 | -}*/ | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -11,37 +11,37 @@ | ... | @@ -11,37 +11,37 @@ |
11 | <div class="container"> | 11 | <div class="container"> |
12 | <h1 class="brand">Recipe APP</h1> | 12 | <h1 class="brand">Recipe APP</h1> |
13 | <form> | 13 | <form> |
14 | - <input id="name" type="text" placeholder="Search Your Recipe..."> | 14 | + <input id="name" type="text" placeholder="Search Your Recipe..ex) pizza"> |
15 | <ion-icon name="search"></ion-icon> | 15 | <ion-icon name="search"></ion-icon> |
16 | </form> | 16 | </form> |
17 | <p> | 17 | <p> |
18 | <input type='checkbox' | 18 | <input type='checkbox' |
19 | - name='animal' | 19 | + name='animal' |
20 | value=800 | 20 | value=800 |
21 | onclick='getCheckboxValue(event)'/> 800 | 21 | onclick='getCheckboxValue(event)'/> 800 |
22 | <input type='checkbox' | 22 | <input type='checkbox' |
23 | - name='animal' | 23 | + name='animal' |
24 | value=1200 | 24 | value=1200 |
25 | onclick='getCheckboxValue(event)'/> 1200 | 25 | onclick='getCheckboxValue(event)'/> 1200 |
26 | <input type='checkbox' | 26 | <input type='checkbox' |
27 | - name='animal' | 27 | + name='animal' |
28 | value=1600 | 28 | value=1600 |
29 | onclick='getCheckboxValue(event)'/> 1600 | 29 | onclick='getCheckboxValue(event)'/> 1600 |
30 | <input type='checkbox' | 30 | <input type='checkbox' |
31 | - name='animal' | 31 | + name='animal' |
32 | value=2000 | 32 | value=2000 |
33 | onclick='getCheckboxValue(event)'/> 2000 | 33 | onclick='getCheckboxValue(event)'/> 2000 |
34 | </p> | 34 | </p> |
35 | 35 | ||
36 | - | 36 | + |
37 | - | 37 | + |
38 | - | 38 | + |
39 | <!-- <select id="selectBox"> | 39 | <!-- <select id="selectBox"> |
40 | - <option value="800" >800</option> | 40 | + <option value="800" >800</option> |
41 | <option value="1200">1200</option> | 41 | <option value="1200">1200</option> |
42 | <option value="1600" >1600</option> | 42 | <option value="1600" >1600</option> |
43 | </select> --> | 43 | </select> --> |
44 | - | 44 | + |
45 | <div class="search-result"> | 45 | <div class="search-result"> |
46 | <!--<div class="item"> | 46 | <!--<div class="item"> |
47 | <img src="./0.jpg" alt=""> | 47 | <img src="./0.jpg" alt=""> |
... | @@ -54,7 +54,7 @@ | ... | @@ -54,7 +54,7 @@ |
54 | </div> | 54 | </div> |
55 | </div> | 55 | </div> |
56 | </section> | 56 | </section> |
57 | - | 57 | + |
58 | <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script> | 58 | <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script> |
59 | <script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script> | 59 | <script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script> |
60 | <script src="./main.js"></script> | 60 | <script src="./main.js"></script> | ... | ... |
... | @@ -10,8 +10,8 @@ function getCheckboxValue(event) { | ... | @@ -10,8 +10,8 @@ function getCheckboxValue(event) { |
10 | 10 | ||
11 | const searchForm = document.querySelector('form'); | 11 | const searchForm = document.querySelector('form'); |
12 | const searchResultDiv = document.querySelector('.search-result') | 12 | const searchResultDiv = document.querySelector('.search-result') |
13 | -const APP_ID = 'fill your own ID'; | 13 | +const APP_ID = '0a67fbc1'; |
14 | -const APP_KEY = 'fill your own key'; | 14 | +const APP_KEY = '225d31b59bf211d7ede34e2e885f1f3b'; |
15 | searchForm.addEventListener('submit', function(event){ | 15 | searchForm.addEventListener('submit', function(event){ |
16 | if(document.getElementById('name').value.length === 0){ | 16 | if(document.getElementById('name').value.length === 0){ |
17 | alert('한글자 이상 입력해주세요'); | 17 | alert('한글자 이상 입력해주세요'); |
... | @@ -54,32 +54,31 @@ function boxinfo(results){ | ... | @@ -54,32 +54,31 @@ function boxinfo(results){ |
54 | const object = { | 54 | const object = { |
55 | cal: result.recipe.calories.toFixed(0) | 55 | cal: result.recipe.calories.toFixed(0) |
56 | }; | 56 | }; |
57 | - | 57 | + |
58 | if(result.recipe.calories>=caloriesLimit){} | 58 | if(result.recipe.calories>=caloriesLimit){} |
59 | 59 | ||
60 | else{ | 60 | else{ |
61 | boxsinfo += | 61 | boxsinfo += |
62 | ` | 62 | ` |
63 | <style> | 63 | <style> |
64 | - | 64 | + @import url(//fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@500&display=swap); |
65 | </style> | 65 | </style> |
66 | - | 66 | + |
67 | <div class="item"> | 67 | <div class="item"> |
68 | - <img src="${result.recipe.image}" alt=""> | 68 | + <img src="${result.recipe.image}"> |
69 | - <div class="flex-container"> | 69 | + <div class="flex-container" style="font-family: 'Noto Sans KR', sans-serif;"> |
70 | <h1 class="title">${result.recipe.label}</h1> | 70 | <h1 class="title">${result.recipe.label}</h1> |
71 | <a href="${result.recipe.url}" target="_blank">View Recipe</a> | 71 | <a href="${result.recipe.url}" target="_blank">View Recipe</a> |
72 | <!--result.recipe.labe에 + home + recipe 한 검색결과 페이지를 버튼에 링크시켜놓음--> | 72 | <!--result.recipe.labe에 + home + recipe 한 검색결과 페이지를 버튼에 링크시켜놓음--> |
73 | <a href="https://www.youtube.com/results?search_query=${result.recipe.label}+home+recipe" target="_blank">View Videos</a> | 73 | <a href="https://www.youtube.com/results?search_query=${result.recipe.label}+home+recipe" target="_blank">View Videos</a> |
74 | <ul class="sns"> | 74 | <ul class="sns"> |
75 | - <li class="facebook"> | 75 | + <li class="facebook"> |
76 | - <a href="#n" onclick="shareRecipe('facebook','${result.recipe.url}'');return false;" class="facebook" target="_self" title="페이스북 공유"><span class="skip">페이스북</span></a> | 76 | + <a href="#n" onclick="shareRecipe('facebook','${result.recipe.url}'');return false;" class="facebook" target="_self" title="페이스북 공유"><span class="skip">페이스북</span></a> |
77 | - </li> | 77 | + </li> |
78 | - <li class="twitter"> | 78 | + <li class="twitter"> |
79 | - <a href="#n" onclick="shareRecipe('twitter','${result.recipe.url}');return false;" class="twitter" target="_self" title="트위터 공유"><span class="skip">트위터</span></a> | 79 | + <a href="#n" onclick="shareRecipe('twitter','${result.recipe.url}');return false;" class="twitter" target="_self" title="트위터 공유"><span class="skip">트위터</span></a> |
80 | - </li> | 80 | + </li> |
81 | - </ul> | 81 | + </ul> |
82 | - | ||
83 | </div> | 82 | </div> |
84 | ${(cal => { | 83 | ${(cal => { |
85 | if (cal >= 2000) { | 84 | if (cal >= 2000) { |
... | @@ -97,4 +96,4 @@ function boxinfo(results){ | ... | @@ -97,4 +96,4 @@ function boxinfo(results){ |
97 | `} | 96 | `} |
98 | }) | 97 | }) |
99 | searchResultDiv.innerHTML = boxsinfo; | 98 | searchResultDiv.innerHTML = boxsinfo; |
100 | -} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
99 | +} | ... | ... |
-
Please register or login to post a comment