Valine废了 删掉评论功能

This commit is contained in:
灌糖包子 2022-12-27 14:07:10 +08:00
parent 60a02d6878
commit e2a739fd0b
Signed by: sookie
GPG Key ID: 0599BECB75C1E68D
9 changed files with 0 additions and 53 deletions

View File

@ -61,8 +61,6 @@ toc: 2
toc_hide_index: true
# 是否显示文章列表页的动画效果
animate: true
# 文章全文页面是否开启评论
comment: true
# 目录为空时的提示
toc_empty_wording: 目录,不存在的…

View File

@ -7,7 +7,6 @@ window.themeConfig = {
isCategory: <%=is_category()%>, // 是否为分类页面
pageid: <%-page.pageid ? `"${page.pageid}"` : 'undefined'%>, // 页面标识, 用于个性化页面开发
toc_hide_index: <%=theme.toc_hide_index%>, // 目录序号
comment: <%=theme.comment%>, // 文章全文页面是否开启评论
animate: <%=theme.animate%>, // 是否显示文章列表页动画效果
root: '<%=config.root%>', // 资源根路径
baseUrl: '<%=config.url%>',

View File

@ -91,7 +91,3 @@
<% if (!param.index){ %>
<%- partial('post/nav') %>
<% } %>
<% if (!param.index && post.comments && theme.valine.enable){ %>
<div id="comments"></div>
<% } %>

View File

@ -18,10 +18,6 @@
max-width: 100%;
}
}
#comments {
margin:0 30px;
background-color:$colorBg;
}
.article-inner h1.article-title, .article-title {
color: #696969;
margin-left: 0px;

View File

@ -195,9 +195,6 @@
display: block;
}
}
#comments {
margin: 0;
}
.share{
padding: 3px 10px;
}

View File

@ -100,10 +100,6 @@ body.night {
.profilepic, .waifu, #header .header-nav .social a {
filter: brightness(30%);
}
// 评论
#comments {
background: none;
}
// 文章信息栏
.article-info-index.article-info {
border-top-color: $borderColor_night;

View File

@ -1,19 +0,0 @@
const axios = require('axios')
// const AV = require('leancloud-storage')
window.AV = require('leancloud-storage')
// const Valine = require('../lib/Valine.min')
/**
* 使用根据Valine项目源代码重新打包
* 可以支持对于AV对象的传参输入, 而不需要暴露全局变量
* 但是缺少一些新功能
*/
import(/* webpackChunkName: "valine" */ '../lib/Valine.min').then(({default: Valine }) => {
// 从接口获取评论配置
axios.get(`${window.themeConfig.root}api/v1/common/config/valine_config`).then(res => {
let config = res.data
config.path = window.location.pathname
// config.av = AV
new Valine(config)
})
})

View File

@ -42,11 +42,6 @@ Util.addLoadEvent(function() {
}
})
if(window.themeConfig.isPost && window.themeConfig.comment) {
// 文章详情页面, 并且启用了评论, 则加载评论相关代码
import(/* webpackChunkName: "comment" */ './comment')
}
// 初始化看板娘
import(/* webpackChunkName: "waifu" */ './waifu').then(waifuInit => {
waifuInit.default.init()

File diff suppressed because one or more lines are too long