Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

3.5 KB
Raw Blame
@using Grand.Business.Core.Interfaces.Storage
@inject IPictureService pictureService
@inject SeoSettings seoSettings
@{
    Layout = "_SingleColumn";
}

@section meta {
    @if (seoSettings.OpenGraphMetaTags)
    {
        <meta property="og:type" content="website"/>
        <meta property="og:title" content="@seoSettings.DefaultTitle"/>
        <meta property="og:description" content="@Html.Encode(seoSettings.DefaultMetaDescription)"/>
        @if (!string.IsNullOrWhiteSpace(seoSettings.StorePictureId))
        {
            var picture = await pictureService.GetPictureUrl(seoSettings.StorePictureId);
            <meta property="og:image" content="@picture"/>
        }

        <meta property="og:url" content="@Url.ActionContext.HttpContext.Request.GetEncodedUrl()"/>
    }
    @if (seoSettings.TwitterMetaTags)
    {
        <meta property="twitter:card" content="summary"/>
        <meta property="twitter:site" content="@seoSettings.DefaultTitle"/>
        <meta property="twitter:title" content="@seoSettings.DefaultTitle"/>
        <meta property="twitter:description" content="@Html.Encode(seoSettings.DefaultMetaDescription)"/>
        @if (!string.IsNullOrWhiteSpace(seoSettings.StorePictureId))
        {
            var picture = await pictureService.GetPictureUrl(seoSettings.StorePictureId);
            <meta property="twitter:image" content="@picture"/>
        }

        <meta property="twitter:url" content="@Url.ActionContext.HttpContext.Request.GetEncodedUrl()"/>
    }
}

@*
    Nordic: sections in the editorial order of the spec (collections before brands, the
    journal before news). Each "home_page_before_X" zone moves with its section, so it still
    renders directly before it. DisplayOrderHomePage keeps working: every section still
    carries its order-N class inside this flex column.
*@
<div class="page home-page nordic-home custom-container d-flex flex-column mt-0">
    @await Component.InvokeAsync("PushNotificationsRegistration")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_top" })
    <div class="nordic-intro">
        @await Component.InvokeAsync("PageBlock", new { systemName = "HomePageText" })
    </div>
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_categories" })
    @await Component.InvokeAsync("HomePageCategories")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_products" })
    @await Component.InvokeAsync("PersonalizedProducts")
    @await Component.InvokeAsync("CustomerRecommendedProducts")
    @await Component.InvokeAsync("SuggestedProducts")
    @await Component.InvokeAsync("HomePageProducts")
    @await Component.InvokeAsync("HomePageNewProducts")
    @await Component.InvokeAsync("CategoryFeaturedProducts")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_best_sellers" })
    @await Component.InvokeAsync("HomePageBestSellers")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_collections" })
    @await Component.InvokeAsync("HomePageCollections")
    @await Component.InvokeAsync("CollectionFeaturedProducts")
    @await Component.InvokeAsync("HomePageBrands")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_blog" })
    @await Component.InvokeAsync("HomePageBlog")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_before_news" })
    @await Component.InvokeAsync("HomePageNews")
    @await Component.InvokeAsync("Widget", new { widgetZone = "home_page_bottom" })
</div>