Skip to content

Commit

Permalink
fix(theme): optimization theme comment
Browse files Browse the repository at this point in the history
  • Loading branch information
xcyeye committed Dec 21, 2021
1 parent 8e9aacb commit a67c6aa
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 32 deletions.
7 changes: 3 additions & 4 deletions Aurora-theme/lib/client/clientAppEnhance.js
Expand Up @@ -8,7 +8,6 @@ import store from './public/js/store'
import CodeGroup from "./components/global/CodeGroup";
import Badge from './components/global/Badge.vue';
import CodeGroupItem from './components/global/CodeGroupItem.vue';
import OutboundLink from './components/global/ExternalLinkIcon.vue';
import TopImage from './components/global/TopImage.vue';
import BCenter from './components/global/BCenter.vue';
import Common from './components/global/Common.vue';
Expand All @@ -30,6 +29,9 @@ import Pins from "./components/global/inner/Pins.vue";

//样式导入
import './styles/index.scss';
import './styles/theme.style.css'
import "@vuepress/plugin-palette/palette";
import "@vuepress/plugin-palette/style";
export default defineClientAppEnhance(({ app, router }) => {
app.component('Badge', Badge);
app.component('CodeGroup', CodeGroup);
Expand Down Expand Up @@ -74,9 +76,6 @@ export default defineClientAppEnhance(({ app, router }) => {
// @ts-ignore
app.use(store)

delete app._context.components.OutboundLink;
// override the built-in `<OutboundLink>`
app.component('OutboundLink', OutboundLink);
// compat with @vuepress/plugin-docsearch and @vuepress/plugin-search
app.component('NavbarSearch', () => {
const SearchComponent = app.component('Docsearch') || app.component('SearchBox');
Expand Down
19 changes: 10 additions & 9 deletions Aurora-theme/lib/client/components/global/Comment.vue
Expand Up @@ -14,7 +14,6 @@
<script>
import {useThemeData} from "../../composables";
import $ from "jquery";
import Waline from '@waline/client';
export default {
name: "Comment",
data() {
Expand All @@ -41,14 +40,16 @@ export default {
mounted() {
if (this.showComment) {
this.$nextTick(() => {
Waline({
el: '#waline',
serverURL: this.serverURL,
path: this.pathName,
avatar: this.avatar,
emoji: this.emojis,
visitor: true, // 阅读量统计
});
import('@waline/client').then(module => {
module.default({
el: '#waline',
serverURL: this.serverURL,
path: this.pathName,
avatar: this.avatar,
emoji: this.emojis,
visitor: true, // 阅读量统计
})
})
setTimeout(() => {
let vtabImgs = document.querySelectorAll(".vtabs .vtab img")
Expand Down
12 changes: 0 additions & 12 deletions Aurora-theme/lib/client/components/global/ExternalLinkIcon.vue

This file was deleted.

4 changes: 0 additions & 4 deletions Aurora-theme/lib/client/styles/index.scss
Expand Up @@ -17,7 +17,3 @@
@use 'toc';
@use 'transitions';

//下面的是主题默认样式,和从@vuepress/plugin-palette插件上,引入的样式
@import "theme.style.css";
@import "@vuepress/plugin-palette/palette";
@import "@vuepress/plugin-palette/style";
1 change: 1 addition & 0 deletions Aurora-theme/lib/node/auroraTheme.js
Expand Up @@ -124,6 +124,7 @@ const auroraTheme = ({ themePlugins = {},...localeOptions }) => {
})
},
plugins: [
['@vuepress/external-link-icon', themePlugins.externalLinkIcon !== false],
[
'@vuepress/active-header-links',
utils_2.resolveActiveHeaderLinksPluginOptions(themePlugins),
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/styles/index.css
Expand Up @@ -2,8 +2,8 @@

/* 覆盖主题随机一眼的颜色 */
.home-random-say div {
color: red;
background: blue;
/*color: red;*/
/*background: blue;*/
}

#set-bg {
Expand Down
2 changes: 2 additions & 0 deletions docs/readme/readme.md
Expand Up @@ -6,6 +6,8 @@ title: 这是frontmatter

## Introduce

[我的网站](https://aurora.xcye.xyz/)

<a target="_blank" href="http://aurora.cco.vin/" >Demo</a>

> A vuepress-based animation blog theme, simple, beautiful, multi-color, multiple custom functions, providing article poster sharing, talk, photo album, comment and other features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -18,14 +18,14 @@
"devDependencies": {
"@types/jquery": "^3.5.6",
"@vuepress/bundler-vite": "^2.0.0-beta.29",
"@vuepress/plugin-external-link-icon": "^2.0.0-beta.29",
"@vuepress/plugin-google-analytics": "^2.0.0-beta.29",
"@vuepress/plugin-register-components": "^2.0.0-beta.29",
"cz-conventional-changelog": "^3.3.0",
"jquery": "^3.2.1",
"vuepress": "^2.0.0-beta.29"
},
"dependencies": {
"@vuepress/plugin-external-link-icon": "^2.0.0-beta.29",
"@vuepress/plugin-search": "^2.0.0-beta.29",
"@waline/client": "^1.3.10",
"aplayer": "^1.10.1",
Expand Down

0 comments on commit a67c6aa

Please sign in to comment.