mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-02-07 06:19:03 +00:00
Unstyle internal site links globally
This commit is contained in:
parent
1eb8a3b600
commit
8d6e0797b5
15
assets/templates/site.scss
Normal file
15
assets/templates/site.scss
Normal file
@ -0,0 +1,15 @@
|
||||
{{/*
|
||||
This is a site-specific styling that have to be generated.
|
||||
*/}}
|
||||
|
||||
/* Internal links are not to be styled. */
|
||||
{{- $baseURL := urls.Parse $.Site.BaseURL }}
|
||||
a[href]:where(
|
||||
a[href^="http://{{- $baseURL.Host -}}"],
|
||||
a[href^="https://{{- $baseURL.Host -}}"],
|
||||
a[href$="{{- $baseURL.Host -}}"],
|
||||
a[href$="{{- $baseURL.Host -}}/"],
|
||||
a[href^="{{- $.Site.BaseURL -}}"],
|
||||
)::after {
|
||||
content: unset;
|
||||
}
|
@ -6,11 +6,11 @@
|
||||
{{- $main := resources.Get "scss/main.scss" | resources.ToCSS }}
|
||||
|
||||
{{- /* Combine all of the custom schems in under one stylesheet */ -}}
|
||||
{{ $scheme_template := resources.Get "templates/theme.scss" }}
|
||||
{{- $themes := $scheme_template | resources.ExecuteAsTemplate "css/themes.css" . | resources.ToCSS }}
|
||||
{{- $themes := resources.Get "templates/theme.scss" | resources.ExecuteAsTemplate "css/themes.css" . | resources.ToCSS }}
|
||||
{{- $siteSpecificTheme := resources.Get "templates/site.scss" | resources.ExecuteAsTemplate "css/site.css" . | resources.ToCSS }}
|
||||
|
||||
{{- /* Append the main stylesheet to be the last so the resulting stylesheet will make the custom colorschemes at the front. */ -}}
|
||||
{{ $stylesheets = $stylesheets | append $themes $main }}
|
||||
{{ $stylesheets = $stylesheets | append $themes $main $siteSpecificTheme }}
|
||||
|
||||
{{ $style := $stylesheets | resources.Concat "css/main.css" }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user