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

github.com/brycematheson/allegiant.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Pitman <mark@pitman.bz>2015-06-26 09:05:57 +0300
committerMark Pitman <mark@pitman.bz>2015-06-26 09:05:57 +0300
commite1efac013b317598548367c40cdb57e101c3322a (patch)
tree1d82034aea375d898db175a60532915afe2e7cfd
parentff7b17393a8da8919c435fd6414b0260a00a7baf (diff)
added ability to change the top image for each post
just add an "image" parameter in the front matter of your post
-rw-r--r--layouts/partials/header.html2
-rw-r--r--static/css/main.css2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 8546a94..73c6011 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -41,7 +41,7 @@
{{ end }}
</head>
<body>
- <header class="global-header">
+ <header class="global-header" style="background-image:url({{ if isset .Params "image" }}{{ .Params.image }} {{ else }} /images/bg.jpg {{ end }})">
<section class="header-text">
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
{{ with .Site.Params.subtitle }}
diff --git a/static/css/main.css b/static/css/main.css
index 2b2b8a7..f470408 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -6,7 +6,7 @@ main {
/* Header */
.global-header {
- background-image: url(/images/bg.jpg);
+ background: #222 no-repeat center center;
background-size: cover;
}