mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-13 02:05:28 -04:00
absolute URLs in CSS via hugo variable
This commit is contained in:
@@ -19,8 +19,8 @@
|
|||||||
font-style: $style;
|
font-style: $style;
|
||||||
font-weight: $weight;
|
font-weight: $weight;
|
||||||
font-display: $display;
|
font-display: $display;
|
||||||
src: url("#{$src}.woff2") format("woff2"),
|
src: url($base-url + $src + ".woff2") format("woff2"),
|
||||||
url("#{$src}.woff") format("woff"); // stylelint-disable-line indentation
|
url($base-url + $src + ".woff") format("woff"); // stylelint-disable-line indentation
|
||||||
|
|
||||||
// Allow additional declarations to be passed in:
|
// Allow additional declarations to be passed in:
|
||||||
@content;
|
@content;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// all variables set by Hugo's config.toml must go here
|
// all variables set by Hugo's config.toml must go here
|
||||||
// stylelint-disable
|
// stylelint-disable
|
||||||
$max-width: {{ printf "%d%s" .Site.Params.pageMaxWidth "px" }};
|
$max-width: {{ printf "%d%s" .Site.Params.pageMaxWidth "px" }};
|
||||||
|
$base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}/"; // consistent trailing forward slash
|
||||||
// stylelint-enable
|
// stylelint-enable
|
||||||
|
|
||||||
// Variables & Functions
|
// Variables & Functions
|
||||||
|
|||||||
Reference in New Issue
Block a user