Conditional CSS

This commit is contained in:
Caio Lente 2023-10-27 19:30:53 -03:00
parent 95746b151d
commit a3f09559e4
No known key found for this signature in database
GPG key ID: E66D381776EFC03A
4 changed files with 19 additions and 2 deletions

View file

@ -14,8 +14,10 @@
{{ $style := resources.Get "style.css" | minify }}
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
{{ $syntax := resources.Get "syntax.css" | minify }}
<link href="{{ $syntax.RelPermalink }}" rel="stylesheet">
{{ if (.Page.Store.Get "hasCodeBlock") }}
{{ $syntax := resources.Get "syntax.css" | minify }}
<link href="{{ $syntax.RelPermalink }}" rel="stylesheet">
{{ end }}
{{ with .Params.style }}
{{ $extra := resources.Get . | minify }}