<div class="js-component relative z-0 my-12 lg:my-20">
    <div class="bg-darkblue items-center p-6">
        <div class="max-w-4xl mx-auto">
            <div class="flex flex-col lg:flex-row items-center justify-center gap-2 lg:gap-7">
                <div>
                    <h3 class="font-extrabold text-xl text-grey-800">Excellent</h3>
                </div>
                <div class="flex-shrink-0">
                    <!-- retrieve stars from business unit API -->

                    <img src="/front-end/images/trustpilot/stars/stars-5.svg" alt="Trustpilot 5 out of 5 stars" loading="lazy" width="165" height="31" />

                    <p class="text-grey-600 mt-2.5 text-center">
                        Over 31,000 reviews
                    </p>
                </div>
                <div class="flex-shrink-0">
                    <img width="130" height="32" src="/front-end/images/trustpilot/logo.svg" loading="lazy" alt="Trustpilot logo" />
                </div>
            </div>
        </div>
    </div>
</div>
<div class="js-component relative z-0 my-12 lg:my-20">
    <div class="bg-darkblue items-center p-6">
        <div class="max-w-4xl mx-auto">
            <div class="flex flex-col lg:flex-row items-center justify-center gap-2 lg:gap-7">
                <div>
                    <h3 class="font-extrabold text-xl text-grey-800">{{ ratingLabel }}</h3>
                </div>
                <div class="flex-shrink-0">
                    <!-- retrieve stars from business unit API -->
                    {% if stars %}
                        {% set starsImage = 'images/trustpilot/stars/stars-' +  stars + '.svg' %}
                        <img 
                            src="{{ starsImage | asset }}" 
                            alt="Trustpilot {{ stars }} out of 5 stars"
                            loading="lazy"
                            width="165"
                            height="31"
                        />
                    {% endif %}                    
                    <p class="text-grey-600 mt-2.5 text-center">
                        Over {{ reviewCount }} reviews
                    </p>
                </div>
                <div class="flex-shrink-0">
                    <img 
                        width="130"
                        height="32"
                        src="{{ 'images/trustpilot/logo.svg' | asset }}" 
                        loading="lazy"
                        alt="Trustpilot logo"
                    />
                </div>
            </div>
        </div>
    </div>
</div>
{
  "siteName": "Gigaclear Pattern Library",
  "ratingLabel": "Excellent",
  "stars": 5,
  "reviewCount": "31,000"
}
  • Handle: @trustpilot-component
  • Preview:
  • Filesystem Path: fractal\components\02-umbraco-repeatable-components\trustpilot-component\trustpilot-component.nunjucks

No notes defined.