wiki comments
This commit is contained in:
parent
5143c55478
commit
f4c8723a11
|
@ -6,11 +6,16 @@ if (theme.comments.service && theme.comments.service.length > 0) {
|
|||
}
|
||||
}
|
||||
// 合并项目评论
|
||||
if (loadComment && page.layout == 'wiki' && page.wiki) {
|
||||
if (page.comment_id == undefined) {
|
||||
if (theme.comments.service == 'utterances') {
|
||||
// 使用项目名作为评论issue标题并共享评论数据
|
||||
page.comment_id = page.wiki;
|
||||
if (loadComment && page.layout === 'wiki' && page.wiki) {
|
||||
let proj = theme.wiki.projects[page.wiki];
|
||||
if (proj.comment_id !== undefined && page.comment_id === undefined) {
|
||||
if (theme.comments.service === 'utterances') {
|
||||
page.comment_id = proj.comment_id;
|
||||
}
|
||||
}
|
||||
if (proj.comment_title !== undefined && page.comment_title === undefined) {
|
||||
if (theme.comments.service === 'utterances') {
|
||||
page.comment_title = proj.comment_title;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +23,7 @@ if (loadComment && page.layout == 'wiki' && page.wiki) {
|
|||
<% if (loadComment) { %>
|
||||
<div class='related-wrap md reveal' id="comments">
|
||||
<div class='cmt-title cap theme'>
|
||||
<%- page.comment_title != undefined ? page.comment_title : __('meta.comment_title') %>
|
||||
<%- page.comment_title !== undefined ? markdown(page.comment_title) : __('meta.comment_title') %>
|
||||
</div>
|
||||
<div class='cmt-body <%- theme.comments.service %>'>
|
||||
<%- partial(theme.comments.service + '/layout') %>
|
||||
|
|
|
@ -124,6 +124,14 @@
|
|||
|
||||
|
||||
.related-wrap#comments
|
||||
div.cmt-title
|
||||
p
|
||||
margin: 0
|
||||
a
|
||||
color: inherit
|
||||
text-decoration: underline
|
||||
&:hover
|
||||
color: $color-hover
|
||||
div.cmt-body
|
||||
min-height: 150px
|
||||
position: relative
|
||||
|
|
Loading…
Reference in New Issue