Welcome to mirror list, hosted at ThFree Co, Russian Federation.

head_styles.html « partials « layouts - github.com/adityatelange/hugo-PaperMod.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f55d53ded8bfba56d49bd6faf15a89634d505153 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{{- /* Styles */}}
{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
{{- $reset := (resources.Get "css/core/reset.css") }}
{{- $media := (resources.Get "css/core/zmedia.css") }}
{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}

{{- /* includes */}}
{{- $includes := slice }}
{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}}

{{- if not (.Site.Params.assets.disableHLJS) }}
    {{- $hljs := (resources.Get "css/includes/an-old-hope.min.css") }}
    {{- $includes = (append $hljs $includes) }}
{{- end }}

{{- if .Site.Params.features.search }}
    {{- $search := (resources.Get "css/includes/search.css") }}
    {{- $includes = (append $search $includes) }}
{{- end }}

{{- if .Site.Params.profileMode.enabled }}
    {{- $profileMode := (resources.Get "css/includes/profile-mode.css") }}
    {{- $includes = (append $profileMode $includes) }}
{{- end }}

{{- if not (eq .Site.Params.features.ShowCodeCopyButtons false) }}
    {{- $ShowCodeCopyButtons := (resources.Get "css/includes/show-code-copy-buttons.css") }}
    {{- $includes = (append $ShowCodeCopyButtons $includes) }}
{{- end }}

{{- if not (eq .Site.Params.features.ShowPostNavLinks false) }}
    {{- $ShowPostNavLinks := (resources.Get "css/includes/show-post-nav-links.css") }}
    {{- $includes = (append $ShowPostNavLinks $includes) }}
{{- end }}

{{- if not (eq .Site.Params.features.ShowShareButtons false) }}
    {{- $ShowShareButtons := (resources.Get "css/includes/show-share-buttons.css") }}
    {{- $includes = (append $ShowShareButtons $includes) }}
{{- end }}

{{- if not (eq .Site.Params.features.disableAnchoredHeadings true) }}
    {{- $AnchoredHeadings := (resources.Get "css/includes/anchored-headings.css") }}
    {{- $includes = (append $AnchoredHeadings $includes) }}
{{- end }}

{{- if not (eq .Site.Params.features.disableScrollStyle true) }}
    {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }}
    {{- $includes = (append $ScrollStyle $includes) }}
{{- end }}

{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }}

{{- /* order is important */}}
{{- $core := (slice $theme_vars $reset $common $includes_all $media) | resources.Concat "assets/css/core.css" }}
{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }}

{{- /* bundle all required css */}}
{{- /* Add extended css after theme style */ -}}
{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}

{{- if not .Site.Params.assets.disableFingerprinting }}
{{- $stylesheet := $stylesheet | fingerprint }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
{{- else }}
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
{{- end }}