-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.eta
53 lines (45 loc) · 1.19 KB
/
layout.eta
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
<!DOCTYPE html>
<html lang="en">
<head>
<style>
div.underline {
text-decoration: underline;
-webkit-text-decoration-color: red; /* Safari */
text-decoration-color: red;
}
div.note {
background-color: lightblue;
}
</style>
<title><%= it.title %></title>
</head>
<body>
<h1><%= it.title %></h1>
<h2>-<%= it.author %></h2>
<%
let chapter = "";
%>
<% for(var i = 0; i < it.data.length; ++i) {%>
<% if(it.data[i]['Chapter'] != chapter) { %>
<h3><%=it.data[i]['Chapter']%></h3>
<% chapter = it.data[i]['Chapter']; %>
<% } %>
<div style="background-color:<%=it.data[i]['color']%>">
<% if(it.data[i]['Underlined']) { %>
<div class="underline"><%=it.data[i]['SelectedText']%></p>
<% }else { %>
<%=it.data[i]['SelectedText']%>
<% } %>
</div>
<% if(it.data[i]['Note']) { %>
<br/>
<h4> Note: </h4>
<div class="note">
<%=it.data[i]['Note']%>
</div>
<% } %>
</div>
<br/>
<% } %>
</body>
</html>