码迷,mamicode.com
首页 > Web开发 > 详细

ASP.NET Core项目笔记

时间:2017-05-18 14:49:15      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:env   lin   als   com   str   contain   模板   false   lib   

bootstrap4模板

_layout.cshtml

@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - SimpleChat</title>

    <environment names="Development">
    </environment>
    <environment names="Staging,Production">
    </environment>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
    @Html.Raw(JavaScriptSnippet.FullScript)
</head>
<body>
    <nav class="navbar navbar-toggleable-sm navbar-light bg-faded">
        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarContent">
            <span class="navbar-toggler-icon"></span>
        </button>
        <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">SimpleChat</a>

        <div class="collapse navbar-collapse" id="navbarContent">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" asp-area="" asp-controller="Home" asp-action="About">About</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Contact">Contact</a>
                </li>
            </ul>
        </div>
    </nav>
    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; 2017 - SimpleChat</p>
        </footer>
    </div>

    <environment names="Development">
    </environment>
    <environment names="Staging,Production">
    </environment>
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
    @RenderSection("Scripts", required: false)
</body>
</html>

bootstrap模板图

技术分享

 

ASP.NET Core项目笔记

标签:env   lin   als   com   str   contain   模板   false   lib   

原文地址:http://www.cnblogs.com/naergaga/p/6873053.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!