-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html
More file actions
40 lines (39 loc) · 2.54 KB
/
post.html
File metadata and controls
40 lines (39 loc) · 2.54 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
<%! import "github.com/OblivionOcean/Daizen/model"%>
<%: func Post(site *model.SiteInfo, page *model.Page, buf *bytes.Buffer) %>
<article class="cm9 c9 p9 m12 block-input">
<% if (page.Meta.GetString("headimg")!="") { %>
<div class="headimg card">
<img src="<%= page.Meta.GetString("headimg") %>" alt="<%= page.Meta.GetString("title") %>">
</div>
<% } %>
<div class="card main">
<div class="func-btns"><button title="进入阅读器" class="btn bg-clear" onclick="main.plugins.read()"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-book" viewBox="0 0 16 16">
<path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783"></path>
</svg></button></div>
<div class="title"><h1><%= page.Meta.GetString("title") %></h1></div>
<div class="info">
<div class="metas">
<%#
matels = {
'date': `<i class="${theme.article.meta.date.icon}"> <span>${date(page.date, config.date_format + " " + config.time_format)}</span></i>`,
'updated': `<i class="${theme.article.meta.updated.icon}"> <span>${date(page.updated, config.date_format + " " + config.time_format)}</span></i>`,
'author': `<a href="${theme.article.meta.author.url}"><span>${theme.article.meta.author.name}</span></a>`
}
for (pmeta in theme.article.top_meta) { %>
<span class="meta"><%# matels[theme.article.top_meta[pmeta]] %></span>
<%# } %>
</div>
<hr style="border-color: #ddd">
</div>
<% if (site.Theme.Cfg.GetBool("plugins.aiSummary.enable")){ %>
<%#- partial('_plugins/ai-summary.ejs') %>
<% } %>
<div class="content" id="post">
<%- page.Content %>
</div>
</div>
<%+ "_partial/share.html" %>
<div class="card comments">
<%#- partial('_plugins/comments/main') %>
</div>
</article>