Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Image feature can be on another site #143

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion _includes/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<a href="#">About</a>
<ul class="dl-submenu">
<li>
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
(% if site.owner.avatar contains '://' %}
<img src="{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
{% else %}
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
{% endif %}
<h4>{{ site.owner.name }}</h4>
<p>{{ site.owner.bio }}</p>
</li>
Expand Down
6 changes: 5 additions & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% if page.image.feature contains 'http://' or page.image.feature contains 'https://' %}
<img src="{{ page.image.feature }}" alt="{{ page.title }}">
{% else %}
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% endif %}
</div><!-- /.entry-image -->
</div><!-- /.entry-header -->
{% endif %}
Expand Down
8 changes: 6 additions & 2 deletions _layouts/post-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %}
{% if page.image.feature %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% if page.image.feature contains '://' %}
<img src="{{ page.image.feature }}" alt="{{ page.title }}">
{% else %}
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% endif %}
</div><!-- /.entry-image -->
{% endif %}
<div class="header-title">
Expand All @@ -40,4 +44,4 @@ <h2>{{ page.title }}</h2>
{% include scripts.html %}

</body>
</html>
</html>
6 changes: 5 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: {% if page.image.creditlink %}<a href="{{ page.image.creditlink }}">{% endif %}{{ page.image.credit }}{% if page.image.creditlink %}</a>{% endif %}</div><!-- /.image-credit -->{% endif %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% if page.image.feature contains 'http://' or page.image.feature contains 'https://' %}
<img src="{{ page.image.feature }}" alt="{{ page.title }}">
{% else %}
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
{% endif %}
</div><!-- /.entry-image -->
</div><!-- /.entry-header -->
{% endif %}
Expand Down