@page "/"
@model IndexModel
@* ReSharper disable Html.PathError *@
@{
    ViewData["title"] = $"Home - {Model.InstanceName}";

    //TODO: logo / banner & favicon
}

@section head
{
    <meta name="twitter:card" content="summary">
    <meta name="og:title" content="Home - @Model.InstanceName">
    <meta name="og:description" content="@Model.InstanceDescription">
    <meta name="og:site_name" content="@Model.InstanceName">
}

<div class="header">
    <h1>@Model.InstanceName</h1>
    <div class="wordmark">
        <img src="~/_content/Iceshrimp.Assets.Branding/welcome-logo.svg" alt="Iceshrimp"/>
    </div>
</div>
<p>@Model.InstanceDescription</p>

@if (Model.Rules.Count != 0)
{
    <details>
        <summary>Rules</summary>
        <ol>
            @foreach (var rule in Model.Rules)
            {
                <li>
                    @rule.Text
                    @if (rule.Description != null)
                    {
                        <br>
                        <i>@rule.Description</i>
                    }
                </li>
            }
        </ol>
    </details>
}

@if (Model.ContactEmail != null)
{
    <span>| <a href="mailto:@Model.ContactEmail">Contact instance administrators</a></span>
}