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 #334
  • Loading branch information
mmistakes committed Jun 2, 2016
1 parent 9fa7b23 commit b7185c8
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 b7185c8

Please sign in to comment.