jmalcloud-view/src/styles/markdown.scss
2020-03-29 15:49:51 +08:00

484 lines
10 KiB
SCSS

/deep/:root {
--font-color: #000;
--night-font-color: #ddd;
--primary: #b2fefa;
--secondary: #0ed2f7;
--dark: #0052d4;
--gradient-light: #5d9eea;
--gradient-middle: #0f27b5;
--gradient-dark: #100e17;
--code-gradient-light: #cff0ff;
--code-gradient-dark: #afcafd;
--maxwidth: 1284px;
}
.scrollbar {
position: fixed;
height: 3px;
width: 10px;
top: 50px;
background-color: #50bcb6;
-webkit-transition: width 0.5s ease;
-moz-transition: width 0.5s ease;
transition: width 0.5s ease;
z-index: 11;
}
.gradient-bg-rev {
background: #b2fefa !important;
background: -webkit-linear-gradient(to right, #0052d4, #0ed2f7, #b2fefa) !important;
background: linear-gradient(to right, #0052d4, #0ed2f7, #b2fefa) !important;
}
/deep/ #top {
line-height: 2;
height: 50px;
text-align: center;
width: 100%;
position: fixed;
top: 0;
z-index: 10;
display: none;
/* border-bottom: 1px solid #201c29; */
-webkit-transition: all 350ms ease-in-out;
transition: all 350ms ease-in-out;
-webkit-box-shadow: 4px -11px 20px #000;
box-shadow: 4px -11px 20px #000;
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
background-color: rgba(255,255,255,0.72);
.bar {
position: absolute;
height: 100%;
background: #b2fefa !important;
background: -webkit-linear-gradient(to right, #0052d4, #0ed2f7, #b2fefa) !important;
background: linear-gradient(to right, #0052d4, #0ed2f7, #b2fefa) !important;
z-index: -1;
width: 50%;
-webkit-transition: width 0.5s ease-in-out;
-moz-transition: width 0.5s ease-in-out;
transition: width 0.5s ease-in-out;
opacity: 0.25;
}
.icon-home {
top: 14px;
}
.icon-home {
-webkit-background-size: 20px 20px;
-moz-background-size: 20px 20px;
background-size: 20px 20px;
background-position: center center;
background-repeat: no-repeat;
width: 20px;
height: 20px;
position: absolute;
left: 20px;
cursor: pointer;
}
.subtitle {
background: #b2fefa !important;
background: -webkit-linear-gradient(to right, #000000, #4a4a4a, #000000) !important;
background: linear-gradient(to right, #000000, #4a4a4a, #000000) !important;
-webkit-background-clip: text !important;
-webkit-text-fill-color: transparent !important;
-webkit-box-decoration-break: clone !important;
box-decoration-break: clone !important;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
font-size: 14px;
margin-top: 12px;
display: none;
transition: display 400ms ease-in-out;
max-width: 50%;
max-height: 30px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.animateIn {
transform: translateY(0px);
}
.animateOut {
transform: translateY(-100%);
}
.body-wrapper {
position: relative;
display: flex;
width: 100%;
max-width: 1080px;
min-height: 1000px;
margin: 0 auto;
flex-wrap: wrap;
justify-content: space-between;
align-items: stretch;
}
/deep/ .v-note-wrapper {
position: unset;
}
.l_main {
padding: 70px 16px 16px;
}
.l_main {
width: calc(100% - 1 * 285px);
float: left;
}
@media screen and (max-width: 1440px){
.l_main {
width: calc(100% - 1 * 240px);
}
}
@media screen and (max-width: 768px){
.l_main {
width: 100%;
padding-left: 0;
padding-right: 0;
}
}
@media screen and (max-width: 425px){
.l_main {
padding: 70px 0 16px 0;
}
}
/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;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px;
}
@media only screen and (max-width: 768px){
/deep/ .right-bj {
width: 240px;
}
/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){
/deep/ .right-bj {
width: 240px;
}
/deep/ .slimScrollDiv {
width: 240px;
}
}
@media only screen and (min-width: 992px){
/deep/ .right-bj {
width: 240px;
}
/deep/ .slimScrollDiv {
width: 240px;
}
}
@media only screen and (min-width: 1200px){
/deep/ .right-bj {
width: 240px;
}
/deep/ .slimScrollDiv {
width: 240px;
}
}
@media only screen and (min-width: 1920px){
/deep/ .right-bj {
width: 285px;
}
/deep/ .slimScrollDiv {
width: 285px;
}
}
/deep/ li {
list-style: none;
}
/deep/ .slimScrollBar {
background: rgba(0, 0, 0, 0.3) !important;
}
/deep/ .right-menu {
width: 100%!important;
display: flex;
flex-direction: column;
}
/deep/ .right-menu .toc-header {
padding: calc(16px - 2px);
color: #2196f3;
font-size: 1.2rem;
}
/deep/ .right-menu .toc-header span{
margin-left: 10px;
}
/deep/ .right-menu > div {
display: block;
border-bottom: 1px dashed #cccccc;
}
/deep/ .right-menu > div ul {
display: block;
}
/deep/ .right-menu > div .menu li {
line-height: 40px;
padding-left: 40px;
margin-top: 4px;
margin-bottom: 8px;
padding-right: 16px;
color: #777;
position: relative;
}
/deep/ .right-menu > div .menu li a {
color: #777;
display: block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
/deep/ .right-menu > div .menu li:hover a {
color: #13C2C2;
}
/deep/ .right-menu > div .menu li.current-menu-item {
background: #e6f7ff;
}
/deep/ .right-menu > div .menu li.current-menu-item a {
color: #13C2C2;
}
/deep/ .right-menu > div .menu li.current-menu-item:before {
content: "";
position: absolute;
right: 0;
top: 0;
width: 2px;
background: #13C2C2;
height: 100%;
}
/deep/ .right-menu > div.titleList {
position: relative;
}
/deep/ .right-menu > div.titleList li {
margin-bottom: 4px;
cursor: pointer;
padding-right: 16px;
font-weight: normal;
line-height: 40px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding-left: 20px;
position: relative;
transition: all 0.2s;
}
/deep/ .right-menu > div.titleList li a {
display: block;
transition: all 0.2s;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 14px;
color: #333;
}
/deep/ .right-menu > div.titleList li.active a {
color: #13C2C2;
}
/deep/ .right-menu > div.titleList li:hover a {
color: #13C2C2;
}
/deep/ .right-menu > div.titleList .pl {
padding-left: 35px;
}
/deep/ .right-menu > div.titleList .pl a {
font-size: 13px;
color: #777;
}
/deep/ .right-menu > div.titleList .j-bj {
background: linear-gradient(to right, #5d9eea, #afcafd);
position: absolute;
left: 0;
top: 0;
height: 0;
width: 100%;
z-index: -1;
transition: all 0.2s;
}
/deep/ .right-menu > div.titleList .j-bj:before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 2.5px;
background: #0070fd;
height: 100%;
}
/deep/ .right-menu > div a {
color: #444;
font-size: 15px;
}
/deep/ mark {
background: linear-gradient(to right, #FFEB3B, #ff0101a3);
color: #000;
overflow-wrap: break-word;
word-wrap: break-word;
padding: 0.1rem 0.3rem 0.2rem;
border-radius: 8px;
}
/deep/ .markdown-body {
blockquote {
padding: 0.8em 1em;
color: #656565;
background-color: rgba(119,119,119,0.05);
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-left: .2em solid #0052d4;
}
li+li {
margin-top: 0;
}
pre {
padding: 0;
overflow: auto;
font-size: 1em;
line-height: 1.45;
background-color: #f6f8fa;
border-radius: 3px;
.code {
position: relative;
border-radius: 3px;
border: 1px solid #C3CCD0;
padding-left: 50px!important;
background: #282a36!important;
code {
//position: absolute;
line-height: 20px!important;
background: unset;
opacity: unset;
color: unset;
}
ul.pre-numbering {
position: absolute;
top: 0;
left: -5px;
background: #201c29;
width: 3em;
padding: 0.5em 0 0.5em 0.8em;
list-style-type: none;
counter-reset: sectioncounter;
margin-bottom: 0;
li{
margin-top: 0!important;
&:before{
content:counter(sectioncounter) "";
counter-increment:sectioncounter;
display: inline-block;
width: 2.2em;
text-align: center;
border-right: solid 1px rgba(246, 247, 255, 0.53);
}
}
}
i.code-copy{
position: absolute;
top:0;
right: 0;
background-color: #464d5e;
padding: 3px;
margin: 3px 3px 0 0;
font-size: 11px;
border-radius: inherit;
color: #f1f1f1;
cursor: pointer;
display: none;
}
&:hover i.code-copy{
display: block;
}
}
}
code {
background: linear-gradient(to right, #5d9eea, #afcafd);
color: #000;
overflow-wrap: break-word;
word-wrap: break-word;
padding: 0.1rem 0.3rem 0.2rem;
border-radius: 8px;
opacity: 0.9;
}
pre code {
background: unset;
color: unset;
opacity: unset;
padding: unset;
}
.hljs code {
background: unset;
color: unset;
opacity: unset;
padding: unset;
}
}
.pre-numbering {
}
@media screen and (max-width: 425px){
.pre-numbering {
display: none;
}
}