mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 18:54:30 +01:00
docs: move search style to its own CSS file
This commit is contained in:
parent
d867ee08b9
commit
6922f5d9cb
@ -1,7 +1,5 @@
|
|||||||
// stylelint-disable selector-class-pattern
|
// stylelint-disable selector-class-pattern
|
||||||
|
|
||||||
@import "@docsearch/css/dist/style";
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--docsearch-primary-color: var(--bd-violet);
|
--docsearch-primary-color: var(--bd-violet);
|
||||||
--docsearch-logo-color: var(--bd-violet);
|
--docsearch-logo-color: var(--bd-violet);
|
||||||
|
@ -36,7 +36,6 @@ $enable-cssgrid: true;
|
|||||||
// Load docs components
|
// Load docs components
|
||||||
@import "variables";
|
@import "variables";
|
||||||
@import "navbar";
|
@import "navbar";
|
||||||
@import "search";
|
|
||||||
@import "masthead";
|
@import "masthead";
|
||||||
@import "ads";
|
@import "ads";
|
||||||
@import "content";
|
@import "content";
|
||||||
|
14
site/assets/scss/search.scss
Normal file
14
site/assets/scss/search.scss
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*!
|
||||||
|
* Bootstrap Docs (https://getbootstrap.com/)
|
||||||
|
* Copyright 2024 The Bootstrap Authors
|
||||||
|
* Licensed under the Creative Commons Attribution 3.0 Unported License.
|
||||||
|
* For details, see https://creativecommons.org/licenses/by/3.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import "../../../scss/functions";
|
||||||
|
@import "../../../scss/variables";
|
||||||
|
@import "../../../scss/mixins";
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
|
@import "@docsearch/css/dist/style";
|
||||||
|
@import "search";
|
@ -9,15 +9,19 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (ne .Page.Layout "examples") }}
|
{{- if (ne .Page.Layout "examples") }}
|
||||||
{{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}}
|
{{- $sassOptions := dict "outputStyle" "expanded" "precision" 6 -}}
|
||||||
{{- $sassOptions := dict "targetPath" $targetDocsCssPath "outputStyle" "expanded" "precision" 6 -}}
|
|
||||||
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
|
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
|
||||||
|
|
||||||
|
{{- $targetDocsCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/docs.css" -}}
|
||||||
|
{{- $targetSearchCssPath := path.Join "/docs" .Site.Params.docs_version "assets/css/search.css" -}}
|
||||||
|
|
||||||
{{ if hugo.IsProduction -}}
|
{{ if hugo.IsProduction -}}
|
||||||
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
|
{{- $sassOptions = merge $sassOptions (dict "outputStyle" "compressed") -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $style := resources.Get "scss/docs.scss" | toCSS $sassOptions | postCSS $postcssOptions }}
|
{{- $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 -}}
|
||||||
|
|
||||||
<link href="{{ $style.RelPermalink }}" rel="stylesheet">
|
<link href="{{ $docsCss.RelPermalink }}" rel="stylesheet">
|
||||||
|
<link href="{{ $searchCss.RelPermalink }}" rel="stylesheet">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user