Skip to content

Commit

Permalink
Cleanup the MVC project (OrchardCMS#15115)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored and urbanit committed Mar 18, 2024
1 parent c49cff7 commit 9bb8775
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/OrchardCore.Cms.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

app.UseOrchardCore();

app.Run();
await app.RunAsync();
2 changes: 1 addition & 1 deletion src/OrchardCore.Cms.Web/wwwroot/.placeholder
Original file line number Diff line number Diff line change
@@ -1 +1 @@
��

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<!-- NuGet properties-->
<Title>OrchardCore Hello World MVC module </Title>
<Description>$(OCFrameworkDescription)
<Description>
$(OCFrameworkDescription)

Sample Orchard Core Framework module for MVC.</Description>
Sample Orchard Core Framework module for MVC.
</Description>
<PackageTags>$(PackageTags) OrchardCoreFramework</PackageTags>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
<h1>Hello World</h1>

<div class="card text-bg-light">
<div class="card-body text-center">
<h2>Hello World</h2>
<h3>This message is from the Hello World Module</h3>
</div>
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Mvc.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

app.UseOrchardCore();

app.Run();
await app.RunAsync();
64 changes: 30 additions & 34 deletions src/OrchardCore.Mvc.Web/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - MvcSandbox</title>
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/css/bootstrap.min.css" />
<style>
.body-content {
margin-top: 50px;
}
</style>
<title>@ViewData["Title"]</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-bs-toggle="collapse" data-bs-target=".navbar-collapse">
<span class="visually-hidden">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">WebApplication1</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a asp-controller="Home" asp-action="Index" class="navbar-brand">MvcSandbox</a>
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-light" href="#">Home</a>
</li>
</ul>
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a asp-controller="Home" asp-action="Index">Home</a></li>
</ul>
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>&copy; 2015 - MvcSandbox</p>
</footer>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>

<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js"></script>

@RenderSection("scripts", required: false)
<footer class="border-top footer text-muted">
<div class="container text-center">
&copy; 2024 - <a href="#">Privacy</a>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

0 comments on commit 9bb8775

Please sign in to comment.