Browse Source

Code highlighting tweaks and implementing proper captions.

main
Jo Jerrica Decker 2 years ago
parent
commit
b38ae460c2
  1. 6
      assets/scss/hyde-hyde/_base.scss
  2. 3
      assets/scss/hyde-hyde/_code.scss
  3. 8
      layouts/_default/_markup/render-image.html

6
assets/scss/hyde-hyde/_base.scss

@ -138,3 +138,9 @@ a {
padding-bottom: 2rem; padding-bottom: 2rem;
padding-top: 2rem; padding-top: 2rem;
} }
figcaption {
margin-top: -1em;
font-size: 0.8em;
font-style: italic;
}

3
assets/scss/hyde-hyde/_code.scss

@ -6,7 +6,7 @@ pre {
//margin-left: -11%; //margin-left: -11%;
//padding-left: 9%; //padding-left: 9%;
//padding-right: 2%; //padding-right: 2%;
//background: #29292e; background: #defac3;
code { code {
white-space: pre-wrap; white-space: pre-wrap;
} }
@ -45,6 +45,7 @@ a {
code { code {
@extend %code-font; @extend %code-font;
@extend %code-style-npf; @extend %code-style-npf;
background-color: #defac3;
} }
// highlight.js // highlight.js

8
layouts/_default/_markup/render-image.html

@ -0,0 +1,8 @@
{{ if .Title }}
<figure>
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}">
<figcaption>{{ .Title }}</figcaption>
</figure>
{{ else }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}">
{{ end }}
Loading…
Cancel
Save