Skip to content

Commit

Permalink
Merge pull request barryclark#8 from Robpol86/master
Browse files Browse the repository at this point in the history
Re-implemented hotlinkable background.
  • Loading branch information
mmistakes committed Nov 4, 2013
2 parents dc7b33b + 98ee442 commit c42b853
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.url }}/images/apple-touch-icon-144x144-precomposed.png">

{% if page.image.background or site.background %}
<style type="text/css">body {background-image:url({{ site.url }}/images/{% if page.image.background %}{{ page.image.background }}{% else %}{{ site.background }}{% endif %});}</style>
{% capture background %}{% if page.image.background %}{{ page.image.background }}{% else %}{{ site.background }}{% endif %}{% endcapture %}
{% unless background contains 'http://' or background contains 'https://' %}{% capture background %}{{ site.url }}/images/{{ background }}{% endcapture %}{% endunless %}
<style type="text/css">body {background-image:url({{ background }});}</style>
{% endif %}

0 comments on commit c42b853

Please sign in to comment.