mirror of
https://github.com/gesquive/slate.git
synced 2024-12-04 21:20:37 +01:00
move background definitions to site config file
This commit is contained in:
parent
1edc87c441
commit
0e878f04b2
@ -1,22 +1,17 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>slate</title>
|
<title>{{ .Title }}</title>
|
||||||
<link rel="stylesheet" href="css/slate.css">
|
<link rel="stylesheet" href="css/slate.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body{{ if .Site.Params.BackgroundStyle }} style='{{ .Site.Params.BackgroundStyle | safeCSS }}'{{ end }}
|
||||||
|
{{- if .Site.Params.BackgroundImages }} data-backgrounds='{{ range .Site.Params.BackgroundImages }}{{ . }},{{ end }}'{{- end }}>
|
||||||
|
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
|
|
||||||
<div class="container">{{ partial "tile_slate.html" . }}
|
<div class="container">{{ partial "tile_slate.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Site.Data.page.backgrounds -}}
|
|
||||||
<background data-backgrounds='{{ range .Site.Data.page.backgrounds }}
|
|
||||||
{{ . }},{{ end }}
|
|
||||||
'>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Exo" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Exo" rel="stylesheet">
|
||||||
<script src="js/slate.js"></script>
|
<script src="js/slate.js"></script>
|
||||||
|
@ -262,7 +262,7 @@ var renderTiles = function() {
|
|||||||
renderTiles();
|
renderTiles();
|
||||||
|
|
||||||
var getBackgroundImages = function() {
|
var getBackgroundImages = function() {
|
||||||
var backgrounds = document.getElementsByTagName("background");
|
var backgrounds = document.getElementsByTagName("body");
|
||||||
var images = [];
|
var images = [];
|
||||||
if (backgrounds.length > 0) {
|
if (backgrounds.length > 0) {
|
||||||
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
||||||
|
@ -3463,7 +3463,7 @@ var renderTiles = function() {
|
|||||||
renderTiles();
|
renderTiles();
|
||||||
|
|
||||||
var getBackgroundImages = function() {
|
var getBackgroundImages = function() {
|
||||||
var backgrounds = document.getElementsByTagName("background");
|
var backgrounds = document.getElementsByTagName("body");
|
||||||
var images = [];
|
var images = [];
|
||||||
if (backgrounds.length > 0) {
|
if (backgrounds.length > 0) {
|
||||||
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
var imgString = backgrounds[0].getAttribute("data-backgrounds");
|
||||||
|
Loading…
Reference in New Issue
Block a user