diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-27 13:03:56 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-27 13:03:56 +0200 |
| commit | 0f9a69bb83882c45d67b901bf9d897d7fd35eb2f (patch) | |
| tree | c47e10e85663893f931d1a6d8476de35369764f0 /themes | |
| parent | 66725af0f80fd8fbff29d553c6f20054409ab0c0 (diff) | |
| download | pragblog-0f9a69bb83882c45d67b901bf9d897d7fd35eb2f.tar.gz pragblog-0f9a69bb83882c45d67b901bf9d897d7fd35eb2f.zip | |
rework images and background
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/flog/layouts/_default/single.html | 5 | ||||
| -rw-r--r-- | themes/flog/layouts/partials/footer.html | 9 | ||||
| -rw-r--r-- | themes/flog/layouts/partials/header.html | 2 | ||||
| -rw-r--r-- | themes/flog/layouts/partials/listing.html | 3 |
4 files changed, 7 insertions, 12 deletions
diff --git a/themes/flog/layouts/_default/single.html b/themes/flog/layouts/_default/single.html index 330c6fd..e6be8ee 100644 --- a/themes/flog/layouts/_default/single.html +++ b/themes/flog/layouts/_default/single.html @@ -1,7 +1,11 @@ {{ partial "header.html" . }} +<main role="main"> <div class="white z-depth-1"> <main role="main" class="container"> <article itemscope itemtype="http://schema.org/BlogPosting" class="section"> + {{ if .Params.image }} + <img src="/images/{{ .Params.image }}" style="width: 100%;"> + {{ end }} <h1 itemprop="headline" class="header">{{ .Title }}</h1> <span><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time></span> <section itemprop="articleBody" class="flow-text"> @@ -10,4 +14,5 @@ </article> </main> </div> +</main> {{ partial "footer.html" . }} diff --git a/themes/flog/layouts/partials/footer.html b/themes/flog/layouts/partials/footer.html index 937ff18..034918e 100644 --- a/themes/flog/layouts/partials/footer.html +++ b/themes/flog/layouts/partials/footer.html @@ -4,14 +4,7 @@ <script type="text/javascript" src="/js/materialize-0.97.7.min.js"></script> <script type="text/javascript" src="/js/smoothstate-0.5.2.min.js"></script> <script type="text/javascript"> - function parallax() { - var yPos = -($(window).scrollTop() / $('body').data('speed')); - var coords = '50% ' + yPos + 'px'; - $('body').css({ backgroundPosition: coords }); - }; - document.addEventListener('pageReady', function() { - parallax(); $('.button-collapse').sideNav(); $('.button-collapse').sideNav('hide'); }); @@ -21,8 +14,6 @@ } $(document).ready(function() { - parallax(); - $(window).scroll(parallax); $('.button-collapse').sideNav(); $('#main').smoothState({ prefetch: true, onAfter: ready }); }); diff --git a/themes/flog/layouts/partials/header.html b/themes/flog/layouts/partials/header.html index a65b772..8933c5c 100644 --- a/themes/flog/layouts/partials/header.html +++ b/themes/flog/layouts/partials/header.html @@ -9,7 +9,7 @@ <link rel="alternate" href="/index.xml" type="application/rss+xml" title="{{ .Site.Title }}"> <title>{{ .Title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }}</title> </head> - <body style="background: url(/background.jpg);" data-speed="5"> + <body style="background: url(/background.jpg); background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover;"> <div id="main"> <header> <nav class="teal lighten-2"> diff --git a/themes/flog/layouts/partials/listing.html b/themes/flog/layouts/partials/listing.html index 93fe09d..44849bd 100644 --- a/themes/flog/layouts/partials/listing.html +++ b/themes/flog/layouts/partials/listing.html @@ -1,5 +1,4 @@ <main role="main"> - <h1>{{ .Title }}</h1> <div class="row grid"> <div class="grid-sizer col s1"></div> {{ range .Data.Pages }} @@ -11,7 +10,7 @@ <div class="card"> {{ if .Params.image }} <div class="card-image"> - <img src="/images/{{ .Params.image }}"> + <a href="{{ .RelPermalink }}"><img src="/images/{{ .Params.image }}"></a> </div> {{ end }} <section class="card-content" itemprop="text"> |
