BuildFeed/BuildFeed/Views/front/index.cshtml

190 lines
7.9 KiB
Plaintext

@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using BuildFeed.Model.View
@model Dictionary<ProjectFamily, FrontPage>
@{
ViewBag.Title = string.Format(VariantTerms.Front_HomeH1, InvariantTerms.SiteName);
}
@section Head
{
<meta name="description" content="Learn what Dona Sarkar won&apos;t tell you. Keep up to date with the latest Microsoft Windows developments with BuildFeed, the comprehensive build tracker." />
<link rel="alternate" type="application/rss+xml" title="Latest additions - RSS" href="@Url.Action(nameof(RssController.Added), "Rss")" />
}
<h1>@string.Format(VariantTerms.Front_HomeH1, InvariantTerms.SiteName)</h1>
<h3>@VariantTerms.Front_LatestBuilds</h3>
<a href="@Url.Action("IndexPage", new
{
Page = 1
})" class="latest-full">
@VariantTerms.Front_FullBuildListing
</a>
<div class="trim-wrapper">
<div class="latest-family-wrapper">
@foreach (var item in Model)
{
FrontPage family = item.Value;
<div class="latest-family">
<h3>@MvcExtensions.GetDisplayTextForEnum(item.Key)</h3>
<div class="latest-flex">
@if (family.CurrentCanary != null && family.CurrentCanary.Id != family.CurrentInsider?.Id)
{
<a href="@Url.Action(nameof(FrontController.ViewBuild), new
{
family.CurrentCanary.Id
})" class="latest-flex-item latest-flex-red">
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentCanary, family.CurrentCanary)
</a>
}
@if (family.CurrentInsider != null && family.CurrentInsider.Id != family.CurrentRelease?.Id)
{
<a href="@Url.Action(nameof(FrontController.ViewBuild), new
{
family.CurrentInsider.Id
})" class="latest-flex-item latest-flex-yellow">
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentInsider, family.CurrentInsider)
</a>
}
@if (family.CurrentRelease != null)
{
<a href="@Url.Action(nameof(FrontController.ViewBuild), new
{
family.CurrentRelease.Id
})" class="latest-flex-item latest-flex-blue">
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentRelease, family.CurrentRelease)
</a>
}
@if (family.CurrentAnalog != null)
{
<a href="@Url.Action(nameof(FrontController.ViewBuild), new
{
family.CurrentAnalog.Id
})" class="latest-flex-item latest-flex-purple">
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentAnalog, family.CurrentAnalog)
</a>
}
@if (family.CurrentXbox != null)
{
<a href="@Url.Action(nameof(FrontController.ViewBuild), new
{
family.CurrentXbox.Id
})" class="latest-flex-item latest-flex-green">
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentXbox, family.CurrentXbox)
</a>
}
</div>
</div>
}
</div>
</div>
<h3>@VariantTerms.Search_BuildFeed</h3>
<div class="build-group-listing">
<div class="build-group">
<h3 class="build-group-title">
<span>@VariantTerms.Search_Version</span>
</h3>
<div class="form-group">
<div class="group-input-button">
<select id="search-version">
@{
ProjectFamily[] versions = ViewBag.Versions;
foreach (ProjectFamily version in versions)
{
<option value="@Url.Action(nameof(FrontController.ViewFamily), "Front", new
{
family = version
})">
@MvcExtensions.GetDisplayDescriptionForEnum(version)
</option>
}
}
</select>
<button onclick="window.location = document.getElementById('search-version').value;return false;" title="@VariantTerms.Search_Title">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
<div class="build-group">
<h3 class="build-group-title">
<span>@VariantTerms.Search_Year</span>
</h3>
<div class="form-group">
<div class="group-input-button">
<select id="search-year">
@{
int[] years = ViewBag.Years;
foreach (int year in years)
{
<option value="@Url.Action(nameof(FrontController.ViewYear), "Front", new
{
year
})">
@year
</option>
}
}
</select>
<button onclick="window.location = document.getElementById('search-year').value;return false;" title="@VariantTerms.Search_Title">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
<div class="build-group">
<h3 class="build-group-title">
<span>@VariantTerms.Search_Source</span>
</h3>
<div class="form-group">
<div class="group-input-button">
<select id="search-source">
@{
TypeOfSource[] sources = ViewBag.Sources;
foreach (TypeOfSource source in sources)
{
<option value="@Url.Action(nameof(FrontController.ViewSource), "Front", new
{
source
})">
@MvcExtensions.GetDisplayTextForEnum(source)
</option>
}
}
</select>
<button onclick="window.location = document.getElementById('search-source').value;return false;" title="@VariantTerms.Search_Title">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
</div>
<h3>@VariantTerms.Front_Share</h3>
<div class="addthis_sharing_toolbox"></div>
<br />
<h3>@string.Format(VariantTerms.Front_AboutSite, InvariantTerms.SiteName)</h3>
<h4>@VariantTerms.About_Q1</h4>
<p>@VariantTerms.About_A1</p>
<h4>@VariantTerms.About_Q2</h4>
<p>@VariantTerms.About_A2</p>
<h4>@VariantTerms.About_Q3</h4>
<p>@VariantTerms.About_A3</p>
@section Scripts
{
<script type="application/ld+json">
{
"@("@")context": "http://schema.org",
"@("@")type": "Organization",
"name": "BuildFeed",
"url": "https://buildfeed.net/",
"logo": "https://buildfeed.net/res/ico/notify.png",
"sameAs": [
"https://twitter.com/buildfeed"
]
}
</script>
}