-
Notifications
You must be signed in to change notification settings - Fork 1
/
sheet.tmpl
68 lines (67 loc) · 2.87 KB
/
sheet.tmpl
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
{{- define "meepo_earth/sheet" -}}
<!DOCTYPE html>
<html>
<head>
{{ template "meepo_earth/module/libs/import" . }}
{{ template "meepo_earth/module/highlightjs/libs-import" . }}
<script>
main.initColorScheme({{ .settings.color_scheme }},{{ .settings.enable_change_color_scheme }})
</script>
</head>
<body class="bg-slate-50 dark:bg-slate-900">
{{ template "meepo_earth/module/header" . }}
<section class="container mx-auto mt-6 grid grid-cols-4 gap-6">
<div class="z-0 col-span-4 sm:col-span-3">
<div x-data="postUpvote" class="rounded-xl bg-white p-4 dark:bg-slate-800">
<div class="flex items-center justify-between">
<div class="inline-flex items-center justify-start gap-2">
<a href="{{ .blog_url }}" title="{{ .blog_title }}">
<img
src="{{ .user.Avatar }}"
alt="{{ .user.Nickname }}" class="h-10 w-10 rounded-full"
/>
</a>
<div class="flex flex-col gap-0.5">
<a
href="{{ .blog_url }}"
class="text-sm font-semibold text-gray-900 hover:text-gray-600 dark:text-slate-100 dark:hover:text-slate-200"
th:title="{{ .user.Nickname }}"
>{{ .user.Nickname }}</a>
<div class="flex items-center gap-2 text-xs font-light text-gray-600 dark:text-slate-100">
<span> 发布于 {{unix_milli_time_format "2006-01-02" .post.CreateTime}}</span>
<span class="text-gray-300 dark:text-slate-200">/</span>
<span>{{.post.Visits}} 阅读</span>
<span class="text-gray-300 dark:text-slate-200">/</span>
<span>{{.post.CommentCount}} 评论</span>
<span class="text-gray-300 dark:text-slate-200">/</span>
<span data-post-id-likes="{{.post.ID}}">{{.post.Likes}} 点赞</span>
</span>
</div>
</div>
</div>
</div>
<h1 class="my-3 text-2xl font-medium dark:text-slate-50">{{ .post.Title }}</h1>
<article
id="content"
class="prose prose-base mt-4 !max-w-none break-words dark:prose-invert prose-pre:p-0"
>{{ noescape .sheet.Content }}</article>
{{ if not .target.DisallowComment }}
<hr class="my-10 dark:border-slate-700 " />
<div>
<h2 class="mb-2 text-base font-medium text-gray-900 dark:text-slate-50">评论</h2>
{{ template "meepo_earth/module/_include/comment" . }}
</div>
{{ end }}
</div>
</div>
{{/* sidebar部分 */}}
<aside class="z-0 col-span-1 hidden h-full flex-col gap-6 sm:flex">
{{ template "meepo_earth/module/_include/catalogue" .}}
{{ template "meepo_earth/module/_include/sidebar-post" . }}
</aside>
</section>
{{ template "meepo_earth/module/footer" . }}
{{ template "meepo_earth/module/highlightjs/scripts" . }}
</body>
</html>
{{- end -}}