修改markdown样式

This commit is contained in:
jmal 2020-03-09 23:27:07 +08:00
parent 7fffbcfe83
commit 730049e93d
3 changed files with 101 additions and 69 deletions

View File

@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login','/public/p','/share'] // no redirect whitelist const whiteList = ['/login','/public/articles','/public/article','/share'] // no redirect whitelist
router.beforeEach(async(to, from, next) => { router.beforeEach(async(to, from, next) => {
// start progress bar // start progress bar

View File

@ -1,36 +1,88 @@
/deep/ .right-bj {
//top: 70px;
//background: rgba(255, 255, 255, 0.8);
//z-index: 1;
transition: all .5s;
//border-radius: 5px;
//box-shadow: rgba(0, 0, 0, 0.1) 0 2px 12px 0;
width: 285px;
float: right;
position: relative;
display: flex;
flex-direction: column;
}
/deep/ .slimScrollDiv {
border-right: 1px solid #e8e8e8;
-webkit-transition: all .5s;
transition: all .5s;
border-radius: 5px;
-webkit-box-shadow: rgba(0,0,0,0.1) 0 2px 12px 0;
box-shadow: rgba(0,0,0,0.1) 0 2px 12px 0;
width: 285px;
top: 70px;
//bottom: 20px;
overflow: auto;
float: right;
position: fixed;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
@media only screen and (max-width: 768px){ @media only screen and (max-width: 768px){
/deep/ .right-bj { /deep/ .right-bj {
right: 0; width: 240px;
width: 0; }
/deep/ .slimScrollDiv {
position: fixed;
max-height: 1000px;
width: calc(100% - 2 * 16px);
top: 64px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.1),0 4px 8px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.1);
visibility: hidden;
transform: scale(0,0);
transform-origin: right top;
} }
} }
@media only screen and (min-width: 768px){ @media only screen and (min-width: 768px){
/deep/ .right-bj { /deep/ .right-bj {
right: 0; width: 240px;
width: 0; }
/deep/ .slimScrollDiv {
width: 240px;
} }
} }
@media only screen and (min-width: 992px){ @media only screen and (min-width: 992px){
/deep/ .right-bj { /deep/ .right-bj {
right: 0; width: 240px;
width: 0; }
} /deep/ .slimScrollDiv {
width: 240px;
}
} }
@media only screen and (min-width: 1200px){ @media only screen and (min-width: 1200px){
/deep/ .right-bj { /deep/ .right-bj {
right: 0%; width: 240px;
width: 18%; }
/deep/ .slimScrollDiv {
width: 240px;
} }
} }
@media only screen and (min-width: 1920px){ @media only screen and (min-width: 1920px){
/deep/ .right-bj { /deep/ .right-bj {
right: 7%; width: 285px;
width: 15%; }
/deep/ .slimScrollDiv {
width: 285px;
} }
} }
@ -38,25 +90,13 @@
list-style: none; list-style: none;
} }
/deep/ .right-bj {
position: fixed;
top: 70px;
background: rgba(255, 255, 255, 0.8);
z-index: 1;
transition: all .5s;
border-radius: 5px;
box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px 0px;
}
/deep/ .slimScrollDiv {
width: 100%!important;
border-right: 1px solid #e8e8e8;
//margin-top: 104px;
}
/deep/ .slimScrollBar { /deep/ .slimScrollBar {
background: rgba(0, 0, 0, 0.3) !important; background: rgba(0, 0, 0, 0.3) !important;
} }
/deep/ .right-menu { /deep/ .right-menu {
width: 100%!important; width: 100%!important;
display: flex;
flex-direction: column;
} }
/deep/ .right-menu .toc-header { /deep/ .right-menu .toc-header {
padding: calc(16px - 2px); padding: calc(16px - 2px);

View File

@ -1,11 +1,8 @@
<template> <template>
<div v-wechat-title="pageTitle"> <div v-wechat-title="pageTitle">
<al-back-top></al-back-top> <al-back-top></al-back-top>
<div class="content"> <div class="body-wrapper">
<el-row :gutter="0"> <el-main class="l_main">
<el-col :xs="0" :sm="1" :md="4" :lg="5" :xl="6"><div style="color: white">c</div></el-col>
<el-col :xs="24" :sm="22" :md="16" :lg="14" :xl="12">
<el-main class="main-content">
<mavon-editor <mavon-editor
ref="md" ref="md"
v-if="!showList" v-if="!showList"
@ -16,22 +13,19 @@
defaultOpen="preview" defaultOpen="preview"
/> />
</el-main> </el-main>
</el-col>
<el-col :xs="0" :sm="1" :md="4" :lg="5" :xl="6"> <div v-show="titleList.length > 0" class="right-bj">
</el-col> <div class="slimScrollDiv">
</el-row> <div class="right-menu">
<div v-show="titleList.length > 0" class="right-bj"> <div class="toc-content">
<div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 662px;"> <header class="toc-header"><svg-icon icon-class="contents"></svg-icon><span>目录</span></header>
<div class="right-menu" id="inner-content-div" style="overflow: hidden; width: auto; height: 662px;"> </div>
<div class="toc-content"> <div class="j-titleList titleList">
<header class="toc-header"><svg-icon icon-class="contents"></svg-icon><span>目录</span></header> <div class="j-bj" style="height: 40px; top: 0;"></div>
</div> </div>
<div class="j-titleList titleList"> </div>
<div class="j-bj" style="height: 40px; top: 0px;"></div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -139,37 +133,35 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import "src/styles/markdown"; @import "src/styles/markdown";
.body-wrapper {
position: relative;
display: flex;
width: 100%;
max-width: 1080px;
margin: 0 auto;
flex-wrap: wrap;
justify-content: space-between;
align-items: stretch;
}
/deep/ .v-note-wrapper { /deep/ .v-note-wrapper {
position: unset; position: unset;
} }
@media only screen and (max-width: 768px){ .l_main {
.el-main { width: calc(100% - 1 * 285px);
padding: 20px 0px 20px 0px; float: left;
}
@media screen and (max-width: 1440px){
.l_main {
width: calc(100% - 1 * 240px);
} }
} }
@media only screen and (min-width: 768px){ @media screen and (max-width: 768px){
.el-main { .l_main {
padding: 20px; width: 100%;
}
}
@media only screen and (min-width: 992px){
.el-main {
padding: 20px;
}
}
@media only screen and (min-width: 1200px){
.el-main {
padding: 20px;
}
}
@media only screen and (min-width: 1920px){
.el-main {
padding: 20px;
} }
} }