Fix style

This commit is contained in:
qingwei.li 2016-11-26 21:07:47 +08:00
parent 4b961a9b69
commit 824e64ae48
4 changed files with 7 additions and 6 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="/themes/vue.css">
<link rel="stylesheet" href="/themes/buble.css">
</head>
<body>
<nav>

View File

@ -30,7 +30,7 @@ renderer.heading = function (text, level) {
renderer.code = function (code, lang) {
const hl = Prism.highlight(code, Prism.languages[lang] || Prism.languages.markup)
return `<pre><code class="lang-${lang}" data-lang="${lang}">${hl}</code></pre>`
return `<pre data-lang="${lang}"><code class="lang-${lang}">${hl}</code></pre>`
}
marked.setOptions({ renderer })

View File

@ -362,9 +362,10 @@ main {
}
.markdown-section pre>code {
padding: 0;
display: block;
font-family: Inconsolata;
line-height: 1.2em;
padding: 0;
}
.markdown-section code::after, .markdown-section code::before {

View File

@ -283,13 +283,14 @@ main {
}
.markdown-section pre {
font-family: 'Roboto Mono', Monaco, courier, monospace;
-moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial;
background-color: #f8f8f8;
font-family: 'Roboto Mono', Monaco, courier, monospace;
line-height: 1.5em;
margin: 1.2em 0;
padding: 1.2em 1.4em;
position: relative;
}
/* code highlight */
@ -415,7 +416,6 @@ code .token {
pre code {
overflow-x: auto;
position: relative;
padding: 0;
background-color: #f8f8f8;
padding: 0.8em 0.8em 0.4em;
@ -423,7 +423,7 @@ pre code {
border-radius: 2px;
}
pre code::after {
pre::after {
color: #ccc;
content: attr(data-lang);
font-size: 0.75em;