forked from mirrors/hugo-theme-terminal
Webpack -> Hugo Pipes
This commit is contained in:
@ -2,11 +2,11 @@
|
||||
<html lang="{{ $.Site.Language }}">
|
||||
<head>
|
||||
{{ block "title" . }}
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}{{ end }}</title>
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }}</title>
|
||||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="">
|
||||
<body class="{{- ( or .Params.color $.Site.Params.ThemeColor ) -}}">
|
||||
{{ $container := cond $.Site.Params.FullWidthTheme "container full" (cond $.Site.Params.CenterTheme "container center" "container") }}
|
||||
|
||||
<div class="{{- $container -}}{{- cond ($.Site.Params.oneHeadingSize | default true) " headings--one-size" "" }}">
|
||||
|
@ -24,7 +24,7 @@
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">::{{ . }}</span>
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
</span>
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">::{{ . }}</span>
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
@ -9,9 +9,7 @@
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ with .Params.Author }}
|
||||
<span class="post-author">::
|
||||
{{ . }}
|
||||
</span>
|
||||
<span class="post-author">:: {{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
|
@ -12,8 +12,13 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||
{{ $js := resources.Get "js/main.js" | js.Build }}
|
||||
{{ $js := resources.Get "js/prism.js" | js.Build }}
|
||||
{{ $opts := dict "noComments" true "minified" true "compact" true }}
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build | babel $opts }}
|
||||
{{ $prism := resources.Get "js/prism.js" | js.Build | babel $opts }}
|
||||
<script src="{{ $menu.Permalink }}"></script>
|
||||
<script src="{{ $prism.Permalink }}"></script>
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
|
@ -8,11 +8,15 @@
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}">
|
||||
{{ if (isset .Params "color") }}
|
||||
<link rel="stylesheet" href="{{ (printf "assets/%s.css" .Params.color) | absURL }}">
|
||||
{{ else if (ne $.Site.Params.ThemeColor "orange") }}
|
||||
<link rel="stylesheet" href="{{ (printf "assets/%s.css" $.Site.Params.ThemeColor) | absURL }}">
|
||||
{{ $css := resources.Get "css/style.css" }}
|
||||
{{ $opts := dict "inlineImports" true }}
|
||||
{{ $style := $css | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{ if (or (isset .Params "color") (ne $.Site.Params.ThemeColor "orange")) }}
|
||||
{{ $colorCss := resources.Get (printf "css/color/%s.css" (or .Params.color $.Site.Params.ThemeColor)) }}
|
||||
{{ $color := $colorCss | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $color.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
|
Reference in New Issue
Block a user