{{~exec(function() { helpers.var.translations = { offers : data.translations.offers, leo : data.translations.leo } })}} {{#tour}} {{~exec(() => { helpers.var.imageUrl = helpers.plugins.cloudinary.createResource({imageUrl : data.images[0].url}).getThumbnailUrl({width : 414, height : 275, crop : 'fill', sv : {gravity : 'focalPoint'}}); if (data.description) { let formattedDesc = helpers.plugins.stringLib.stripHtml(data.description); helpers.var.formattedDesc = helpers.plugins.stringLib.substringOnWord(formattedDesc, 180, {ellipsis : true}); } if (data.rating) { let roundedRating = parseFloat(data.rating.toFixed(1)); let totalStars = Math.floor(roundedRating); let partialStars = parseFloat(roundedRating - totalStars).toFixed(1); if (partialStars > 0.5) totalStars += 1; let fullStar = ``; let emptyStar = ``; let halfStar = ``; let totalStarsArr = []; for (let i = 0; i < totalStars; i++) { totalStarsArr.push(fullStar); } let testArr = []; for (let i = 0; i < 3; i++) { testArr.push(fullStar); } if (totalStars < 5) { if (partialStars === 0.5) totalStarsArr.push(halfStar); let emptyStars = 5 - totalStarsArr.length; for (let i = 0; i < emptyStars; i++) { totalStarsArr.push(emptyStar); } } helpers.var.totalStarsArr = totalStarsArr.join(''); } })}}
{{!-- Pre-allocates height of image using padding-bottom to prevent height changes on load --}} {{~setVar("width", 414 )}} {{~setVar("height", 275)}} {{~setVar("paddingBottom", (helpers.var.height / helpers.var.width) * 100 + "%")}}

{{name}}

    {{:price_from}}
  • From: ${{price_from}}
  • {{/}} {{:rating}}
  • {{~var.totalStarsArr}}
  • {{/}} {{:description}}
  • {{~var.formattedDesc}}

  • {{/}}
{{/tour}}