fix lack of baseurl being applied to background-image url.
parent
9c4260d49e
commit
328149ed51
|
@ -1,5 +1,6 @@
|
||||||
<!-- Configurable Styles partial to appear in head -->
|
<!-- Configurable Styles partial to appear in head -->
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
{{ with .Site.Params.font }}
|
{{ with .Site.Params.font }}
|
||||||
body { font-family:{{ . }},Helvetica,Arial,sans-serif; }
|
body { font-family:{{ . }},Helvetica,Arial,sans-serif; }
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -46,12 +47,14 @@
|
||||||
|
|
||||||
{{ with .hero }}
|
{{ with .hero }}
|
||||||
|
|
||||||
{{ with .img }}
|
{{ with $.Site.Params.imagespath }}
|
||||||
{{ with $.Site.Params.imagespath }} {{ $.Scratch.Set "path" ( . ) }} {{ else }}{{ $.Scratch.Set "path" "/images/" }}{{ end }}
|
{{ $.Scratch.Set "path" ( . ) }}
|
||||||
#hero {
|
{{ else }}
|
||||||
background-image: url("{{ $.Scratch.Get "path" }}{{ . }}");
|
{{ $.Scratch.Set "path" ( printf "%s/images/" ( $.Site.BaseURL | default "" ) ) }}
|
||||||
}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
#hero {
|
||||||
|
background-image: url("{{ $.Scratch.Get "path" }}{{ .img | default "hero.jpg" }}");
|
||||||
|
}
|
||||||
|
|
||||||
{{ with .font }}
|
{{ with .font }}
|
||||||
#hero > .section__container { font-family:{{ . }},Helvetica,Arial,sans-serif;}
|
#hero > .section__container { font-family:{{ . }},Helvetica,Arial,sans-serif;}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
### TL;DR
|
### TL;DR
|
||||||
|
|
||||||
For those who are Hugo experienced and know what they are doing and are able to “figure out” the details simply clone the [guide repo](https://dkebler.github.io/landingpage-guide). Edit the markdown files in the /sections directory and settings in config.toml. To start from scratch by all means just clone (or submodule) this theme into an existing hugo project’s themes folder. If you need to cheat and see ths guide it's [here](https://dkebler.github.io/landingpage-guide/#tldr)
|
For those who are Hugo experienced and know what they are doing and are able to “figure out” the details simply clone the [guide repo](https://github.com/dkebler/landingpage-guide). Edit the markdown files in the /sections directory and settings in config.toml. To start from scratch by all means just clone (or submodule) this theme into an existing hugo project’s themes folder. If you need to cheat and see ths guide it's [here](https://dkebler.github.io/landingpage-guide/#tldr)
|
||||||
|
|
||||||
### About
|
### About
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,6 @@
|
||||||
Hero Section
|
Hero Section
|
||||||
---------------- */
|
---------------- */
|
||||||
#hero {
|
#hero {
|
||||||
background-image: url("/images/hero.jpg");
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
Loading…
Reference in New Issue