Skip to content

Commit

Permalink
using a template literal instead of a concat string
Browse files Browse the repository at this point in the history
  • Loading branch information
NataliaLKB committed Nov 2, 2017
1 parent f4ea186 commit ebd4e7b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions static/src/javascripts/projects/common/modules/gallery/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,22 @@ class GalleryLightbox {
});
};

const galleryLightboxHtml: string =
`${'<div class="overlay gallery-lightbox gallery-lightbox--closed gallery-lightbox--hover">' +
'<div class="gallery-lightbox__sidebar">'}${generateButtonHTML(
'close'
)}<div class="gallery-lightbox__progress gallery-lightbox__progress--sidebar">` +
`<span class="gallery-lightbox__index js-gallery-index"></span>` +
`<span class="gallery-lightbox__progress-separator"></span>` +
`<span class="gallery-lightbox__count js-gallery-count"></span>` +
`</div>${generateButtonHTML('next')}${generateButtonHTML(
'prev'
)}${generateButtonHTML('info-button')}</div>` +
`<div class="js-gallery-swipe gallery-lightbox__swipe-container">` +
`<ul class="gallery-lightbox__content js-gallery-content">` +
`</ul>` +
`</div>` +
`</div>`;
const galleryLightboxHtml: string = `<div class="overlay gallery-lightbox gallery-lightbox--closed gallery-lightbox--hover">
<div class="gallery-lightbox__sidebar">
${generateButtonHTML('close')}
<div class="gallery-lightbox__progress gallery-lightbox__progress--sidebar">
<span class="gallery-lightbox__index js-gallery-index"></span>
<span class="gallery-lightbox__progress-separator"></span>
<span class="gallery-lightbox__count js-gallery-count"></span>
</div>
${generateButtonHTML('next')}
${generateButtonHTML('prev')}
${generateButtonHTML('info-button')}
</div>
<div class="js-gallery-swipe gallery-lightbox__swipe-container">
<ul class="gallery-lightbox__content js-gallery-content"></ul>
</div>
</div>`;

// ELEMENT BINDINGS
this.lightboxEl = bonzo.create(galleryLightboxHtml);
Expand Down

0 comments on commit ebd4e7b

Please sign in to comment.