Random header images
This commit is contained in:
@@ -12,6 +12,7 @@ github: https://github.com/boukefalos
|
||||
disqus: boukefalos
|
||||
analytics: UA-46375339-1
|
||||
maps: AIzaSyCyIwGR-F48dFjAbwNr9JdOsfUYaUQxz1s
|
||||
headers: [187b6ae, 54773b7, eae28bd]
|
||||
|
||||
# pagination
|
||||
paginate: 3
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{ site.analytics }}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
window.onload = function() {
|
||||
var headers = {{ site.headers | implode }};
|
||||
var header = headers[Math.floor(Math.random() * headers.length)];
|
||||
document.getElementById('masthead').style.backgroundImage = "url('/asset/header/" + header + ".jpg')";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="layout-{{ page.layout }}{% if page.body_class %} {{ page.body_class }}{% endif %}">
|
||||
|
||||
27
_layouts/post.html
Normal file
27
_layouts/post.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% include header.html %}
|
||||
<section itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<header>
|
||||
<div class="timeline">
|
||||
{% if page.date %}
|
||||
<time datetime="{{ page.date|date_to_xmlschema }}" title="{{ page.date|date_to_xmlschema }}"><strong>{{ page.date|date:"%b %d"|upcase }}</strong><br />{{ page.date|date:"%Y" }}</time>
|
||||
{% endif %}
|
||||
{% if page.location %}
|
||||
<a href="https://maps.google.com/maps?hl=en&ll={{ page.location.latitude }},{{ page.location.longitude }}&t=w&z=12"><img alt="map" height="49" src="https://maps.googleapis.com/maps/api/staticmap?center={{ page.location.latitude }},{{ page.location.longitude }}&zoom=9&size=98x98&sensor=false" title="{{ page.location.title }}" width="49" /></a>
|
||||
{% endif %}
|
||||
{% if page.code %}
|
||||
<a href="{{ page.code }}"><img alt="code" height="49" src="{{ site.static_prefix }}/icon/code.png" width="49" /></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>
|
||||
<span itemprop="name">{{ page.title }}</span>
|
||||
<small class="print-only" itemprop="datePublished" content="{{ page.date|date:'%F') }}">{{ page.date|date:'%A, %B %d, %Y' }}</small>
|
||||
</h1>
|
||||
</header>
|
||||
<section class="post-content" itemprop="articleBody">
|
||||
{{ content }}
|
||||
</section>
|
||||
{% if false != page.comments %}
|
||||
{% include disqus.html %}
|
||||
{% endif %}
|
||||
</section>
|
||||
{% include footer.html %}
|
||||
12
_plugins/implode.rb
Normal file
12
_plugins/implode.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# adapted from
|
||||
# - https://github.com/kenhkelly/kenhkelly.us/blob/master/_plugins/implode.rb
|
||||
|
||||
module Jekyll
|
||||
module Implode
|
||||
def implode(text)
|
||||
"['" + text.join("', '") + "']"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_filter(Jekyll::Implode)
|
||||
15
about.html
Normal file
15
about.html
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: About
|
||||
author: Rik
|
||||
layout: default
|
||||
---
|
||||
<section>
|
||||
<p>
|
||||
De werking van dit blog zou weinig uitleg nodig moeten hebben!
|
||||
</p>
|
||||
{% include caption.html
|
||||
width='500'
|
||||
image='/asset/gallery/2013-visit/c0d7445~640w.jpg'
|
||||
text='De fraaie West Port!'
|
||||
%}
|
||||
<section>
|
||||
13
about.md
13
about.md
@@ -1,13 +0,0 @@
|
||||
---
|
||||
title: About
|
||||
author: Rik
|
||||
layout: page
|
||||
---
|
||||
|
||||
De werking van dit blog zou weinig uitleg nodig moeten hebben!
|
||||
|
||||
{% include caption.html
|
||||
width='500'
|
||||
image='/asset/gallery/2013-visit/c0d7445~640w.jpg'
|
||||
text='De fraaie West Port!'
|
||||
%}
|
||||
@@ -2,7 +2,6 @@
|
||||
title: Galleries
|
||||
layout: default
|
||||
---
|
||||
|
||||
<section>
|
||||
<p>
|
||||
Naast foto’s die bij bepaalde activiteiten horen, kom ik vaak situaties tegen die ik de moeite waard vind om op beeld vast te leggen. Wist je dat ik de meeste foto's op dit blog met de camera op mijn HTC One S of OnePlus One maak? Geloof het of niet, maar zelfs sommige van de prachtige panorama's boven elke pagina zijn daarvan afkomstig. Natuurlijk vul ik mijn eigen foto's aan met exemplaren van anderen.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
---
|
||||
---
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
@@ -32,7 +34,7 @@ header.site-header, header.navigation {
|
||||
header.site-header {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
background: url(/asset/header/187b6ae.jpg) no-repeat scroll top;
|
||||
background: url(/asset/header/{{ site.headers[0] }}.jpg) no-repeat scroll top;
|
||||
background-size: 1600px auto;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user