网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
@model TodayNewsModel?

@if (Model != null)
{
    if (Model.Calendar != null)
    {
        <div class="blog-module-title">
            简报,
            @(Model.Calendar.Month)月@(Model.Calendar.Day)日,
            农历@(Model.Calendar.MonthCn)@(Model.Calendar.DayCn)
            @if (Model.Calendar.IsTerm)
            {
                <span>,今天是24节气中的<strong>@Model.Calendar.Term</strong></span>
            }
            <h5>
                @if (Model.Weather?.Detail != null)
                {
                    if (Model.Weather.Detail.Date == DateTime.Now.Date)
                    {
                        <span>今天</span>
                    }
                    else
                    {
                        <span>明天</span>
                    }

                    <span>@(Model.Weather.City)</span>
                    <span>@(Model.Weather.Detail.TextDay)</span>
                    <span>,</span>
                    <span>@Model.Weather.Detail.Low</span>
                    <span>~</span>
                    <span>@Model.Weather.Detail.High</span>
                    <span>℃</span>
                    @if (int.TryParse(Model.Weather.Detail.WindScale, out var scale)
                         && WebToolsExtensions.Wind.TryGetValue(scale, out var wind))
                    {
                        <span>,@wind</span>
                    }
                }
            </h5>
        </div>
    }

    <ul class="fa-ul blog-module-ul">
        @foreach (var item in Model.NewsList ?? new List<News>())
        {
            <li>
                <i class="fa-li fa fa-hand-o-right"></i>
                <a href="@item.Url" target="_blank">@item.Title</a>
            </li>
        }
    </ul>
    <div class="blog-module-title" style="margin-top: 10px">历史上的今天</div>
    <ul class="fa-ul blog-module-ul">
        @foreach (var item in Model.HistoryList ?? new List<History>())
        {
            <li>
                <i class="fa-li fa fa-hand-o-right"></i>@item.Event
            </li>
        }
    </ul>
}
loading