@using Dpz.Core.Web.Library.Api
@using Dpz.Core.EnumLibrary
@using Dpz.Core.Web.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using System.Globalization
@model IList<Dpz.Core.Public.ViewModel.Steam.VmSteamGame>
@inject IHomeCacheService HomeCacheService
<div class="blog-container">
<blockquote class="layui-elem-quote sitemap layui-breadcrumb shadow">
<a href="/" title="网站首页" data-pjax>网站首页</a>
<a><cite></cite>Steam</a>
</blockquote>
<div class="blog-main">
<div class="blog-main-left">
<div class="steam-games">
@foreach (var item in Model.OrderBy(x => x.Name,StringComparer.Create(new CultureInfo("zh-Hans"),false)))
{
var time = TimeSpan.FromMinutes(item.PlayTime);
<div class="game-card">
<div class="game-content">
<img src="@item.ImageLogo" alt="@item.Name"/>
<div class="game-info">
<div class="game-name">
<a asp-controller="Steam" asp-action="Achievements" asp-route-id="@item.Id" data-pjax>@item.Name</a>
</div>
<div class="game-time">游戏时长:<i>@($"{time.TotalHours:00}小时{time.Minutes:00}分钟")</i></div>
</div>
</div>
<div class="game-achievements">
<partial name="AchievementSummary" model="item.Achievements"/>
</div>
</div>
}
@{
var commentModel = (CommentNode.Steam,"Index");
}
<partial name="_GlobalCommentPartial" model="commentModel"/>
</div>
</div>
<div class="blog-main-right">
@{
var random = await HomeCacheService.GetRandomArticlesAsync();
var cache = await HomeCacheService.GetLatestArticlesAsync();
var tags = await HomeCacheService.GetArticleTagsAsync();
var model = Tuple.Create(random, cache, tags);
}
<partial name="_RightInfoPartial" model="model"/>
<div class="blog-module shadow" data-request="@Url.Action("TodayNews", "Home")">
<img src="@Program.CdnBaseAddress/loaders/bars.svg" alt="loading" style="width: 100%"/>
</div>
</div>
<div class="clear"></div>
</div>
</div>