feat(author): add author_link and fix highlight bug
This commit is contained in:
@@ -3,22 +3,35 @@
|
||||
max-width: 780px;
|
||||
|
||||
.post-toc {
|
||||
width: 300px;
|
||||
margin-left: 800px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1300px) {
|
||||
@media only screen and (max-width: 1440px) {
|
||||
.warpper {
|
||||
max-width: 680px;
|
||||
|
||||
.post-toc {
|
||||
width: 240px;
|
||||
margin-left: 700px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1200px) {
|
||||
.warpper {
|
||||
max-width: 560px;
|
||||
|
||||
.post-toc {
|
||||
width: 180px;
|
||||
margin-left: 580px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1080px) {
|
||||
@media only screen and (max-width: 960px) {
|
||||
.navbar {
|
||||
.navbar-container {
|
||||
margin: 0 2rem;
|
||||
@@ -52,7 +65,7 @@
|
||||
|
||||
.categories-card {
|
||||
.card-item {
|
||||
width: 95%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.warpper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
max-width: 980px;
|
||||
margin: 0 auto;
|
||||
padding-top: 6rem;
|
||||
|
||||
|
||||
@@ -24,9 +24,20 @@
|
||||
padding: 0 2%;
|
||||
position: relative;
|
||||
|
||||
.categories {
|
||||
.card-item-wrapper {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.card-item-title {
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span {
|
||||
float: right;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,14 +81,3 @@
|
||||
.more-post {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.categories {
|
||||
h3 {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span {
|
||||
float: right;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ p > code {
|
||||
}
|
||||
|
||||
@each $sign, $text in $code-type-list {
|
||||
& .#{$sign} table::after {
|
||||
&.#{$sign} table::after {
|
||||
content: $text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
.post-toc {
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
max-width: 300px;
|
||||
margin-left: 980px;
|
||||
width: 360px;
|
||||
margin-left: 1000px;
|
||||
padding: .8rem;
|
||||
border-left: 1px solid $global-border-color;
|
||||
word-wrap: break-word;
|
||||
|
||||
@@ -70,46 +70,46 @@ $code-font-family: Source Code Pro, Consolas, Liberation Mono, Menlo, Courier, m
|
||||
// Code type list.
|
||||
$code-type-list: (
|
||||
// Custom code type
|
||||
language-bash: "Bash",
|
||||
language-c: "C",
|
||||
language-cs: "C#",
|
||||
language-cpp: "C++",
|
||||
language-css: "CSS",
|
||||
language-coffeescript: "CoffeeScript",
|
||||
language-html: "HTML",
|
||||
language-xml: "XML",
|
||||
language-http: "HTTP",
|
||||
language-json: "JSON",
|
||||
language-java: "Java",
|
||||
language-js: "JavaScript",
|
||||
language-javascript: "JavaScript",
|
||||
language-makefile: "Makefile",
|
||||
language-markdown: "Markdown",
|
||||
language-objectivec: "Objective-C",
|
||||
language-php: "PHP",
|
||||
language-perl: "Perl",
|
||||
language-python: "Python",
|
||||
language-ruby: "Ruby",
|
||||
language-sql: "SQL",
|
||||
language-shell: "Shell",
|
||||
language-erlang: "Erlang",
|
||||
language-go: "Go",
|
||||
language-go-html-template: "Go HTML Template",
|
||||
language-groovy: "Groovy",
|
||||
language-haskell: "Haskell",
|
||||
language-kotlin: "Kotlin",
|
||||
language-clojure: "Clojure",
|
||||
language-less: "Less",
|
||||
language-lisp: "Lisp",
|
||||
language-lua: "Lua",
|
||||
language-matlab: "Matlab",
|
||||
language-rust: "Rust",
|
||||
language-scss: "Scss",
|
||||
language-scala: "Scala",
|
||||
language-swift: "Swift",
|
||||
language-typescript: "TypeScript",
|
||||
language-yml: "YAML",
|
||||
language-yaml: "YAML",
|
||||
language-toml: "TOML",
|
||||
language-diff: "Diff"
|
||||
language-bash: 'Bash',
|
||||
language-c: 'C',
|
||||
language-cs: 'C#',
|
||||
language-cpp: 'C++',
|
||||
language-css: 'CSS',
|
||||
language-coffeescript: 'CoffeeScript',
|
||||
language-html: 'HTML',
|
||||
language-xml: 'XML',
|
||||
language-http: 'HTTP',
|
||||
language-json: 'JSON',
|
||||
language-java: 'Java',
|
||||
language-js: 'JavaScript',
|
||||
language-javascript: 'JavaScript',
|
||||
language-makefile: 'Makefile',
|
||||
language-markdown: 'Markdown',
|
||||
language-objectivec: 'Objective-C',
|
||||
language-php: 'PHP',
|
||||
language-perl: 'Perl',
|
||||
language-python: 'Python',
|
||||
language-ruby: 'Ruby',
|
||||
language-sql: 'SQL',
|
||||
language-shell: 'Shell',
|
||||
language-erlang: 'Erlang',
|
||||
language-go: 'Go',
|
||||
language-go-html-template: 'Go HTML Template',
|
||||
language-groovy: 'Groovy',
|
||||
language-haskell: 'Haskell',
|
||||
language-kotlin: 'Kotlin',
|
||||
language-clojure: 'Clojure',
|
||||
language-less: 'Less',
|
||||
language-lisp: 'Lisp',
|
||||
language-lua: 'Lua',
|
||||
language-matlab: 'Matlab',
|
||||
language-rust: 'Rust',
|
||||
language-scss: 'Scss',
|
||||
language-scala: 'Scala',
|
||||
language-swift: 'Swift',
|
||||
language-typescript: 'TypeScript',
|
||||
language-yml: 'YAML',
|
||||
language-yaml: 'YAML',
|
||||
language-toml: 'TOML',
|
||||
language-diff: 'Diff'
|
||||
) !default;
|
||||
|
||||
@@ -73,12 +73,13 @@ jQuery(function($) {
|
||||
});
|
||||
};
|
||||
|
||||
_Blog.chroma = function() {
|
||||
_Blog.chroma = function () {
|
||||
const blocks = document.querySelectorAll('.highlight > .chroma');
|
||||
for (let i = 0; i < blocks.length; i++) {
|
||||
const block = blocks[i];
|
||||
const afterHighLight = block.querySelector('pre.chroma > code');
|
||||
const lang = afterHighLight ? afterHighLight.className : '';
|
||||
const codes = block.querySelectorAll('pre.chroma > code');
|
||||
const code = codes[codes.length - 1];
|
||||
const lang = code ? code.className.toLowerCase() : '';
|
||||
block.className += ' ' + lang;
|
||||
}
|
||||
};
|
||||
@@ -298,4 +299,4 @@ jQuery(function($) {
|
||||
_Blog.typeit();
|
||||
_Blog.toc();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user