Rename project identity from RazorPagesMovie to BewerbungsSeite
Deploy Staging / deploy (push) Successful in 1m44s
Deploy Staging / deploy (push) Successful in 1m44s
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
@page
|
||||
@model BewerbungsSeite.Pages.Admin.IndexModel
|
||||
@{
|
||||
ViewData["Title"] = "Admin";
|
||||
}
|
||||
|
||||
<h1>Welcome, @User.Identity?.Name</h1>
|
||||
|
||||
<form method="post" asp-page-handler="Logout">
|
||||
<button type="submit" class="btn btn-secondary">Logout</button>
|
||||
</form>
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace BewerbungsSeite.Pages.Admin;
|
||||
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostLogoutAsync()
|
||||
{
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
return RedirectToPage("/Login");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
@page
|
||||
@model ErrorModel
|
||||
@{
|
||||
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 the <strong>Development</strong> environment displays 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>
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace BewerbungsSeite.Pages
|
||||
{
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public class ErrorModel : PageModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
private readonly ILogger<ErrorModel> _logger;
|
||||
|
||||
public ErrorModel(ILogger<ErrorModel> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace BewerbungsSeite.Pages
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
@page
|
||||
@model BewerbungsSeite.Pages.LoginModel
|
||||
@{
|
||||
ViewData["Title"] = "Login";
|
||||
}
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<h1>Admin Login</h1>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.ErrorMessage))
|
||||
{
|
||||
<div class="alert alert-danger">@Model.ErrorMessage</div>
|
||||
}
|
||||
|
||||
<form method="post">
|
||||
<div class="mb-3">
|
||||
<label asp-for="Username" class="form-label"></label>
|
||||
<input asp-for="Username" class="form-control" autofocus />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label asp-for="Password" class="form-label"></label>
|
||||
<input asp-for="Password" type="password" class="form-control" />
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using BewerbungsSeite.Data;
|
||||
using BewerbungsSeite.Models;
|
||||
|
||||
namespace BewerbungsSeite.Pages;
|
||||
|
||||
public class LoginModel : PageModel
|
||||
{
|
||||
private readonly RazorPagesMovieContext _context;
|
||||
|
||||
public LoginModel(RazorPagesMovieContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
[BindProperty]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
[BindProperty]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostAsync(string? returnUrl)
|
||||
{
|
||||
var user = await _context.AdminUser.SingleOrDefaultAsync(u => u.Username == Username);
|
||||
var hasher = new PasswordHasher<AdminUser>();
|
||||
|
||||
if (user is null || hasher.VerifyHashedPassword(user, user.PasswordHash, Password) == PasswordVerificationResult.Failed)
|
||||
{
|
||||
ErrorMessage = "Benutzername oder Passwort ist falsch.";
|
||||
return Page();
|
||||
}
|
||||
|
||||
var identity = new ClaimsIdentity(
|
||||
new[] { new Claim(ClaimTypes.Name, user.Username) },
|
||||
CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity));
|
||||
|
||||
return LocalRedirect(returnUrl ?? "/Admin");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>@Html.Raw(ViewData["Title"])</title>
|
||||
<link rel="icon" type="image/png" href="~/images/fav-icon/icon.png" />
|
||||
|
||||
<link rel="stylesheet" href="~/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/css/owl.carousel.min.css" />
|
||||
<link rel="stylesheet" href="~/css/nivo-slider.css" />
|
||||
<link rel="stylesheet" href="~/css/animate.css" />
|
||||
<link rel="stylesheet" href="~/css/animated-text.css" />
|
||||
<link rel="stylesheet" href="~/css/all.min.css" />
|
||||
<link rel="stylesheet" href="~/css/flaticon.css" />
|
||||
<link rel="stylesheet" href="~/css/theme-default.css" />
|
||||
<link rel="stylesheet" href="~/css/meanmenu.min.css" />
|
||||
<link rel="stylesheet" href="~/css/style.css" />
|
||||
|
||||
<link rel="stylesheet" href="~/css/owl.transitions.css" />
|
||||
<link rel="stylesheet" href="~/css/widget.css" />
|
||||
<link rel="stylesheet" href="~/css/responsive.css" />
|
||||
<link rel="stylesheet" href="~/css/slick.css" />
|
||||
<link rel="stylesheet" href="~/css/slick-theme.css" />
|
||||
|
||||
<style>
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@await RenderSectionAsync("Styles", required: false)
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="sticky-header" class="techno_nav_manu style-two portfolio-header">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-4">
|
||||
<a class="portfolio-brand" href="#hero">Francesco Lorenzo D'Amico</a>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<nav class="techno_menu text-center">
|
||||
<ul class="nav_scroll">
|
||||
<li><a href="#hero">Start</a></li>
|
||||
<li><a href="#about">Über mich</a></li>
|
||||
<li><a href="#skills">Kompetenzen</a></li>
|
||||
<li><a href="#projects">Projekte</a></li>
|
||||
<li><a href="#goals">Ziele</a></li>
|
||||
<li><a href="#experience">Erfahrung</a></li>
|
||||
<li><a href="#documents">Dokumente</a></li>
|
||||
<li><a href="#contact">Kontakt</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mobile-menu-area d-sm-block d-md-block d-lg-none">
|
||||
<div class="mobile-menu">
|
||||
<nav class="techno_menu">
|
||||
<ul class="nav_scroll">
|
||||
<li><a href="#hero">Start</a></li>
|
||||
<li><a href="#about">Über mich</a></li>
|
||||
<li><a href="#skills">Kompetenzen</a></li>
|
||||
<li><a href="#projects">Projekte</a></li>
|
||||
<li><a href="#goals">Ziele</a></li>
|
||||
<li><a href="#experience">Erfahrung</a></li>
|
||||
<li><a href="#documents">Dokumente</a></li>
|
||||
<li><a href="#contact">Kontakt</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<footer class="footer-middle portfolio-footer">
|
||||
<div class="container">
|
||||
<div class="row footer-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="footer-bottom-content">
|
||||
<div class="footer-bottom-content-copy">
|
||||
<p>© 2026 Francesco Lorenzo D'Amico</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<div class="scroll-area">
|
||||
<div class="top-wrap">
|
||||
<div class="go-top-btn-wraper">
|
||||
<div class="go-top go-top-button">
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
<i class="fas fa-arrow-up"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="~/js/jquery-1.9.0.min.js"></script>
|
||||
<script src="~/js/bootstrap.min.js"></script>
|
||||
<script src="~/js/owl.carousel.min.js"></script>
|
||||
<script src="~/js/jquery.counterup.min.js"></script>
|
||||
<script src="~/js/waypoints.min.js"></script>
|
||||
<script src="~/js/wow.js"></script>
|
||||
<script src="~/js/imagesloaded.pkgd.min.js"></script>
|
||||
<script src="~/js/ajax-mail.js"></script>
|
||||
<script src="~/js/animated-text.js"></script>
|
||||
<script src="~/js/isotope.pkgd.min.js"></script>
|
||||
<script src="~/js/jquery.nivo.slider.pack.js"></script>
|
||||
<script src="~/js/jquery.meanmenu.js"></script>
|
||||
<script src="~/js/popper.min.js"></script>
|
||||
<script src="~/js/jquery.scrollUp.js"></script>
|
||||
<script src="~/js/theme.js"></script>
|
||||
<script src="~/js/slick.js"></script>
|
||||
<script src="~/js/slick.min.js"></script>
|
||||
<script src="~/js/jquery.barfiller.js"></script>
|
||||
|
||||
<script>
|
||||
$(window).on("scroll", function () {
|
||||
var scrolled = $(window).scrollTop();
|
||||
if (scrolled > 300) $(".go-top").addClass("active");
|
||||
if (scrolled < 300) $(".go-top").removeClass("active");
|
||||
});
|
||||
|
||||
$(".go-top").on("click", function () {
|
||||
$("html, body").animate({ scrollTop: "0" }, 1200);
|
||||
});
|
||||
</script>
|
||||
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
@@ -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,3 @@
|
||||
@using BewerbungsSeite
|
||||
@namespace BewerbungsSeite.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
Reference in New Issue
Block a user