mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-16 21:36:56 +01:00
This commit is contained in:
parent
a345157488
commit
6a57aac1e4
6 changed files with 141 additions and 144 deletions
|
@ -1,63 +1,75 @@
|
||||||
$ht-code-border-radius: .4em;
|
$ht-code-border-radius: .4em;
|
||||||
.highlight {
|
.highlight {
|
||||||
width: 55%;
|
width: 50%;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
border-radius: $ht-code-border-radius;
|
// border-radius: $ht-code-border-radius;
|
||||||
|
margin-top: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
margin-right: 2.5%;
|
||||||
|
margin-left: 2.5%;
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
scrollbar-width: none;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 1rem;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&>.chroma {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&>.chroma .hl {
|
||||||
|
// border-radius: $ht-code-border-radius / 2;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
&::before{
|
||||||
|
content: "> ";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&>div.chroma>table.lntable{
|
&>div.chroma>table.lntable{
|
||||||
margin: $ht-code-border-radius 0 $ht-code-border-radius 0;
|
overflow: initial;
|
||||||
|
// margin: $ht-code-border-radius 0 $ht-code-border-radius 0;
|
||||||
& td:first-of-type {
|
& td:first-of-type {
|
||||||
& span:not(& span>span) {
|
& span:not(& span>span) {
|
||||||
padding: 0 .75em 0 .5em;
|
padding: 0 .75em 0 .5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
&>.chroma>code {
|
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-block-start: 0.5em;
|
||||||
|
margin-block-end: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&>.chroma>code {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
margin-top: .5em;
|
margin-top: .5em;
|
||||||
margin-bottom: .5em;
|
margin-bottom: .5em;
|
||||||
margin-left: .5em;
|
margin-left: .5em;
|
||||||
|
|
||||||
&>span.hl{
|
&>span.hl{
|
||||||
margin-left: -.5em;
|
margin-left: -.5em;
|
||||||
padding-left: .5em;
|
padding-left: .5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chroma .hl {
|
|
||||||
// border-radius: $ht-code-border-radius / 2;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
border-radius: $ht-code-border-radius;
|
|
||||||
width: 10px;
|
|
||||||
height: 1rem;
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
border-radius: $ht-code-border-radius;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 760px) {
|
@media screen and (max-width: 760px) {
|
||||||
.highlight {
|
.highlight .chroma {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight .lntable {
|
|
||||||
overflow: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.highlight pre {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.highlight pre code {
|
|
||||||
display: block;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fix #48 => https://github.com/slashformotion/hugo-tufte/issues/48
|
// fix #48 => https://github.com/slashformotion/hugo-tufte/issues/48
|
||||||
ul>li>div.highlight {
|
ul>li>div.highlight {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
$ht-code-bgcolor: #282a36;
|
$ht-code-bgcolor: #282a36;
|
||||||
|
|
||||||
@import "syntax-dark.scss";
|
@import "syntax-dark.scss";
|
||||||
|
|
||||||
.highlight {
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
background: $ht-code-bgcolor;
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
background: scale-color($ht-code-bgcolor, $lightness: 23%, $saturation: -40%);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +1,3 @@
|
||||||
$ht-code-bgcolor: #dde2ff;
|
$ht-code-bgcolor: #dde2ff;
|
||||||
|
|
||||||
@import "syntax-light.scss";
|
@import "syntax-light.scss";
|
||||||
|
|
||||||
.highlight {
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
background: $ht-code-bgcolor;
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
background: scale-color($ht-code-bgcolor, $lightness: -13%, $saturation: -80%);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,91 +1,92 @@
|
||||||
/* Dracula Theme v1.2.5
|
/* Dracula Theme v1.2.5
|
||||||
*
|
*
|
||||||
* https://github.com/zenorocha/dracula-theme
|
* https://github.com/zenorocha/dracula-theme
|
||||||
*
|
*
|
||||||
* Copyright 2016, All rights reserved
|
* Copyright 2016, All rights reserved
|
||||||
*
|
*
|
||||||
* Code licensed under the MIT license
|
* Code licensed under the MIT license
|
||||||
* http://zenorocha.mit-license.org
|
* http://zenorocha.mit-license.org
|
||||||
*
|
*
|
||||||
* @author Rob G <wowmotty@gmail.com>
|
* @author Rob G <wowmotty@gmail.com>
|
||||||
* @author Chris Bracco <chris@cbracco.me>
|
* @author Chris Bracco <chris@cbracco.me>
|
||||||
* @author Zeno Rocha <hi@zenorocha.com>
|
* @author Zeno Rocha <hi@zenorocha.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.highlight .hl { background-color: scale-color($ht-code-bgcolor, $lightness: 32%, $saturation: -40%) }
|
.highlight .lnt { color: #6272a4 } /* line number */
|
||||||
.highlight { background: $ht-code-bgcolor; color: #f8f8f2 }
|
.highlight .hl { background-color: scale-color($ht-code-bgcolor, $lightness: 32%, $saturation: -40%) }
|
||||||
.highlight .c { color: #6272a4 } /* Comment */
|
.highlight { background: $ht-code-bgcolor; color: #f8f8f2 }
|
||||||
.highlight .err { color: #f8f8f2 } /* Error */
|
.highlight .c { color: #6272a4 } /* Comment */
|
||||||
.highlight .g { color: #f8f8f2 } /* Generic */
|
.highlight .err { color: #f8f8f2 } /* Error */
|
||||||
.highlight .k { color: #ff79c6 } /* Keyword */
|
.highlight .g { color: #f8f8f2 } /* Generic */
|
||||||
.highlight .l { color: #f8f8f2 } /* Literal */
|
.highlight .k { color: #ff79c6 } /* Keyword */
|
||||||
.highlight .n { color: #f8f8f2 } /* Name */
|
.highlight .l { color: #f8f8f2 } /* Literal */
|
||||||
.highlight .o { color: #ff79c6 } /* Operator */
|
.highlight .n { color: #f8f8f2 } /* Name */
|
||||||
.highlight .x { color: #f8f8f2 } /* Other */
|
.highlight .o { color: #ff79c6 } /* Operator */
|
||||||
.highlight .p { color: #f8f8f2 } /* Punctuation */
|
.highlight .x { color: #f8f8f2 } /* Other */
|
||||||
.highlight .ch { color: #6272a4 } /* Comment.Hashbang */
|
.highlight .p { color: #f8f8f2 } /* Punctuation */
|
||||||
.highlight .cm { color: #6272a4 } /* Comment.Multiline */
|
.highlight .ch { color: #6272a4 } /* Comment.Hashbang */
|
||||||
.highlight .cp { color: #ff79c6 } /* Comment.Preproc */
|
.highlight .cm { color: #6272a4 } /* Comment.Multiline */
|
||||||
.highlight .cpf { color: #6272a4 } /* Comment.PreprocFile */
|
.highlight .cp { color: #ff79c6 } /* Comment.Preproc */
|
||||||
.highlight .c1 { color: #6272a4 } /* Comment.Single */
|
.highlight .cpf { color: #6272a4 } /* Comment.PreprocFile */
|
||||||
.highlight .cs { color: #6272a4 } /* Comment.Special */
|
.highlight .c1 { color: #6272a4 } /* Comment.Single */
|
||||||
.highlight .gd { color: #8b080b } /* Generic.Deleted */
|
.highlight .cs { color: #6272a4 } /* Comment.Special */
|
||||||
.highlight .ge { color: #f8f8f2; text-decoration: underline } /* Generic.Emph */
|
.highlight .gd { color: #8b080b } /* Generic.Deleted */
|
||||||
.highlight .gr { color: #f8f8f2 } /* Generic.Error */
|
.highlight .ge { color: #f8f8f2; text-decoration: underline } /* Generic.Emph */
|
||||||
.highlight .gh { color: #f8f8f2; font-weight: bold } /* Generic.Heading */
|
.highlight .gr { color: #f8f8f2 } /* Generic.Error */
|
||||||
.highlight .gi { color: #f8f8f2; font-weight: bold } /* Generic.Inserted */
|
.highlight .gh { color: #f8f8f2; font-weight: bold } /* Generic.Heading */
|
||||||
.highlight .go { color: #44475a } /* Generic.Output */
|
.highlight .gi { color: #f8f8f2; font-weight: bold } /* Generic.Inserted */
|
||||||
.highlight .gp { color: #f8f8f2 } /* Generic.Prompt */
|
.highlight .go { color: #44475a } /* Generic.Output */
|
||||||
.highlight .gs { color: #f8f8f2 } /* Generic.Strong */
|
.highlight .gp { color: #f8f8f2 } /* Generic.Prompt */
|
||||||
.highlight .gu { color: #f8f8f2; font-weight: bold } /* Generic.Subheading */
|
.highlight .gs { color: #f8f8f2 } /* Generic.Strong */
|
||||||
.highlight .gt { color: #f8f8f2 } /* Generic.Traceback */
|
.highlight .gu { color: #f8f8f2; font-weight: bold } /* Generic.Subheading */
|
||||||
.highlight .kc { color: #ff79c6 } /* Keyword.Constant */
|
.highlight .gt { color: #f8f8f2 } /* Generic.Traceback */
|
||||||
.highlight .kd { color: #8be9fd; font-style: italic } /* Keyword.Declaration */
|
.highlight .kc { color: #ff79c6 } /* Keyword.Constant */
|
||||||
.highlight .kn { color: #ff79c6 } /* Keyword.Namespace */
|
.highlight .kd { color: #8be9fd; font-style: italic } /* Keyword.Declaration */
|
||||||
.highlight .kp { color: #ff79c6 } /* Keyword.Pseudo */
|
.highlight .kn { color: #ff79c6 } /* Keyword.Namespace */
|
||||||
.highlight .kr { color: #ff79c6 } /* Keyword.Reserved */
|
.highlight .kp { color: #ff79c6 } /* Keyword.Pseudo */
|
||||||
.highlight .kt { color: #8be9fd } /* Keyword.Type */
|
.highlight .kr { color: #ff79c6 } /* Keyword.Reserved */
|
||||||
.highlight .ld { color: #f8f8f2 } /* Literal.Date */
|
.highlight .kt { color: #8be9fd } /* Keyword.Type */
|
||||||
.highlight .m { color: #bd93f9 } /* Literal.Number */
|
.highlight .ld { color: #f8f8f2 } /* Literal.Date */
|
||||||
.highlight .s { color: #f1fa8c } /* Literal.String */
|
.highlight .m { color: #bd93f9 } /* Literal.Number */
|
||||||
.highlight .na { color: #50fa7b } /* Name.Attribute */
|
.highlight .s { color: #f1fa8c } /* Literal.String */
|
||||||
.highlight .nb { color: #8be9fd; font-style: italic } /* Name.Builtin */
|
.highlight .na { color: #50fa7b } /* Name.Attribute */
|
||||||
.highlight .nc { color: #50fa7b } /* Name.Class */
|
.highlight .nb { color: #8be9fd; font-style: italic } /* Name.Builtin */
|
||||||
.highlight .no { color: #f8f8f2 } /* Name.Constant */
|
.highlight .nc { color: #50fa7b } /* Name.Class */
|
||||||
.highlight .nd { color: #f8f8f2 } /* Name.Decorator */
|
.highlight .no { color: #f8f8f2 } /* Name.Constant */
|
||||||
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
|
.highlight .nd { color: #f8f8f2 } /* Name.Decorator */
|
||||||
.highlight .ne { color: #f8f8f2 } /* Name.Exception */
|
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
|
||||||
.highlight .nf { color: #50fa7b } /* Name.Function */
|
.highlight .ne { color: #f8f8f2 } /* Name.Exception */
|
||||||
.highlight .nl { color: #8be9fd; font-style: italic } /* Name.Label */
|
.highlight .nf { color: #50fa7b } /* Name.Function */
|
||||||
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
|
.highlight .nl { color: #8be9fd; font-style: italic } /* Name.Label */
|
||||||
.highlight .nx { color: #f8f8f2 } /* Name.Other */
|
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
|
||||||
.highlight .py { color: #f8f8f2 } /* Name.Property */
|
.highlight .nx { color: #f8f8f2 } /* Name.Other */
|
||||||
.highlight .nt { color: #ff79c6 } /* Name.Tag */
|
.highlight .py { color: #f8f8f2 } /* Name.Property */
|
||||||
.highlight .nv { color: #8be9fd; font-style: italic } /* Name.Variable */
|
.highlight .nt { color: #ff79c6 } /* Name.Tag */
|
||||||
.highlight .ow { color: #ff79c6 } /* Operator.Word */
|
.highlight .nv { color: #8be9fd; font-style: italic } /* Name.Variable */
|
||||||
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
|
.highlight .ow { color: #ff79c6 } /* Operator.Word */
|
||||||
.highlight .mb { color: #bd93f9 } /* Literal.Number.Bin */
|
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
|
||||||
.highlight .mf { color: #bd93f9 } /* Literal.Number.Float */
|
.highlight .mb { color: #bd93f9 } /* Literal.Number.Bin */
|
||||||
.highlight .mh { color: #bd93f9 } /* Literal.Number.Hex */
|
.highlight .mf { color: #bd93f9 } /* Literal.Number.Float */
|
||||||
.highlight .mi { color: #bd93f9 } /* Literal.Number.Integer */
|
.highlight .mh { color: #bd93f9 } /* Literal.Number.Hex */
|
||||||
.highlight .mo { color: #bd93f9 } /* Literal.Number.Oct */
|
.highlight .mi { color: #bd93f9 } /* Literal.Number.Integer */
|
||||||
.highlight .sa { color: #f1fa8c } /* Literal.String.Affix */
|
.highlight .mo { color: #bd93f9 } /* Literal.Number.Oct */
|
||||||
.highlight .sb { color: #f1fa8c } /* Literal.String.Backtick */
|
.highlight .sa { color: #f1fa8c } /* Literal.String.Affix */
|
||||||
.highlight .sc { color: #f1fa8c } /* Literal.String.Char */
|
.highlight .sb { color: #f1fa8c } /* Literal.String.Backtick */
|
||||||
.highlight .dl { color: #f1fa8c } /* Literal.String.Delimiter */
|
.highlight .sc { color: #f1fa8c } /* Literal.String.Char */
|
||||||
.highlight .sd { color: #f1fa8c } /* Literal.String.Doc */
|
.highlight .dl { color: #f1fa8c } /* Literal.String.Delimiter */
|
||||||
.highlight .s2 { color: #f1fa8c } /* Literal.String.Double */
|
.highlight .sd { color: #f1fa8c } /* Literal.String.Doc */
|
||||||
.highlight .se { color: #f1fa8c } /* Literal.String.Escape */
|
.highlight .s2 { color: #f1fa8c } /* Literal.String.Double */
|
||||||
.highlight .sh { color: #f1fa8c } /* Literal.String.Heredoc */
|
.highlight .se { color: #f1fa8c } /* Literal.String.Escape */
|
||||||
.highlight .si { color: #f1fa8c } /* Literal.String.Interpol */
|
.highlight .sh { color: #f1fa8c } /* Literal.String.Heredoc */
|
||||||
.highlight .sx { color: #f1fa8c } /* Literal.String.Other */
|
.highlight .si { color: #f1fa8c } /* Literal.String.Interpol */
|
||||||
.highlight .sr { color: #f1fa8c } /* Literal.String.Regex */
|
.highlight .sx { color: #f1fa8c } /* Literal.String.Other */
|
||||||
.highlight .s1 { color: #f1fa8c } /* Literal.String.Single */
|
.highlight .sr { color: #f1fa8c } /* Literal.String.Regex */
|
||||||
.highlight .ss { color: #f1fa8c } /* Literal.String.Symbol */
|
.highlight .s1 { color: #f1fa8c } /* Literal.String.Single */
|
||||||
.highlight .bp { color: #f8f8f2; font-style: italic } /* Name.Builtin.Pseudo */
|
.highlight .ss { color: #f1fa8c } /* Literal.String.Symbol */
|
||||||
.highlight .fm { color: #50fa7b } /* Name.Function.Magic */
|
.highlight .bp { color: #f8f8f2; font-style: italic } /* Name.Builtin.Pseudo */
|
||||||
.highlight .vc { color: #8be9fd; font-style: italic } /* Name.Variable.Class */
|
.highlight .fm { color: #50fa7b } /* Name.Function.Magic */
|
||||||
.highlight .vg { color: #8be9fd; font-style: italic } /* Name.Variable.Global */
|
.highlight .vc { color: #8be9fd; font-style: italic } /* Name.Variable.Class */
|
||||||
.highlight .vi { color: #8be9fd; font-style: italic } /* Name.Variable.Instance */
|
.highlight .vg { color: #8be9fd; font-style: italic } /* Name.Variable.Global */
|
||||||
.highlight .vm { color: #8be9fd; font-style: italic } /* Name.Variable.Magic */
|
.highlight .vi { color: #8be9fd; font-style: italic } /* Name.Variable.Instance */
|
||||||
.highlight .il { color: #bd93f9 } /* Literal.Number.Integer.Long */
|
.highlight .vm { color: #8be9fd; font-style: italic } /* Name.Variable.Magic */
|
||||||
|
.highlight .il { color: #bd93f9 } /* Literal.Number.Integer.Long */
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.highlight .hl { background-color: #ffffd4 }
|
// .highlight .hl { background-color: #ffffd4 }
|
||||||
.highlight { background: $ht-code-bgcolor;}
|
// .highlight { background: $ht-code-bgcolor;}
|
||||||
|
.highlight .lnt { color: #6a737d } /* line number */
|
||||||
.highlight .c { color: #6a737d } /* Comment */
|
.highlight .c { color: #6a737d } /* Comment */
|
||||||
.highlight .err { } /* Error */
|
.highlight .err { } /* Error */
|
||||||
.highlight .k { color: #d73a49 } /* Keyword */
|
.highlight .k { color: #d73a49 } /* Keyword */
|
||||||
|
|
1
assets/scss/vendor/tufte.scss
vendored
1
assets/scss/vendor/tufte.scss
vendored
|
@ -347,6 +347,7 @@ h3 .code {
|
||||||
}
|
}
|
||||||
|
|
||||||
pre.code {
|
pre.code {
|
||||||
|
font-size: 0.9rem;
|
||||||
width: 52.5%;
|
width: 52.5%;
|
||||||
padding-left: 2.5%;
|
padding-left: 2.5%;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
|
Loading…
Reference in a new issue