Better codes in details

This commit is contained in:
Thomas Dehaeze 2020-11-26 13:42:06 +01:00
parent 8a852c1147
commit 712e1ebaf6
2 changed files with 40 additions and 42 deletions

View File

@ -1,26 +1,32 @@
.org-src-container {
@mixin src-box {
display: inline;
position: absolute;
color: #808080;
background-color: white;
padding: 0px 4px;
border: 1px solid #d0d0d0;
font-size:10px;
top: -9px;
z-index: 10;
font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;
}
// Div that containst the code
.org-src-container {
position: relative;
overflow: visible;
margin-top: 1em;
// Copy Button
div.src-copy {
font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;
font-size:10px;
@include src-box;
line-height:1.5;
position: absolute;
color: #808080;
background-color: white;
top: -8px;
right: 10px;
padding: 0px 4px;
border: 1px solid #d0d0d0;
z-index: 10;
border-radius: 3px;
cursor: pointer;
}
// Code Block
> pre {
margin-top: 1.5em;
position: relative;
overflow: visible;
border:1px solid #e1e4e5;
@ -29,35 +35,29 @@
font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;
font-size:12px;
line-height:1.5;
margin:1px 0px 24px 0px;
padding:12px;
white-space:pre;
margin-bottom: 24px;
white-space: pre-wrap; // Wrap long Line
// Box containing language Names
&.src:before {
display: inline;
position: absolute;
color: #808080;
background-color: white;
top: -10px;
@include src-box;
left: 10px;
padding: 0px 4px;
border: 1px solid #d0d0d0;
font-size: 80%;
}
// Languages Names
&.src-emacs-lisp:before { content: 'Emacs Lisp'; }
&.src-elisp:before { content: 'Emacs Lisp'; }
&.src-sh:before { content: 'shell'; }
&.src-bash:before { content: 'bash'; }
&.src-org:before { content: 'Org mode'; }
&.src-python:before { content: 'Python'; }
&.src-matlab:before { content: 'Matlab'; }
&.src-elisp:before { content: 'Emacs Lisp'; }
&.src-sh:before { content: 'shell'; }
&.src-bash:before { content: 'bash'; }
&.src-org:before { content: 'Org mode'; }
&.src-python:before { content: 'Python'; }
&.src-latex:before { content: 'LaTeX'; }
&.src-matlab:before { content: 'Matlab'; }
}
}
/* Results blocks */
// Results blocks
pre {
&.example {
position: relative;
@ -68,21 +68,20 @@ pre {
line-height: 1.5;
margin-bottom:24px;
padding:12px;
//
&:before {
content: 'Result';
@include src-box;
content: "Results";
display: inline;
position: absolute;
color: #808080;
background-color: white;
top: -10px;
left: 10px;
padding: 0px 4px;
border: 1px solid #d0d0d0;
font-size: 80%;
}
}
}
.org-type {
color: #228b22;
}

View File

@ -6,9 +6,8 @@ details {
margin-bottom: 1.0em;
pre.src {
border: 0;
background: none;
margin: 0;
margin-top: 12px;
margin-bottom: 0;
}
}