7.3.2 Adding the Layout, View Start File and View; Creating empty view
This commit is contained in:
parent
1ffd5ba6ad
commit
704fba490c
18
SportsStore/SportsStore.WebUI/Content/Site.css
Normal file
18
SportsStore/SportsStore.WebUI/Content/Site.css
Normal file
@ -0,0 +1,18 @@
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Set padding to keep content from hitting the edges */
|
||||
.body-content {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* Set width on the form input elements since they're 100% wide by default */
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
max-width: 280px;
|
||||
}
|
||||
|
@ -103,6 +103,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
@ -119,6 +120,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\web.config" />
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
<Content Include="Views\Product\List.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
@ -129,7 +133,6 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Views\Product\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SportsStore.Domain\SportsStore.Domain.csproj">
|
||||
|
8
SportsStore/SportsStore.WebUI/Views/Product/List.cshtml
Normal file
8
SportsStore/SportsStore.WebUI/Views/Product/List.cshtml
Normal file
@ -0,0 +1,8 @@
|
||||
@model SportsStore.Domain.Entities.Product
|
||||
|
||||
@{
|
||||
ViewBag.Title = "List";
|
||||
}
|
||||
|
||||
<h2>List</h2>
|
||||
|
40
SportsStore/SportsStore.WebUI/Views/Shared/_Layout.cshtml
Normal file
40
SportsStore/SportsStore.WebUI/Views/Shared/_Layout.cshtml
Normal file
@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - My ASP.NET Application</title>
|
||||
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
|
||||
<link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<script src="~/Scripts/modernizr-2.8.3.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="~/Scripts/jquery-3.4.1.min.js"></script>
|
||||
<script src="~/Scripts/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
3
SportsStore/SportsStore.WebUI/Views/_ViewStart.cshtml
Normal file
3
SportsStore/SportsStore.WebUI/Views/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user