2024-03-08 18:41:17 +08:00
|
|
|
{{ if hugo.IsProduction -}}
|
2020-06-09 21:44:20 +08:00
|
|
|
{{ if eq .Page.Params.direction "rtl" -}}
|
2023-08-22 20:19:51 +08:00
|
|
|
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.rtl.min.css" rel="stylesheet" {{ printf "integrity=%q" .Site.Params.cdn.css_rtl_hash | safeHTMLAttr }}>
|
2020-06-09 21:44:20 +08:00
|
|
|
{{- else -}}
|
2023-08-22 20:19:51 +08:00
|
|
|
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap.min.css" rel="stylesheet" {{ printf "integrity=%q" .Site.Params.cdn.css_hash | safeHTMLAttr }}>
|
2020-06-09 21:44:20 +08:00
|
|
|
{{- end -}}
|
2019-01-09 00:33:28 +08:00
|
|
|
{{- else -}}
|
2020-06-09 21:44:20 +08:00
|
|
|
<link href="/docs/{{ .Site.Params.docs_version }}/dist/css/bootstrap{{ if eq .Page.Params.direction "rtl" }}.rtl{{ end }}.css" rel="stylesheet">
|
2019-01-09 00:33:28 +08:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- if (ne .Page.Layout "examples") }}
|
2024-03-08 18:55:18 +08:00
|
|
|
{{- $sassOptions := dict "outputStyle" "expanded" "precision" 6 -}}
|
2019-09-17 05:22:49 +08:00
|
|
|
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
|
|
|
|
|
2024-03-08 18:55:18 +08:00
|
|
|
{{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}}
|
|
|
|
{{- $targetSearchCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/search.css" -}}
|
|
|
|
|
2024-03-08 18:41:17 +08:00
|
|
|
{{ if hugo.IsProduction -}}
|
2019-09-17 05:22:49 +08:00
|
|
|
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
2024-03-08 18:55:18 +08:00
|
|
|
{{- $docsCss := resources.Get "scss/docs.scss" | toCSS (merge (dict "targetPath" $targetDocsCssPath) $sassOptions) | postCSS $postcssOptions -}}
|
|
|
|
{{- $searchCss := resources.Get "scss/search.scss" | toCSS (merge (dict "targetPath" $targetSearchCssPath) $sassOptions) | postCSS $postcssOptions -}}
|
2019-09-17 05:22:49 +08:00
|
|
|
|
2024-03-08 18:55:18 +08:00
|
|
|
<link href="{{ $docsCss.RelPermalink }}" rel="stylesheet">
|
|
|
|
<link href="{{ $searchCss.RelPermalink }}" rel="stylesheet">
|
2019-01-09 00:33:28 +08:00
|
|
|
{{- end }}
|