Skip to content

Commit

Permalink
feat: change branch
Browse files Browse the repository at this point in the history
  • Loading branch information
xcyeye committed May 15, 2022
1 parent a86ee23 commit 8b1945b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 151 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/clientAppEnhance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineClientAppEnhance } from '@vuepress/client'
import UseBlog from "./components/UseBlog.vue";
// import UseBlog from "./components/UseBlog.vue";
export default defineClientAppEnhance(({ app, router, siteData }) => {
app.component("UseBlog",UseBlog)
// app.component("UseBlog",UseBlog)
})
98 changes: 4 additions & 94 deletions docs/.vuepress/components/UseBlog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,12 @@
<aurora-global :show-bg="true" :show-style-menu="true" :show-navbar="true">
<template #top>
<div class="use-blog-top">
<top-image :is-show-top-img="true"
:theme-property="themeConfig"
:is-show-head-line="false"
:show-mood-edit="false"
head-line="">
</top-image>
<div class="use-blog-message mood-article">
<div id="theme-default-content" class="theme-default-content pageContent medium-zoom-content">
<h2 class="use-blog-title">🎉🎉🎉🎉🎉</h2>
<span class="use-blog-desc">
这里是Aurora主题的示例博客站点,只要你正使用Aurora主题,都可以在此页面添加你的博客站点
</span>
<ul>
<li>在此页面底部留言</li>
<li>在<a target="_blank" href="https://github.com/qsyyke/aurora-docs/blob/main/docs/.vuepress/public/user.js">Github</a>中进行提交</li>
</ul>

<div class="language-javascript ext-js line-numbers-mode"><pre class="language-javascript"><code><span class="token punctuation">{</span>
title<span class="token operator">:</span> <span class="token string">"网站标题"</span><span class="token punctuation">,</span>
url<span class="token operator">:</span> <span class="token string">"站点链接"</span><span class="token punctuation">,</span>
logo<span class="token operator">:</span> <span class="token string">"站点logo"</span><span class="token punctuation">,</span>
describe<span class="token operator">:</span> <span class="token string">"站点描述"</span><span class="token punctuation">,</span>
cover<span class="token operator">:</span> <span class="token string">'站点封面'</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div>
</div>
</div>
<h2>这是顶部</h2>
</div>
</template>
<template #center>
<div class="use-blog mood-article" id="use-blog">
<a v-for="(item,index) in sites" id="link-a" target="_blank" :href="item.url">
<div class="link-item use-link-item" :style="setTopBg(index)" id="link-item">
<!--<div class="link-item" :style="setTopBg" id="link-item">-->
<div class="link-top">
<div class="link-img">
<img id="link-img" :src="item.logo" :alt="item.title">
</div>
</div>
<div class="link-bottom" :style="setLinkColor(index,item.cover)" >
<!--<div class="link-bottom" >-->
<div class="link-bottom-title link-bottom-common">
<span>{{item.title}}</span>
</div>
<div class="link-bottom-describe link-bottom-common">
<span id="link-bottom-describe">{{item.describe}}</span>
</div>
</div>
</div>
</a>
<h2>这是中部</h2>
</div>
</template>
<template #bottom>
Expand All @@ -65,24 +21,12 @@
</template>

<script>
import { sites } from '../public/user'
export default {
name: "UseBlog",
data() {
return {
themeConfig: {},
sites: [],
colors: [],
randomColors: ['#ffcad4','#d8e2dc','#8d99ae','#b8f2e6','#84c7d0',
'#aed9e0','#00b4d8','#caf0f8','#fbc4ab','#fdc5f5',
'#84dcc6','#a9def9','#fcf6bd','#f0a6ca','#b9faf8',
'#42a5f5','#ff9800','#b39ddb','#6d45bb','#b388ff',
'#1565c0','#26c6da','#5e548e','#90f1ef','#5b5f97',
'#bbe6e4','#42bfdd','#72ddf7','#8093f1','#9ed8d8',
'#7ea8be','#ef90b3','#b892ef','#c0b9dd','#c0d9dd',
'#75c9c8','#ded9e2','#b5e2fa','#62b6cb','#5fa8d3',
'#0fa3b1','#b5e2fa','#5fa8d3','#62b6cb','#b892ff'],
}
},
created() {
Expand All @@ -94,44 +38,10 @@ export default {
}
},
methods: {
getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min; //不含最大值,含最小值
},
hexToRgb(hex) {
let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
},
computed: {
setLinkColor() {
return (item,cover) => {
//return 'color: rgb(' + this.hexRgb.r +"," + this.hexRgb.g + "," + this.hexRgb.b + "); background-image: url("+ cover +");"
if (cover === undefined || cover === "") {
return "background-color: white;" + 'color: rgb(' + this.colors[item].r +"," + this.colors[item].g + "," + this.colors[item].b + ");"
}else {
let randomNum1 = this.getRandomInt(0,9999999999)
let randomNum2 = this.getRandomInt(0,9999999999)
let logoPath = cover + "?time=" + randomNum1 + cover + randomNum2
return "background-image: url("+ logoPath +");"
}
}
},
setTopBg() {
return (index) => {
return 'background-color: rgba(' + this.colors[index].r +"," + this.colors[index].g + "," + this.colors[index].b + ",.7);"
}
},
/*setLinkColor() {
return (index) => {
return 'color: rgb(' + this.colors[index].r +"," + this.colors[index].g + "," + this.colors[index].b + ");"
}
}*/
}
}
</script>
Expand Down
20 changes: 10 additions & 10 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ module.exports = {
* 这里是配置说说插件,使用https://aurora.xcye.xyz/plugin/coze/
* */
[
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-coze/lib/node/index.js"),
//"coze",
// path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-coze/lib/node/index.js"),
"vuepress-plugin-coze",
{
appId: '2A2Dyd2AffrnldhwftlEddVn-MdYXbMMI',
appKey: 'qHYTbb91iOPLelyC9lpbXxLH',
Expand All @@ -61,8 +61,8 @@ module.exports = {
* 请配置一下excludes,否则在时间轴那里,会出现非文件页面链接
* */
[
//"archive",
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-archive/lib/node/index.js"),
"vuepress-plugin-archive",
// path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-archive/lib/node/index.js"),
{
excludes: ['/footer.html','/404.html','/about/','/mood/','/link/','/tag/','/photo/'],
noTitle: '暂时没有标题配置'
Expand All @@ -72,8 +72,8 @@ module.exports = {
* 音乐插件,使用:https://aurora.xcye.xyz/plugin/player/
* */
[
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-player/lib/node/index.js"),
//"player",
// path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-player/lib/node/index.js"),
"vuepress-plugin-player",
{
// disableSpace: false,
//网易云单个歌单id
Expand Down Expand Up @@ -119,8 +119,8 @@ module.exports = {
* 气泡插件,使用:https://aurora.xcye.xyz/plugin/bubble/
* */
[
//"bubble",
path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-bubble/lib/node/index.js"),
"vuepress-plugin-bubble",
// path.resolve(__dirname, "../../Aurora-plugin/vuepress-plugin-bubble/lib/node/index.js"),
{
//气泡数量 推荐0(不包括)到1之前的小数,
bubbleNumber: 0.14,
Expand Down Expand Up @@ -184,8 +184,8 @@ module.exports = {
]*/
],
//这里使用本地主题
theme: path.resolve(__dirname, "../../Aurora-theme/lib/node/index.js"),
//theme: 'aurora',
// theme: path.resolve(__dirname, "../../Aurora-theme/lib/node/index.js"),
theme: 'aurora',

//站点title
title: "I do not follow,i lives is always all you want",
Expand Down
54 changes: 9 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
{
"name": "my-blog",
"name": "demo1",
"version": "1.0.0",
"description": "",
"description": "aurora blog",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "vuepress dev docs",
"build": "vuepress build docs",
"deploy": "bash script/deploy-dist.sh",
"commit": "git add . && git cz",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
"push": "git push main master"
"build": "vuepress build docs"
},
"author": "qsyyke",
"license": "ISC",
"devDependencies": {
"@types/jquery": "^3.5.6",
"@vuepress/plugin-external-link-icon": "2.0.0-beta.33",
"@vuepress/plugin-google-analytics": "2.0.0-beta.33",
"@vuepress/plugin-register-components": "2.0.0-beta.33",
"@vuepress/plugin-search": "2.0.0-beta.33",
"cz-conventional-changelog": "^3.3.0",
"jquery": "^3.2.1",
"stylus-loader": "^6.1.0",
"vuepress": "2.0.0-beta.33",
"vuepress-webpack": "2.0.0-beta.33"
},
"dependencies": {
"@waline/client": "^1.3.10",
"aplayer": "^1.10.1",
"autoprefixer": "^9.8.8",
"axios": "^0.21.1",
"core-js": "3.22.3",
"crypto-js": "^4.1.1",
"default-passive-events": "^2.0.0",
"easy-typer-js": "^2.1.0",
"gsap": "^3.8.0",
"highlight.js": "^11.3.1",
"html2canvas": "^1.3.2",
"leancloud-storage": "^4.12.0",
"markdown-it": "^12.2.0",
"markdown-it-modify-token": "^1.0.2",
"NeteaseCloudMusicApi": "^4.1.1",
"postcss": "^8.3.9",
"qrcode": "^1.4.4",
"reading-time-estimator": "^1.4.0",
"smoothscroll-polyfill": "^0.4.4",
"swiper": "^8.0.6",
"turndown": "^7.1.1",
"vuex": "^4.0.0-0"
},
"publishConfig": {
"tag": "next"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
"vuepress-plugin-archive": "latest",
"vuepress-plugin-bubble": "latest",
"vuepress-plugin-coze": "1.8.0",
"vuepress-plugin-player": "latest",
"vuepress-theme-aurora": "1.13.3"
}
}
}

0 comments on commit 8b1945b

Please sign in to comment.