Commit dab9edf5 by 段启岩

将文章内容格式和markdown保持一致

parent 9d59f5a7
...@@ -143,7 +143,6 @@ ...@@ -143,7 +143,6 @@
.article__content{ .article__content{
@extend %article-content; @extend %article-content;
} }
.article__like1{ .article__like1{
......
...@@ -199,20 +199,17 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> ...@@ -199,20 +199,17 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
overflow: hidden; overflow: hidden;
} }
code { code {
display: block; //display: block;
padding: 6px 12px; //padding: 6px 12px;
overflow-y: auto; overflow-y: auto;
font-weight: 300; font-weight: 300;
font-family: Menlo, monospace; font-family: Menlo, monospace;
font-size: 14px; //font-size: 14px;
} }
} }
%article-content {
%article-content{
@extend %markdown; @extend %markdown;
padding:40*$length 6px;
padding:30*$length 0;
word-wrap: break-word; word-wrap: break-word;
overflow: hidden; overflow: hidden;
font-size: 14*$font-size; font-size: 14*$font-size;
...@@ -220,103 +217,37 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> ...@@ -220,103 +217,37 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*{ *{
word-wrap: break-word; word-wrap: break-word;
overflow: auto; overflow: auto;
font-size: 14*$font-size;
font-weight: 400;
} }
b, strong{ b, strong{
font-weight: bold; font-weight: bold;
} }
li,ul,ol{
list-style: disc inside;
}
ul,ol{ ul,ol{
padding-left:40*$length;
line-height: 1.75; line-height: 1.75;
font-weight: 400;
font-size: 15px;
} }
h1,h2,h3,h4,h5,h6{ h1,h2,h3,h4,h5,h6{
color:#333;
line-height: 1.5; line-height: 1.5;
margin-top: 35px;
margin-bottom: 10px;
} }
h1{ h2, h3, h4, {
padding-bottom: 12px;
font-size: 26px;
line-height: 1.75; line-height: 1.75;
font-weight: 400;
border-bottom: 1px solid #ececec;
}
h2{
padding-bottom: 12px;
font-size: 24px;
line-height: 1.75;
font-weight: 400;
border-bottom: 1px solid #ececec;
}
h3{
padding-bottom: 12px;
font-size: 22px;
line-height: 1.75;
font-weight: 400;
border-bottom: 1px solid #ececec;
}
h4{
padding-bottom: 18px;
font-size: 22px;
line-height: 1.75;
font-weight: 400;
border-bottom: 1px solid #ececec;
} }
a{ a{
color:#00AAE6; color:#00AAE6;
} }
p{ p{
font-size: 15*$length;
line-height: 1.75; line-height: 1.75;
font-weight: 400;
margin:22*$length 0;
color:#333;
} }
li{ li{
font-size: 15*$length;
line-height: 1.75; line-height: 1.75;
font-weight: 400;
margin:11*$length 0;
color:#333;
} }
blockquote{ blockquote{
display: block;
border-left: 8*$length solid #d0e5f2;
padding: 5*$length 10*$length;
line-height: 1.4; line-height: 1.4;
font-size: 100%;
background-color: #f1f1f1;
margin:22*$length 0;
}
table{
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
font-size: 14*$font-size;
margin:22*$length 0;
& tbody{
& tr{
}
}
}
code{
width:auto;
} }
img, img,
audio, audio,
...@@ -324,20 +255,8 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> ...@@ -324,20 +255,8 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
td {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3*$length 5*$length;
}
th {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3*$length 5*$length;
}
} }
//文字超出不换行 //文字超出不换行
%nowrap{ %nowrap{
overflow: hidden; overflow: hidden;
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</div> </div>
</div> </div>
<p class="article__introduce">{{articleDetail.questionAbstract}}</p> <p class="article__introduce">{{articleDetail.questionAbstract}}</p>
<div class="article__content" v-html="articleDetail.contentHtml"> <div class="article__content markdown-body" v-html="articleDetail.contentHtml">
</div> </div>
<div :class="returnArticleLikeClass" @click="clickToPraise"> <div :class="returnArticleLikeClass" @click="clickToPraise">
...@@ -335,5 +335,6 @@ ...@@ -335,5 +335,6 @@
align-items: flex-start; align-items: flex-start;
@extend %detail-container; @extend %detail-container;
} }
</style> </style>
<style lang="css">@import "assets/github-markdown.min.css";</style>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</div> </div>
</div> </div>
<p class="article__introduce">{{articleDetail.blogAbstract}}</p> <p class="article__introduce">{{articleDetail.blogAbstract}}</p>
<div class="article__content" v-html="articleDetail.contentHtml"> <div class="article__content markdown-body" v-html="articleDetail.contentHtml">
</div> </div>
...@@ -344,3 +344,4 @@ ...@@ -344,3 +344,4 @@
@extend %detail-container; @extend %detail-container;
} }
</style> </style>
<style lang="css">@import "assets/github-markdown.min.css";</style>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<p class="article__introduce">{{articleDetail.projectDescription}}</p> <p class="article__introduce">{{articleDetail.projectDescription}}</p>
<div class="article__content" v-html="articleDetail.contentHtml"> <div class="article__content markdown-body" v-html="articleDetail.contentHtml">
</div> </div>
...@@ -322,6 +322,5 @@ ...@@ -322,6 +322,5 @@
align-items: flex-start; align-items: flex-start;
@extend %detail-container; @extend %detail-container;
} }
</style> </style>
<style lang="css">@import "assets/github-markdown.min.css";</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment