diff options
author | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2019-07-14 09:03:10 +0300 |
---|---|---|
committer | Thibaud Lepretre <thibaud.lepretre@gmail.com> | 2021-08-11 15:01:09 +0300 |
commit | c73fe29e5e58fcd1bb1dfe52b08a4423e8f08d3a (patch) | |
tree | 7b1304a33fece2725d76844fc6f27c77a8bd00cd /layouts | |
parent | cbd8ce77cbe0619e013ba920b75f90521c6d1850 (diff) |
Add missing class without language- prefix
```html
<figure class="language-js ..." ...>
````
must become
```html
<figure class="language-js js ..." ...>
```
In addition fix padding to get the same pixel alignment for gutter and sourcecode
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/codeblock.html | 6 | ||||
-rw-r--r-- | layouts/shortcodes/tabbed-codeblock.html | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index fab7ba9..a0b109b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -45,7 +45,7 @@ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" /> <!--EXTERNAL STYLES END--> <!--STYLES--> - <link rel="stylesheet" href="{{ "css/style-twzjdbqhmnnacqs0pwwdzcdbt8yhv8giawvjqjmyfoqnvazl0dalmnhdkvp7.min.css" | absURL}}" /> + <link rel="stylesheet" href="/css/style-wik7mbcbqrkh23wgvlthjshwgzac8yaqzlrnqy5qqytc9midmzj3trvo2.min.css" /> <!--STYLES END--> {{ range .Site.Params.customCSS }} {{ if isset . "href" }} diff --git a/layouts/shortcodes/codeblock.html b/layouts/shortcodes/codeblock.html index 95fa365..098c933 100644 --- a/layouts/shortcodes/codeblock.html +++ b/layouts/shortcodes/codeblock.html @@ -18,7 +18,7 @@ {{ end }} {{ end }} {{ $trimmedContent := trim .Inner "\n" }} -<figure class="highlight {{ $.Scratch.Get "c-language" }} language-{{ with ($.Scratch.Get "c-language") }}{{ . }}{{ end }}"> +<figure class="highlight {{ $.Scratch.Get "c-language" }} language-{{ $.Scratch.Get "c-language" }}"> <figcaption> {{ if and ($.Scratch.Get "c-url") ($.Scratch.Get "c-title") }} <span>{{ $.Scratch.Get "c-title" }}</span><a href="{{ ($.Scratch.Get "c-url") | safeURL }}" target="_blank" rel="external">{{ $.Scratch.Get "c-link-text" | default ($.Scratch.Get "c-title") }}</a> @@ -33,9 +33,9 @@ <pre>{{ range $index,$value := (split $trimmedContent "\n") }}<span class="line">{{ add $index 1 }}</span><br>{{ end }}</pre> </td> <td class="code"> - <pre class="code-highlight language-{{ $.Scratch.Get "c-language" }}"><code class="{{ $.Scratch.Get "c-language" }}">{{ $trimmedContent }}</code></pre> + <pre class="code-highlight language-{{ $.Scratch.Get "c-language" }} {{ $.Scratch.Get "c-language" }}"><code class="{{ $.Scratch.Get "c-language" }}">{{ $trimmedContent }}</code></pre> </td> </tr> </tbody> </table> -</figure>
\ No newline at end of file +</figure> diff --git a/layouts/shortcodes/tabbed-codeblock.html b/layouts/shortcodes/tabbed-codeblock.html index 8e27ee3..e59bf63 100644 --- a/layouts/shortcodes/tabbed-codeblock.html +++ b/layouts/shortcodes/tabbed-codeblock.html @@ -29,11 +29,11 @@ <li class="tab {{ if eq $index 0 }}active{{ end }}">{{ . }}</li> {{ end }} </ul> - </figcaption> + </figcaption> <div class="tabs-content"> {{ range $index, $value := $.Scratch.Get "tc-content" }} {{ $trimmedContent := trim $value "\n" }} - <figure class="highlight language-{{ index ($.Scratch.Get "tc-languages") $index }}" style="display: {{ if eq $index 0 }}block{{ else }}none{{ end }};"> + <figure class="highlight language-{{ index ($.Scratch.Get "tc-languages") $index }} {{ index ($.Scratch.Get "tc-languages") $index }}" style="display: {{ if eq $index 0 }}block{{ else }}none{{ end }};"> <table> <tbody> <tr> @@ -41,7 +41,7 @@ <pre>{{ range $index,$value := (split $trimmedContent "\n") }}<span>{{ add $index 1 }}</span><br>{{ end }}</pre> </td> <td class="code"> - <pre class="code-highlight language-{{ index ($.Scratch.Get "tc-languages") $index }}"><code class="{{ index ($.Scratch.Get "tc-languages") $index }}">{{ $trimmedContent }}</code></pre> + <pre class="code-highlight language-{{ index ($.Scratch.Get "tc-languages") $index }} {{ index ($.Scratch.Get "tc-languages") $index }}"><code class="{{ index ($.Scratch.Get "tc-languages") $index }}">{{ $trimmedContent }}</code></pre> </td> </tr> </tbody> @@ -49,4 +49,4 @@ </figure> {{ end }} </div> -</figure>
\ No newline at end of file +</figure> |