mirror of
https://github.com/loikein/hugo-tufte.git
synced 2025-08-16 23:12:45 +02:00
Improve code blocks styling (#13)
* add highlight config for code highlighter * add default pygment css "github" * fix styles for code blocks * remove dead html from margin note *These don't appear to do anything? * Fix scrolling in code block * More CSS fixes for code blocks * ignore generated scss files. Probably other generated files too * Use scss to generate more powerful styles for code blocks * Document new code blocks style option Improve code blocks styling
This commit is contained in:
parent
835a8701f8
commit
ba23674640
11 changed files with 311 additions and 124 deletions
layouts/partials
|
@ -16,9 +16,26 @@
|
|||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
|
||||
<script defer src="{{ "/js/main.js" | relURL }}"></script>
|
||||
<!-- Main CSS file based on Pure blog layout -->
|
||||
<link rel="stylesheet" href="{{ "/css/tufte.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "/css/syntax.css" | relURL }}">
|
||||
|
||||
<!-- Main CSS file based on Pure blog layout -->
|
||||
{{ if .Site.Params.codeBlocksDark }}
|
||||
{{ $codeoptions := (dict "targetPath" "/css/highlight-dark.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
|
||||
|
||||
<link rel="stylesheet" href="{{ $style.Permalink | relURL }}">
|
||||
{{ else }}
|
||||
{{ $codeoptions := (dict "targetPath" "/css/highlight-light.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $codestyle := resources.Get "scss/highlight-light.scss" | resources.ToCSS $codeoptions }}
|
||||
|
||||
<link rel="stylesheet" href="{{ $codestyle.Permalink | relURL }}">
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/tufte.css" | relURL }}">
|
||||
|
||||
{{ $htoptions := (dict "targetPath" "/css/hugo-tufte.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $htstyle := resources.Get "scss/hugo-tufte.scss" | resources.ToCSS $htoptions }}
|
||||
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue