Skip to content

Commit

Permalink
fix(tag): fix tag content
Browse files Browse the repository at this point in the history
  • Loading branch information
xcyeye committed Oct 22, 2021
1 parent e330b29 commit be74afe
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 20 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# [1.0.0](https://github.com/qsyyke/vuepress-theme-aurora/compare/v1.4.1...v1.0.0) (2021-10-21)
# [1.0.0](https://github.com/qsyyke/vuepress-theme-aurora/compare/v1.4.2...v1.0.0) (2021-10-21)



## [1.4.2](https://github.com/qsyyke/vuepress-theme-aurora/compare/v1.4.1...v1.4.2) (2021-10-21)


### Bug Fixes

* **custom:** provide a new global component ([d2f743c](https://github.com/qsyyke/vuepress-theme-aurora/commit/d2f743c5c36dbed00df41305c455648213ead02e))
* **link,tag:** fix home page friend link and tag page ([80db80d](https://github.com/qsyyke/vuepress-theme-aurora/commit/80db80ddd892e65bea351730dcb1d626eca559f6))
* **style:** fix markdown style ([e330b29](https://github.com/qsyyke/vuepress-theme-aurora/commit/e330b2942437b1636ced60febf2294bfbc505ffb))


### Features

* add custom component ([4c4d37d](https://github.com/qsyyke/vuepress-theme-aurora/commit/4c4d37d1d8a1ca446d7b9b7dd0a19e0b39a3197f))



Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="toggle-sidebar-button" @click="openMobileSidebar">
<div class="toggle-sidebar-button" :class="{'aurora-mobile-open': mobileOpenStatus}" @click="openMobileSidebar">
<svg
class="icon"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -22,8 +22,15 @@ export default defineComponent({
name: 'ToggleSidebarButton',
emits: ['toggle'],
data() {
return {
mobileOpenStatus: false
}
},
methods: {
openMobileSidebar() {
this.$store.state.mobileOpenStatus = !this.$store.state.mobileOpenStatus
this.mobileOpenStatus = !this.mobileOpenStatus
this.$store.commit("setOpenMobileSidebar",{
openMobileSidebar: !this.$store.state.openMobileSidebar
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--这是页面右侧的侧边栏,和默认主题的侧边栏不同-->
<div ref="sidebar-top" class="sidebar-cqy"></div>
<div :style="$store.state.borderRadiusStyle + $store.state.opacityStyle" id="stickSidebar"
class="sidebar-single-enter-animate">
:class="{'sidebar-single-enter-animate': showEnterAnimate}">
<!---->
<div :class="{sidebarScroll: isShowCatalog}" class="home-sidebar" id="home-sidebar">

Expand Down Expand Up @@ -64,21 +64,21 @@
</div>

<!--顶部导航-->
<div :id="customId" v-if="showNavbar" class="sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="showNavbar" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class="sidebar-single-common">
<mobile-sidebar-nav />
<slot name="sidebar-son3"/>
</div>
<slot name="sidebar3"></slot>

<!--搜索-->
<div :id="customId" v-if="showSearch" class="sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="showSearch" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class="sidebar-single-common">
<SearchBox/>
<slot name="sidebar-son4"/>
</div>
<slot name="sidebar4"></slot>

<!--文章-->
<div :id="customId" v-if="showArticle" class="sidebar-single-page sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="showArticle" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class="sidebar-single-page sidebar-single-common">
<div class="change-page">
<div v-if="isShowCatalog" class="catalog-page change-page-common">
<span :class="{changePageActive: changePageIndex === '1'}" index="1" @click="changePage">文章目录</span>
Expand Down Expand Up @@ -108,7 +108,7 @@
<slot name="sidebar5"></slot>

<!--公告-->
<div :id="customId" v-if="getShowMessage" class="sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="getShowMessage" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class="sidebar-single-common">
<div class="sidebar-page">
<span class="aurora-iconfont-common aurora-sidebar-message"></span>
<span>公告</span>
Expand All @@ -123,7 +123,7 @@
<slot name="sidebar6"></slot>

<!--标签-->
<div :id="customId" v-if="showTagCloud" class="sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="showTagCloud" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class="sidebar-single-common">
<div v-if="!isMobileSidebar" id="home-tag-sidebar" class="sidebar-page">
<span class="aurora-iconfont-common aurora-sidebar-tag"></span>
<span>标签</span>
Expand Down Expand Up @@ -152,7 +152,7 @@
<slot name="sidebar7"></slot>

<!--站点-->
<div :id="customId" v-if="showSite" id="sidebar-single-common" class="sidebar-single-enter-animate sidebar-single-common">
<div :id="customId" v-if="showSite" id="sidebar-single-common" :class="{'sidebar-single-enter-animate': showEnterAnimate}" class=" sidebar-single-common">
<div class="sidebar-page">
<span class="aurora-iconfont-common aurora-sidebar-site"></span>
<span>site</span>
Expand Down Expand Up @@ -201,6 +201,12 @@ export default {
}
},
props: {
showEnterAnimate: {
type: Boolean,
default() {
return true
}
},
sidebarWidthVar: {
type: Number,
default() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<template>
<div :id="setShowMobileSidebar(1)" class="mobile-sidebar-control" @click="showMobileSidebar"></div>
<div :id="setShowMobileSidebar(2)" :class="{mobileAnimate: !$store.state.openMobileSidebar}" class="mobile-sidebar animate__animated ">
<div :id="setShowMobileSidebar(2)" :class="{mobileAnimate: !$store.state.openMobileSidebar}" class="mobile-sidebar">
<HomeSidebar :show-article="false" :show-message="false"
:is-mobile-sidebar="true"
:show-sidebar-social="true"
:custom-id="'mobile-sidebar-custom'" :show-site="false"
:show-search="false"
:show-enter-animate="false"
:show-sidebar-link="false"
:is-show-catalog="true">
<template #sidebar-son2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :style="setBackgroundStyle(getRandomIntValue(1,1000))" id="tag-page" class="tag-page">
<div class="tag-page-item">
<div style="display: none" v-html="pageMap.contentRendered" :class="'tagItemContent' + index"></div>
<div style="display: none" v-html="pageMap.contentRendered" ref="tagContent" :class="'tagItemContent' + index"></div>
<div id="tag-page-left" :style="setBackgroundImg" class="tag-page-left tag-page-item-common"></div>
<div class="tag-page-right tag-page-item-common" id="tag-page-right">
<div id="tag-page-right-top" class="tag-page-right-top">
Expand Down Expand Up @@ -92,10 +92,9 @@ export default {
},
mounted() {
this.$nextTick(() => {
new Promise((resolve,reject) => {
let tagContent = ""
let tagContentPsDom = document.querySelectorAll(".tagItemContent" + this.index + " p")
let tagContentPsDom = this.$refs.tagContent.getElementsByTagName("p")
for (let i = 0; i < tagContentPsDom.length; i++) {
tagContent = tagContent + tagContentPsDom[i].innerText
}
Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/theme/lib/client/components/global/Poster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export default {
}
}
},
created() {
},
methods: {
getRandomInt(min, max) {
min = Math.ceil(min);
Expand Down
3 changes: 2 additions & 1 deletion docs/.vuepress/theme/lib/client/public/js/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module.exports = {

//版权信息
latestVersion: 'V1.3.2',
printRightIndex: 0
printRightIndex: 0,
mobileOpenStatus: false

}
63 changes: 58 additions & 5 deletions docs/.vuepress/theme/lib/client/styles/theme.style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/.vuepress/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-theme-aurora",
"version": "1.4.1",
"version": "1.4.2",
"description": "A vuepress-based animation blog theme, simple, beautiful, multi-color, multiple custom functions, providing article poster sharing, talk, photo album, comment and other features 一个基于vuepress的动漫类博客主题,简洁,漂亮,多色彩,多种自定义功能,提供文章海报分享,说说,相册,评论等特色功�?",
"main": "./lib/node/index.js",
"directories": {
Expand Down

0 comments on commit be74afe

Please sign in to comment.