mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
init website
This commit is contained in:
parent
433c2d2b2d
commit
a30529db14
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
@ -12,7 +12,7 @@ namespace FreeSql.Site.UI.Areas.Doc.Controllers
|
||||
public class DocumentsController : BaseController
|
||||
{
|
||||
// GET: Documents
|
||||
public ActionResult Index()
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@using Microsoft.AspNetCore.Routing;
|
||||
@using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
||||
文档首页
|
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
@ -18,4 +18,13 @@
|
||||
<Folder Include="Areas\Doc\Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="Areas\BBS\_ViewStart.cshtml">
|
||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||
</Content>
|
||||
<Content Update="Areas\Doc\_ViewStart.cshtml">
|
||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace FreeSql.Site.UI
|
||||
{
|
||||
@ -32,6 +33,21 @@ namespace FreeSql.Site.UI
|
||||
});
|
||||
|
||||
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
|
||||
//设置返回内容得大小写格式
|
||||
.AddJsonOptions(options => { options.SerializerSettings.ContractResolver = new DefaultContractResolver(); });
|
||||
|
||||
//Session服务
|
||||
services.AddSession();
|
||||
|
||||
//添加跨域访问
|
||||
services.AddCors(options => options.AddPolicy("AllowAnyOrigin",
|
||||
builder => builder.WithOrigins("*")
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyOrigin()
|
||||
.AllowCredentials()));
|
||||
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
}
|
||||
|
||||
<div class="site-banner">
|
||||
<div class="site-banner-bg" style="background-image: url(/images/layui/banner/winter.jpg?v=0); background-size: cover;">
|
||||
<div class="site-banner-bg" style="background-image: url(/images/banner_index.jpg?v=0); background-size: cover;">
|
||||
</div>
|
||||
<div class="site-banner-main">
|
||||
<div class="site-zfj site-zfj-anim">
|
||||
|
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
<ul class="layui-nav">
|
||||
<li class="layui-nav-item ">
|
||||
<a href="/doc/document/index">文档<!-- <span class="layui-badge-dot"></span> --></a>
|
||||
<a href="/doc/documents/index">文档<!-- <span class="layui-badge-dot"></span> --></a>
|
||||
</li>
|
||||
<li class="layui-nav-item ">
|
||||
<a href="/demo/">示例<!-- <span class="layui-badge-dot"></span> --></a>
|
||||
|
BIN
Examples/website/FreeSql.Site.UI/wwwroot/images/banner_index.jpg
Normal file
BIN
Examples/website/FreeSql.Site.UI/wwwroot/images/banner_index.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
x
Reference in New Issue
Block a user