mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 02:58:37 +08:00
Fix style
This commit is contained in:
parent
4b961a9b69
commit
824e64ae48
@ -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>
|
||||
|
@ -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 })
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user