hallo
This commit is contained in:
25
Desktop/hallo/LEA/Views/Shared/Error.cshtml
Normal file
25
Desktop/hallo/LEA/Views/Shared/Error.cshtml
Normal file
@@ -0,0 +1,25 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
97
Desktop/hallo/LEA/Views/Shared/_Layout.cshtml
Normal file
97
Desktop/hallo/LEA/Views/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,97 @@
|
||||
@using LEA.Models
|
||||
@inject UserManager<ApplicationUser> UserManager
|
||||
@{
|
||||
ApplicationUser? currentUser = null;
|
||||
if (User.Identity?.IsAuthenticated ?? false)
|
||||
{
|
||||
currentUser = await UserManager.GetUserAsync(User);
|
||||
}
|
||||
|
||||
var displayName = currentUser?.FullName;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>@ViewData["Title"] - LEA Bewerbungs-Tracker</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/LEA.styles.css" asp-append-version="true" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<nav class="main-nav">
|
||||
<a class="brand" asp-controller="Home" asp-action="Index">LEA Bewerbungs-Tracker</a>
|
||||
<button class="nav-toggle" type="button" aria-label="Navigation umschalten" data-target="primary-nav">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<div class="nav-menu" id="primary-nav">
|
||||
<ul class="nav-links">
|
||||
<li><a asp-controller="Home" asp-action="Index" class="@(ViewContext.RouteData.Values["controller"]?.ToString() == "Home" ? "active" : null)">Start</a></li>
|
||||
@if (User.Identity?.IsAuthenticated ?? false)
|
||||
{
|
||||
<li><a asp-controller="Applications" asp-action="Index" class="@(ViewContext.RouteData.Values["controller"]?.ToString() == "Applications" ? "active" : null)">Bewerbungen</a></li>
|
||||
}
|
||||
<li><a asp-controller="Home" asp-action="Privacy">Datenschutz</a></li>
|
||||
</ul>
|
||||
<div class="nav-actions">
|
||||
@if (User.Identity?.IsAuthenticated ?? false)
|
||||
{
|
||||
<span class="nav-user">Hallo, @(string.IsNullOrWhiteSpace(displayName) ? User.Identity?.Name : displayName)</span>
|
||||
<form asp-controller="Account" asp-action="Logout" method="post">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-outline">Abmelden</button>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="btn btn-link" asp-controller="Account" asp-action="Login">Anmelden</a>
|
||||
<a class="btn btn-primary" asp-controller="Account" asp-action="Register">Registrieren</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="flash-container">
|
||||
@if (TempData["Success"] is string successMessage)
|
||||
{
|
||||
<div class="flash-message success" role="status">
|
||||
<span>@successMessage</span>
|
||||
<button type="button" class="flash-close" aria-label="Meldung schließen">×</button>
|
||||
</div>
|
||||
}
|
||||
@if (TempData["Error"] is string errorMessage)
|
||||
{
|
||||
<div class="flash-message error" role="status">
|
||||
<span>@errorMessage</span>
|
||||
<button type="button" class="flash-close" aria-label="Meldung schließen">×</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<main class="site-main">
|
||||
@RenderBody()
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="footer-inner">
|
||||
<p>© @DateTime.Now.Year LEA Bewerbungs-Tracker</p>
|
||||
<div class="footer-links">
|
||||
<a asp-controller="Home" asp-action="Index">Start</a>
|
||||
<a asp-controller="Home" asp-action="Privacy">Datenschutz</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js" crossorigin="anonymous"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
48
Desktop/hallo/LEA/Views/Shared/_Layout.cshtml.css
Normal file
48
Desktop/hallo/LEA/Views/Shared/_Layout.cshtml.css
Normal file
@@ -0,0 +1,48 @@
|
||||
/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
|
Reference in New Issue
Block a user