brainbaking/themes/brainbaking-minimal/layouts/partials/bigimg.html

36 lines
809 B
HTML
Raw Normal View History

{{ if .Params.bigimg }}
2020-06-02 16:35:19 +02:00
{{- $image := resources.Get (printf "%s%s" "bigimg/" .Params.bigimg ) -}}
{{ if eq $image nil }}
<div style="padding-top: 3rem">
</div>
2020-06-02 16:35:19 +02:00
{{ else }}
{{- $imgsmall := $image.Resize "768x jpg q70" }}
{{- $imgmedium := $image.Resize "960x jpg q85" }}
<style>
.big-img {
background-image: url({{ $imgsmall.RelPermalink }});
}
@media (min-width: 768px) {
.big-img {
background-image: url({{ $imgmedium.RelPermalink }});
}
}
@media (min-width: 960px) {
.big-img {
background-image: url({{ $image.RelPermalink }});
}
}
</style>
<div class="jumbotron big-img">
<div class="container">
&nbsp;
</div>
</div>
{{ end }}
{{ else }}
<div style="padding-top: 3rem">
</div>
{{ end }}