Simplify image assigns
This commit is contained in:
parent
2d64c6f69f
commit
ffd9d1b070
|
@ -10,11 +10,7 @@
|
|||
<a href="{{ post.url | relative_url }}" rel="bookmark">{{ title }}</a>
|
||||
</h3>
|
||||
{% if post.image.thumbnail %}
|
||||
{% assign entry_image = post.image.thumbnail %}
|
||||
{% unless entry_image contains '://' %}
|
||||
{% assign entry_image = entry_image | relative_url %}
|
||||
{% endunless %}
|
||||
{% assign entry_image = entry_image | escape %}
|
||||
{% assign entry_image = post.image.thumbnail | relative_url | escape %}
|
||||
<img class="entry-image u-photo" src="{{ entry_image }}" alt="">
|
||||
{% endif %}
|
||||
</header>
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{% if site.logo contains '://' %}
|
||||
{% assign site_logo = site.logo %}
|
||||
{% else %}
|
||||
{% assign site_logo = site.logo | relative_url %}
|
||||
{% endif %}
|
||||
{% assign site_logo = site.logo | relative_url %}
|
||||
|
||||
<header id="masthead">
|
||||
<div class="inner">
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<header class="intro">
|
||||
{% if page.image %}
|
||||
{% assign intro_image = page.image.path | default: page.image %}
|
||||
{% unless intro_image contains '://' %}
|
||||
{% assign intro_image = intro_image | relative_url %}
|
||||
{% endunless %}
|
||||
{% assign intro_image = intro_image | escape %}
|
||||
{% assign intro_image = page.image.path | default: page.image | relative_url | escape %}
|
||||
<div class="intro-image">
|
||||
<img src="{{ intro_image }}" alt="{{ page.title }}">
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue