@model List<atakanozbancom.Models.classes.AffiliateLinkVM>
@{
    ViewBag.Title = "index";
    Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
}

<main class="px-3">
    <h1 class="mb-3">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksTitle</h1>
    <p class="mb-4 text-white">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksIntro</p>

    @if (Model != null && Model.Any())
    {
        <div class="affiliate-list mb-5">
            @foreach (var link in Model)
            {
                <a class="affiliate-card" href="@link.url" target="_blank" rel="nofollow sponsored noopener">
                    <img class="affiliate-logo" src="@link.image" alt="@link.title" loading="lazy" />
                    <div class="affiliate-text">
                        <div class="affiliate-title">@link.title</div>
                        @if (!string.IsNullOrWhiteSpace(link.description))
                        {
                            <div class="affiliate-desc">@link.description</div>
                        }
                    </div>
                </a>
            }
        </div>
    }
    else
    {
        <p class="mb-5 text-start">
            @atakanozbancom.App_GlobalResources.Resource.AffiliateLinksComingSoon
        </p>
    }
</main>
