generated from songquanpeng/blog-theme-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinks.ejs
63 lines (56 loc) · 1.66 KB
/
links.ejs
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
<%- include('./partials/header') %>
<div class="container article-container">
<article style="padding: 16px">
<%- include('./partials/page-info') %>
</article>
<% if (linkList && linkList.length){ %>
<% linkList.forEach((link)=>{ %>
<div class="link-card">
<%if(link && link.image ===""){
if(link.link.endsWith("/")) {
link.image = link.link + "favicon.ico";
}else {
link.image = link.link + "/favicon.ico";
}
}%>
<a href="<%= link.link %>"><img loading="lazy" class="image" src="<%= link.image %>" alt="⚠️"/></a>
<div class="info">
<div class="title"><a href='<%= link.link %>' style='color: black'><%= link.title %></a></div>
<div class="description"><%= link.description %></div>
</div>
</div>
<% })} %>
<%- include('./partials/prev-next') %>
<%- include('./partials/comment') %>
</div>
<style>
.link-card {
padding: 1em 0;
border: 2px solid transparent;
display: flex;
align-items: center;
border-bottom: 1px dashed #999;
margin-left: 20px;
margin-right: 20px;
}
.link-card a {
flex-shrink: 0;
}
.link-card img {
width: 4em;
height: 4em;
margin: 0 1em 0 0;
}
.link-card .info {
flex-shrink: 1;
}
.link-card .title {
font-size: 1.1em;
font-weight: bold;
margin: 0.375em 0;
}
.link-card .description {
font-size: 0.875em;
}
</style>
<%- include('./partials/footer') %>