mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 07:48:52 +00:00
Add styles for different languages in code blocks
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
<div class="code" id="{{.Get "file" | urlize}}">
|
||||
{{- with .Get "file" -}}
|
||||
<div class="filename">{{.}}</div>
|
||||
<div class="code-icon">
|
||||
<i class="icon-{{$icon}} input"></i>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{with .Get "download"}}
|
||||
<button class="download-button" title="Download "{{.}}".">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
font-weight: $code-font-base-weight;
|
||||
position: relative;
|
||||
overflow-y: visible;
|
||||
z-index:1;
|
||||
}
|
||||
pre > code,
|
||||
.code {
|
||||
@@ -49,11 +50,22 @@ code[class^="language-"] {
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
color: lighten($base-font-color, 25%);
|
||||
font-family:'fontello';
|
||||
font-family: 'fontello';
|
||||
content: '\f121';
|
||||
}
|
||||
}
|
||||
|
||||
.copy-button + .code-copy-content {
|
||||
code[class^="language-"] {
|
||||
&:after {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
code.language-html:after {
|
||||
font-family: 'FontAwesome';
|
||||
content: '\f13b';
|
||||
@@ -101,7 +113,7 @@ code.language-scss:after {
|
||||
transition: opacity .3s ease-in-out;
|
||||
opacity: 1;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
right: 1px;
|
||||
top: 1px;
|
||||
background-color: white;
|
||||
color: $base-font-color;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user