diff options
Diffstat (limited to 'samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared')
4 files changed, 84 insertions, 0 deletions
diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Error.cshtml b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Error.cshtml new file mode 100644 index 0000000..be55b17 --- /dev/null +++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Error.cshtml @@ -0,0 +1,9 @@ +@model System.Web.Mvc.HandleErrorInfo + +@{ + ViewBag.Title = "Error"; +} + +<h1 class="text-danger">Error.</h1> +<h2 class="text-danger">An error occurred while processing your request.</h2> + diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Lockout.cshtml b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Lockout.cshtml new file mode 100644 index 0000000..8658ff2 --- /dev/null +++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/Lockout.cshtml @@ -0,0 +1,10 @@ +@model System.Web.Mvc.HandleErrorInfo + +@{ + ViewBag.Title = "Locked Out"; +} + +<hgroup> + <h1 class="text-danger">Locked out.</h1> + <h2 class="text-danger">This account has been locked out, please try again later.</h2> +</hgroup> diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_Layout.cshtml b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..20b7dde --- /dev/null +++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_Layout.cshtml @@ -0,0 +1,43 @@ +@using Microsoft.AspNet.Identity +<!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> + @Styles.Render("~/Content/css") + @Scripts.Render("~/bundles/modernizr") + +</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"> + <li>@Html.ActionLink("Home", "Index", "Home")</li> + <li>@Html.ActionLink("Claims", "Claims", "Home")</li> + </ul> + </div> + </div> + </div> + <div class="container body-content"> + @RenderBody() + <hr /> + <footer> + <p>© @DateTime.Now.Year - My ASP.NET Application</p> + </footer> + </div> + + @Scripts.Render("~/bundles/jquery") + @Scripts.Render("~/bundles/bootstrap") + @RenderSection("scripts", required: false) +</body> +</html> diff --git a/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml new file mode 100644 index 0000000..f996508 --- /dev/null +++ b/samples/DotNetOpenAuth.Samples.OpenIDConnectRP/Views/Shared/_LoginPartial.cshtml @@ -0,0 +1,22 @@ +@using Microsoft.AspNet.Identity +@if (Request.IsAuthenticated) +{ + using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) + { + @Html.AntiForgeryToken() + + <ul class="nav navbar-nav navbar-right"> + <li> + @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" }) + </li> + <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li> + </ul> + } +} +else +{ + <ul class="nav navbar-nav navbar-right"> + <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li> + <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li> + </ul> +} |