migrate bootstrap and flags to bundle
This commit is contained in:
parent
3957190425
commit
82feb539bd
532 changed files with 63 additions and 7630 deletions
|
@ -3,13 +3,10 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
|
||||
<!-- ============ import common css ========== -->
|
||||
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | relURL }}"/>
|
||||
{{ partial "helpers/style-bundle.html" . }}
|
||||
<link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/>
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
<link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/>
|
||||
{{ end }}
|
||||
<!--=================== fonts ==============================-->
|
||||
<link rel="stylesheet" href="{{ "/google-fonts/Mulish/mulish.css" | relURL }}"/>
|
||||
|
||||
|
|
5
layouts/partials/helpers/get-sass-options.html
Normal file
5
layouts/partials/helpers/get-sass-options.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{ return (dict
|
||||
"outputStyle" "compressed"
|
||||
"enableSourceMap" (not hugo.IsProduction)
|
||||
"includePaths" "node_modules"
|
||||
) }}
|
11
layouts/partials/helpers/style-bundle.html
Normal file
11
layouts/partials/helpers/style-bundle.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{/* setup Sass options */}}
|
||||
{{- $options := partial "helpers/get-sass-options.html" -}}
|
||||
{{- $options = $options | merge (dict "targetPath" "application.css") -}}
|
||||
|
||||
{{/* Compile hugo template `application.template.scss` into `application.scss`. */}}
|
||||
{{- $template := resources.Get "styles/application.template.scss" -}}
|
||||
{{- $scss := $template | resources.ExecuteAsTemplate "styles/application.scss" . -}}
|
||||
|
||||
{{/* Bundle application.scss */}}
|
||||
{{- $bundle := $scss | resources.ToCSS $options | fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" />
|
Loading…
Add table
Add a link
Reference in a new issue