seungmi

기본 디자인

웹페이지의 전반적인 기초디자인 구성
1 +body {
2 + margin: 0;
3 + font-size: 25px;
4 +}
5 +
6 +a {
7 + color: black;
8 + text-decoration: none;
9 +}
10 +
11 +h1 {
12 + font-size: 45px;
13 + text-align: center;
14 + border-bottom: 1px solid gray;
15 + margin: 0;
16 + padding: 60px;
17 +}
18 +
19 +ul {
20 + border-right: 1px solid gray;
21 + width: 50px;
22 + margin: 0;
23 + padding: 80px;
24 + padding-bottom:0;
25 + padding-top: 65px;
26 +}
27 +
28 +.grid {
29 + display: grid;
30 + grid-template-columns: 250px 1fr;
31 +}
32 +
33 +.grid article{
34 + padding: 30px;
35 +}
......
...@@ -4,20 +4,26 @@ ...@@ -4,20 +4,26 @@
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <title>Test</title> 6 <title>Test</title>
7 + <link rel="stylesheet" href="/../style.css">
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 - <h1><a href="/food">점심메뉴 정하기</a></h1> 11 + <h1><a href="/food">점심 메뉴 정하기</a></h1>
11 - <article class=""> 12 +
12 - <h2> 13 + <div class="grid">
13 - <%= title %>
14 - </h2>
15 <ul> 14 <ul>
16 <il><a href="/food/search">검색</a></il><br> 15 <il><a href="/food/search">검색</a></il><br>
17 <il><a href="/food/recommendation">추천</a></il> 16 <il><a href="/food/recommendation">추천</a></il>
18 </ul> 17 </ul>
18 +
19 +
20 + <article class="">
21 + <h2>
22 + <%= title %>
23 + </h2>
19 <p><%= description %></p> 24 <p><%= description %></p>
20 </article> 25 </article>
26 + </div class="grid">
21 27
22 </body> 28 </body>
23 29
......
...@@ -3,23 +3,27 @@ ...@@ -3,23 +3,27 @@
3 3
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 + <link rel="stylesheet" href="/../style.css">
6 <title>Test</title> 7 <title>Test</title>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 <h1><a href="/food">점심메뉴 정하기</a></h1> 11 <h1><a href="/food">점심메뉴 정하기</a></h1>
11 - <h2> 12 + <div class="grid">
12 - <%= title %> 13 +
13 - </h2>
14 <ul> 14 <ul>
15 <il><a href="/food/search">검색</a></il><br> 15 <il><a href="/food/search">검색</a></il><br>
16 <il><a href="/food/recommendation">추천</a></il> 16 <il><a href="/food/recommendation">추천</a></il>
17 </ul> 17 </ul>
18 - <p><%= description %></p>
19 - <p><%= randvalue%></p>
20 18
21 <article> 19 <article>
20 + <h2>
21 + <%= title %>
22 + </h2>
23 + <p><%= description %></p>
24 + <p><%= randvalue%></p>
22 </article> 25 </article>
26 + </div class="grid">
23 </body> 27 </body>
24 28
25 </html> 29 </html>
......
...@@ -3,21 +3,26 @@ ...@@ -3,21 +3,26 @@
3 3
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 - <title>Test</title> 6 + <link rel="stylesheet" href="/../style.css">
7 +<title>Test</title>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 - <h1><a href="/food">점심메뉴 정하기</a></h1> 11 + <h1><a href="/food">점심 메뉴 정하기</a></h1>
11 - <h2> 12 +
12 - <%= title %> 13 +
13 - </h2> 14 + <div class="grid">
14 <ul> 15 <ul>
15 <il><a href="/food/search">검색</a></il><br> 16 <il><a href="/food/search">검색</a></il><br>
16 <il><a href="/food/recommendation">추천</a></il> 17 <il><a href="/food/recommendation">추천</a></il>
17 </ul> 18 </ul>
18 - <p><%= description %></p> 19 +
19 <article> 20 <article>
20 - <form action='/food' method='post'> 21 + <h2>
22 + <%= title %>
23 + </h2>
24 + <p><%= description %></p>
25 + <form action='/food/recommendation' method='post'>
21 26
22 <p> 27 <p>
23 가격 : 28 가격 :
...@@ -37,6 +42,8 @@ ...@@ -37,6 +42,8 @@
37 42
38 </form> 43 </form>
39 </article> 44 </article>
45 + </div class="grid">
46 +
40 </body> 47 </body>
41 48
42 </html> 49 </html>
......
...@@ -3,43 +3,35 @@ ...@@ -3,43 +3,35 @@
3 3
4 <head> 4 <head>
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 + <link rel="stylesheet" href="/../style.css">
6 <title>Test</title> 7 <title>Test</title>
7 </head> 8 </head>
8 9
9 <body> 10 <body>
10 - <h1><a href="/food">점심메뉴 정하기</a></h1> 11 + <h1><a href="/food">점심 메뉴 정하기</a></h1>
11 - <h2> 12 +
12 - <%= title %> 13 +
13 - </h2> 14 + <div class="grid">
14 <ul> 15 <ul>
15 <il><a href="/food/search">검색</a></il><br> 16 <il><a href="/food/search">검색</a></il><br>
16 <il><a href="/food/recommendation">추천</a></il> 17 <il><a href="/food/recommendation">추천</a></il>
17 </ul> 18 </ul>
18 - <p><%= description %></p> 19 +
19 <article> 20 <article>
20 - <form action='/food' method='post'> 21 + <h2>
21 - <!--제출된 정보를 보내는 역할 22 + <%= title %>
22 - get으로 보내는 경우 (url)querystring으로 전달됨. 23 + </h2>
23 - 기본 초기값이 get임 24 + <p><%= description %></p>
24 - post방식은 눈에 보이지 않는 방식으로 전달 25 + <form action='/food/search' method='post'>
25 - post는 bodyParser모듈에서 받을 수 있음
26 - -->
27 <p> 26 <p>
28 검색 : 27 검색 :
29 <input type="text" name="title" placeholder="검색"> 28 <input type="text" name="title" placeholder="검색">
30 - <!--
31 - get인 경우 req.query.title로 전달
32 - post인 경우 req.body.title로 전달
33 - req.body.<name>
34 - -->
35 - </p>
36 -
37 - <p>
38 <input type="submit"> 29 <input type="submit">
39 </p> 30 </p>
40 -
41 </form> 31 </form>
42 </article> 32 </article>
33 + </div class="grid">
34 +
43 </body> 35 </body>
44 36
45 </html> 37 </html>
......