|
| 1 | +@using Microsoft.Extensions.Localization |
| 2 | +@using app.domain.ViewModels |
| 3 | +@inject Microsoft.Extensions.Localization.IStringLocalizerFactory LocalizerFactory |
| 4 | + |
| 5 | +@if (Sponsors.Length > 0) |
| 6 | +{ |
| 7 | + <section class="bg-white py-16"> |
| 8 | + <div class="mx-auto container px-4"> |
| 9 | + <div class="mb-12"> |
| 10 | + <h2 class="heading heading-1 text-dark-purple mb-4"> |
| 11 | + Sponsors |
| 12 | + </h2> |
| 13 | + <p class="text-gray-600 font-light max-w-3xl"> |
| 14 | + Thank you to everyone who makes this event possible. |
| 15 | + </p> |
| 16 | + </div> |
| 17 | + |
| 18 | + <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8"> |
| 19 | + @foreach (var sponsor in Sponsors) |
| 20 | + { |
| 21 | + <div class="flex flex-col group"> |
| 22 | + <!-- Logo Section with Grayscale Effect --> |
| 23 | + <div class="mb-6"> |
| 24 | + <img src="@sponsor.LogoUrl" |
| 25 | + alt="@sponsor.Name" |
| 26 | + class="h-16 w-auto object-contain grayscale group-hover:grayscale-0 transition-all duration-300" /> |
| 27 | + </div> |
| 28 | + |
| 29 | + <!-- Content Section --> |
| 30 | + <div class="flex flex-col flex-grow"> |
| 31 | + <p class="text-base text-gray-600 leading-relaxed mb-4"> |
| 32 | + @sponsor.Description |
| 33 | + </p> |
| 34 | + |
| 35 | + @if (!string.IsNullOrEmpty(sponsor.WebsiteUrl)) |
| 36 | + { |
| 37 | + <a href="@sponsor.WebsiteUrl" |
| 38 | + target="_blank" |
| 39 | + rel="noopener noreferrer" |
| 40 | + class="text-sm font-semibold text-dark-purple underline"> |
| 41 | + See more |
| 42 | + </a> |
| 43 | + } |
| 44 | + </div> |
| 45 | + </div> |
| 46 | + } |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </section> |
| 50 | +} |
| 51 | + |
| 52 | +@code { |
| 53 | + private IStringLocalizer? _sharedLocalizer; |
| 54 | + private IStringLocalizer SharedLocalizer => _sharedLocalizer ??= LocalizerFactory.Create("SharedResources", "app"); |
| 55 | + |
| 56 | + private readonly Sponsor[] Sponsors = |
| 57 | + [ |
| 58 | + new Sponsor( |
| 59 | + Name: ".NET Foundation", |
| 60 | + LogoUrl: "/assets/sponsors/dotnetfondation.webp", |
| 61 | + Description: "The .NET Foundation is an independent non-profit that supports a vibrant, open-source ecosystem for the .NET platform.", |
| 62 | + WebsiteUrl: "https://dotnetfoundation.org" |
| 63 | + ), |
| 64 | + new Sponsor( |
| 65 | + Name: "AWS", |
| 66 | + LogoUrl: "/assets/sponsors/aws.jpg", |
| 67 | + Description: "AWS is an Amazon subsidiary offering on-demand, pay-as-you-go cloud computing platforms and APIs, often used with autoscaling.", |
| 68 | + WebsiteUrl: "https://aws.amazon.com" |
| 69 | + ), |
| 70 | + new Sponsor( |
| 71 | + Name: "IDEM AI", |
| 72 | + LogoUrl: "/assets/sponsors/idem.png", |
| 73 | + Description: "IDEM turns simple ideas into full businesses—strategy, brand, product, and apps—built for Africa to help creators grow and thrive independently.", |
| 74 | + WebsiteUrl: "https://idem.africa" |
| 75 | + ), |
| 76 | + ]; |
| 77 | +} |
0 commit comments