Skip to content

Commit

Permalink
Add support for gallery image captions in Magnific Popup overlays
Browse files Browse the repository at this point in the history
- Apply optional `title` attribute to image anchors that trigger Magnific Popup overlays
- Close mmistakes#334
  • Loading branch information
mmistakes authored and sobkowiak committed Jul 18, 2016
1 parent 444e44c commit b59edc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _includes/gallery
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
{% else %}
"{{ img.url | prepend: "/images/" | prepend: base_path }}"
{% endif %}
{% if img.title %}title="{{ img.title }}"{% endif %}
>
<img src=
{% if img.image_path contains "http" %}
"{{ img.image_path }}"
{% else %}
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
{% endif %}
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
</a>
{% else %}
<img src=
Expand All @@ -41,7 +42,7 @@
{% else %}
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
{% endif %}
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
{% endif %}
{% endfor %}
{% if include.caption %}
Expand Down

0 comments on commit b59edc2

Please sign in to comment.