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

github.com/chipsenkbeil/grid-side.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Senkbeil <chip.senkbeil@gmail.com>2015-08-24 04:30:22 +0300
committerChip Senkbeil <chip.senkbeil@gmail.com>2015-08-24 04:30:22 +0300
commit13f0bf0224f2fa4095f7d8676815f73c88ab9a98 (patch)
treec6203c8d2653f789ea7fdbd0a7c7b3100fa48426
parente33295ec0c28979f9aaacafdea00b854b50e3c21 (diff)
Refactored background image related stylings to CSS class
-rw-r--r--layouts/partials/cell.html9
-rw-r--r--layouts/partials/header-scrolling.html4
-rw-r--r--static/css/main.css6
3 files changed, 13 insertions, 6 deletions
diff --git a/layouts/partials/cell.html b/layouts/partials/cell.html
index 3f26107..6c8093d 100644
--- a/layouts/partials/cell.html
+++ b/layouts/partials/cell.html
@@ -3,17 +3,18 @@
s{{ with .Size.small }}{{ . }}{{ else }}12{{ end }}
m{{ with .Size.medium }}{{ . }}{{ else }}6{{ end }}
l{{ with .Size.large }}{{ . }}{{ else }}4{{ end }}
+ no-padding
+ {{ if .image }}fullsize-background-image{{ end }}
" style="
- padding: 0px;
-
{{ with .image }}
background-image: url({{ . }});
- background-size: cover;
- background-repeat: no-repeat;
{{ else }}
background-color: {{ .color }};
{{ end }}
+ {{ with .image_position }}
+`
+
height: {{ with .height }}
{{ . }}
{{ else }}
diff --git a/layouts/partials/header-scrolling.html b/layouts/partials/header-scrolling.html
index d8d0e2a..1314e7c 100644
--- a/layouts/partials/header-scrolling.html
+++ b/layouts/partials/header-scrolling.html
@@ -3,9 +3,9 @@
<div class="parallax__layer parallax__layer--base">
{{ partial "header-logo.html" . }}
</div>
- <div class="parallax__layer parallax__layer--back"
+ <div class="parallax__layer parallax__layer--back {{ if .image }}fullsize-background-image{{ end }}"
{{ if .image }}
- style="background-image: url('{{ .image }}'); background-size: cover; background-repeat: no-repeat;"
+ style="background-image: url('{{ .image }}'); {{ with .image_position }}background-position: {{ . }};{{ end }}"
{{ else }}
style="background-color: {{ .color }}"
{{ end }}
diff --git a/static/css/main.css b/static/css/main.css
index ce48737..ba30067 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -173,6 +173,12 @@ ul.tags li a {
color: #BDBDBD;
}
+.fullsize-background-image {
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-attachment: scroll;
+}
+
/* ========================================================================= */
/* = PARALLAX */
/* ========================================================================= */