Fix featherlight to avoid icon images

This commit is contained in:
Ryan Watters
2017-02-19 01:57:49 -06:00
parent 3bedf1e23d
commit 4e159ed50c
4 changed files with 6 additions and 6 deletions
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -9,7 +9,7 @@
<a href="{{ $values.url }}">
<section>
<div class="homepage-card-image-wrapper">
<img src="/images/hugo-icons/{{ $values.url }}.svg" alt="">
<img class="hugo-icon" src="/images/hugo-icons/{{ $values.url }}.svg" alt="">
</div>
<div class="homepage-card-copy">
<header>
@@ -1,3 +1,3 @@
<div class="list-icon-wrapper">
<img src="{{$.Site.BaseURL}}images/hugo-icons/{{.Section}}.svg" alt="">
<img class="hugo-icon" src="{{$.Site.BaseURL}}images/hugo-icons/{{.Section}}.svg" alt="">
</div>
@@ -5,9 +5,9 @@
* Copyright 2016, Noël Raoul Bossart (http://www.noelboss.com)
* MIT Licensed.
**/
// Modification IIFE for digital.cap.org to wrap all images in feather anchor first
// Modification IIFE for gohugo.il to wrap all images in feather anchor first; this only applies to img within body copy
(function() {
$('.body-copy img').each(function() {
$('.body-copy img:not(.hugo-icon)').each(function() {
$(this).wrap('<a class=\"image-link\" data-featherlight=\"image\" href=\"' + $(this).attr('src') + '\"></a>');
});
})();