forked from renard/o-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog_post.html
74 lines (69 loc) · 2.57 KB
/
blog_post.html
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
<lisp>(ob:insert-template "page_header.html")</lisp>
<div class="article">
<header class="article-header">
<div class="jumbotron">
<div class="page-header">
<time date="<lisp> (ob:format-date (ob:post-timestamp POST)) </lisp>">
<div>
<span class="day"><lisp>(ob:format-date (ob:get 'timestamp POST) "%m")</lisp></span>
<span class="month"><lisp>
(format "<a href=\"%s/%s/%s/%s/index.html\">%s</a>"
(ob:path-to-root)
(ob:category-safe (ob:post-category POST))
(ob:format-date (ob:post-timestamp POST) "%Y")
(ob:format-date (ob:post-timestamp POST) "%m")
(ob:format-date (ob:post-timestamp POST) "%b"))</lisp>
</span>
<span class="year"><lisp>
(format "<a href=\"%s/%s/%s/index.html\">%s</a>"
(ob:path-to-root)
(ob:category-safe (ob:post-category POST))
(ob:format-date (ob:post-timestamp POST) "%Y")
(ob:format-date (ob:post-timestamp POST) "%Y"))
</lisp></span>
</div>
<h1><lisp>(ob:get 'title POST)</lisp></h1>
</time>
</div>
<nav>
<ul class="pager">
<lisp>
(progn
(let ((ppost (ob:get-prev-post 1)))
(if ppost
(insert (format "<li class=\"previous\"><a href=\"%s/%s\"><i class=\"fa fa-chevron-circle-left\"></i> %s</a></li>"
(ob:path-to-root)
(ob:post-htmlfile ppost)
(ob:post-title ppost)))
(insert "<li class=\"previous\"> </li>")))
(let ((npost (ob:get-next-post -1)))
(if npost
(insert (format "<li class=\"next\" style=\"text-align: right;\"><a href=\"%s/%s\">%s <i class=\"fa fa-chevron-circle-right\"></i></a></li>"
(ob:path-to-root)
(ob:post-htmlfile npost)
(ob:post-title npost)))
(insert "<li class=\"next\"> </li>"))))
</lisp>
</ul>
</nav>
</div>
</header>
<div class="article-content">
<lisp>(ob:post-content-html POST)</lisp>
</div>
<footer class="well article-footer">
<lisp>(ob:gettext :posted-on)</lisp> <time datetime="<lisp> (ob:format-date (ob:post-timestamp POST)) </lisp>"> <lisp> (ob:format-date (ob:post-timestamp POST) (ob:gettext :post-timestamp))</lisp></time>.
<nav class="tag-cloud">
<h1><i class="icon-tags"></i> <lisp>(ob:gettext :related-tags)</lisp></h1>
<ul>
<lisp>
(loop for tag in (ob:post-tags POST)
do (insert (format "<li class=\"label label-default small\"><a href=\"%s/tags/%s.html\">%s</a></li>"
(ob:path-to-root) (ob:tags-safe tag) (ob:tags-name tag))))
</lisp>
</ul>
</nav>
</footer>
</div>
<lisp>(ob:insert-template "plugin_disqus.html")</lisp>
<lisp>(ob:insert-template "page_footer.html")</lisp>