youtube_search.ejs
3.39 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html>
<head>
<style>
table
{
width: 100%;
text-align: center;
}
table.type06 {
border-collapse: collapse;
text-align: left;
line-height: 1.5;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin: 20px 10px;
}
table.type06 th {
width: 150px;
padding: 10px;
font-weight: bold;
vertical-align: top;
}
table.type06 td {
width: 350px;
padding: 10px;
vertical-align: top;
}
table.type06 .even {
background: #efefef;
}
row header h2
{
margin-right: 50px;
}
#nav
{
position: absolute;
right: 0em;
top: 2.2em;
}
#nav > ul > li
{
float: left;
}
#nav > ul > li:last-child
{
padding-right: 0;
}
#nav > ul > li > a,
#nav > ul > li > span
{
display: block;
margin-left: 0.7em;
padding: 0.80em 1.2em;
letter-spacing: 0.06em;
text-decoration: none;
text-transform: uppercase;
font-size: 1.1em;
outline: 0;
color: #333;
}
#nav li.active a
{
background: #e95d3c;
border-radius: 5px;
color: #FFF;
}
#nav > ul > li > ul
{
display: none;
}
section,
article
{
margin-bottom: 3em;
}
section > :last-child,
article > :last-child
{
margin-bottom: 0;
}
section:last-child,
article:last-child
{
margin-bottom: 0;
}
.row > section,
.row > article
{
margin-bottom: 0;
}
#Pic
{
position: relative;
}
#Pic header h2
{
font-size: 1.6em;
}
#3u img
{
height: 200px;
width: 200px;
}
p, ul, ol, dl, table
{
margin-bottom: 1em;
}
#p img
{
height: 200px;
width: 200px;
}
.logo
{
text-align: center;
}
li {
display:inline; /* 세로나열을 가로나열로 변경 */
border-left:1px solid #999; /* 각 메뉴의 왼쪽에 "|" 표시(분류 표시) */
font:bold 12px Dotum; /* 폰트 설정 - 12px의 돋움체 굵은 글씨로 표시 */
padding:0 10px;
}
</style>
<style type="text/css">
a:link { text-decoration:none; color:#000000;}
a:visited { text-decoration:none;color:#000000;}
a:active {text-decoration:none; color:#0000FF; }
</style>
</head>
<body class="youtube">
<div id="header">
<div class="container">
<!-- Logo -->
<div id="logo">
<h1 style = "text-align: center;">유튜브</h1>
</div>
<!-- Nav -->
<nav id="nav">
<ul>
<li><a href="http://localhost:3000/Home">Home</a></li>
</ul>
</nav>
</div>
</div>
<br>
<br>
<br>
<div align = "center"; vertical-align="middle">
<input id="search-input" type='text' placeholder="검색어 입력">
<button id="search-button">유튜브 검색</button>
</div>
<script>
const buttonSearchEl = document.querySelector('#search-button');
const searchEl = document.querySelector('#search-input');
buttonSearchEl.addEventListener('click', function() {
if (!searchEl.value) {
window.alert('검색어를 입력해주세요.');
return;
}
location.href = `youtube/1/Search/?title=${searchEl.value}`;
})
</script>
</body>
</html>