@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
var pageMetadata = ViewData["PageMetadata"] as VmPageMetadata;
}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta name="theme-color" content="#393d49">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-touch-fullscreen" content="yes"/>
<meta name="full-screen" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="author" content="彭迁"/>
<meta name="generator" content="@AppContext.TargetFrameworkName"/>
<meta name="language" content="zh-Hans"/>
<meta name="copyright" content="dpangzi.com"/>
<meta name="web-api-base-address" content="@Configuration["WebApi"]">
<meta name="cdn-base-address" content="@Configuration["CDNBaseAddress"]">
@if (pageMetadata?.Metas?.Any() == true)
{
foreach (var meta in pageMetadata.Metas)
{
<meta name="@meta.Key" content="@meta.Value"/>
}
}
@if (pageMetadata?.Keywords?.Any() == true)
{
<meta name="keywords" content="@string.Join(",", pageMetadata.Keywords)"/>
}
@if (!string.IsNullOrEmpty(pageMetadata?.Description))
{
<meta name="description" content="@pageMetadata.Description"/>
}
@if (string.IsNullOrEmpty(pageMetadata?.Title))
{
<title>@ViewData["Title"] @Configuration["Title"]</title>
}
else
{
<title>@pageMetadata.Title</title>
}