popular.html
4.64 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
<html>
<head>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<style>
#search input[type="text"] {
background: url(search-white.png) no-repeat 10px 6px #fcfcfc;
border: 1px solid #d1d1d1;
font: bold 12px Arial, Helvetica, Sans-serif;
color: #bebebe;
width: 150px;
padding: 6px 15px 6px 35px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
text-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset;
-webkit-transition: all 0.7s ease 0s;
-moz-transition: all 0.7s ease 0s;
-o-transition: all 0.7s ease 0s;
transition: all 0.7s ease 0s;
}
#search input[type="text"]:focus {
width: 200px;
}
#search input[type="text"]:focus {
width: 200px;
}
ul.timeline {
list-style-type: none;
position: relative;
}
ul.timeline:before {
content: ' ';
background: #d4d9df;
display: inline-block;
position: absolute;
left: 29px;
width: 2px;
height: 100%;
z-index: 400;
}
ul.timeline>li {
margin: 20px 0;
padding-left: 20px;
}
ul.timeline>li:before {
content: ' ';
background: white;
display: inline-block;
position: absolute;
border-radius: 50%;
border: 3px solid #22c0e8;
left: 20px;
width: 20px;
height: 20px;
z-index: 400;
}
</style>
</head>
<body>
<!--핫한 글들 출력-->
<div class="container mt-5 mb-5">
<div class="row">
<div class="col-md-6 offset-md-3">
<h4 style="color:rgb(46, 7, 7); font-weight: bold;">HOT</h4>
<ul class="Timeline">
<% for (var i=0; i<timeline.length; i++){ %>
<li>
<h5 style="color: gold; font-weight: bold;">
<%= i + 1 %>위!
</h5>
<% if(timeline[i].hasOwnProperty('retweeted_status')) { %>
<!--내가 다른사람 글을 리트윗한거면 원글을 쓴 사람 닉네임 출력-->
<a style="font-weight: bold;" target="_blank" href=>
<%= timeline[i].retweeted_status.user.name %>
</a>
<% } else { %>
<!--아니면 내 닉네임-->
<a style="font-weight: bold;" target="_blank" href=>
<%= timeline[i].user.name %>
</a>
<% } %>
<a href="#" class="float-right">
<%= timeline[i].created_at %>
</a>
<p>
<%=timeline[i].text%>
</p>
<% if(timeline[i].hasOwnProperty('extended_entities')) { %>
<!--미디어가 존재하면 출력-->
<img alt="Web Studio" class="img-fluid" width="300" height="300"
src=<%=timeline[i].extended_entities.media[0].media_url_https %> />
<% } %>
<p style="color: #22c0e8;">리트윗: <%= timeline[i].retweet_count %> 마음에
들어요: <%= timeline[i].favorite_count%>
</p>
</li>
<% } %>
</ul>
</div>
</div>
</div>
</body>
</html>