Add support page, admin features, and auth hardening.
Rename public affiliate route to /support with localized nav labels, and include affiliate/social/wallpaper admin, 2FA login, and related site updates. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
202dc16a52
commit
fc45c35dbe
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
@@ -5,34 +5,142 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>atakanozban.com Admin Panel</title>
|
||||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" />
|
||||
<link rel="font-awesome" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
background-color: #212529;
|
||||
}
|
||||
|
||||
.admin-sidebar {
|
||||
width: 260px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.admin-sidebar .nav-link {
|
||||
color: rgba(255, 255, 255, .7);
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
||||
.admin-sidebar .nav-link i {
|
||||
width: 1.25rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admin-sidebar .nav-link:hover {
|
||||
color: #fff;
|
||||
background-color: rgba(255, 255, 255, .08);
|
||||
}
|
||||
|
||||
.admin-sidebar .nav-link.active {
|
||||
color: #fff;
|
||||
background-color: #0d6efd;
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.admin-user-toggle {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.admin-user-toggle:hover {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="w3-sidebar w3-bar-block bg-dark" style="width: 25%; color: #212529">
|
||||
<h3 class="w3-bar-item text-white">Menu</h3>
|
||||
<a href="/myprojects/index" class="w3-bar-item text-decoration-none text-white" target="_blank">Go to site</a>
|
||||
<a href="/login/logout" class="w3-bar-item text-decoration-none text-white">Sign out</a>
|
||||
</div>
|
||||
@{
|
||||
var currentPath = (Request.Url != null ? Request.Url.AbsolutePath : "").ToLowerInvariant();
|
||||
Func<string, bool> isActive = path => currentPath.StartsWith(path.ToLowerInvariant());
|
||||
var isDashboard = currentPath == "/admin" || currentPath == "/admin/" || currentPath.StartsWith("/admin/index");
|
||||
}
|
||||
<div class="d-flex">
|
||||
<div class="admin-sidebar d-flex flex-column flex-shrink-0 p-3 text-bg-dark">
|
||||
<a href="/admin" class="d-flex align-items-center mb-3 text-white text-decoration-none">
|
||||
<i class="fa-solid fa-shield-halved fs-4 me-2"></i>
|
||||
<span class="fs-4">Admin Panel</span>
|
||||
</a>
|
||||
<hr class="text-white-50" />
|
||||
|
||||
<!-- Page Content -->
|
||||
<div style="margin-left: 25%">
|
||||
<div class="w3-container w3-teal">
|
||||
<h1>atakanozban.com Admin Panel</h1>
|
||||
<ul class="nav nav-pills flex-column mb-auto">
|
||||
<li class="nav-item">
|
||||
<a href="/admin" class="nav-link @(isDashboard ? "active" : "")">
|
||||
<i class="fa-solid fa-gauge me-2"></i>Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/myprojects" class="nav-link @(isActive("/admin/myprojects") ? "active" : "")">
|
||||
<i class="fa-solid fa-diagram-project me-2"></i>My Projects
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/affiliatelinks" class="nav-link @(isActive("/admin/affiliatelinks") ? "active" : "")">
|
||||
<i class="fa-solid fa-link me-2"></i>Affiliate Links
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/socialicons" class="nav-link @(isActive("/admin/socialicons") || isActive("/admin/newsocialicon") || isActive("/admin/socialiconget") ? "active" : "")">
|
||||
<i class="fa-solid fa-share-nodes me-2"></i>Social Icons
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/wallpaper" class="nav-link @(isActive("/admin/wallpaper") ? "active" : "")">
|
||||
<i class="fa-solid fa-image me-2"></i>Wallpaper
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr class="text-white-50" />
|
||||
|
||||
<div class="dropdown">
|
||||
<a href="#" class="admin-user-toggle d-flex align-items-center dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fa-solid fa-circle-user fs-3 me-2"></i>
|
||||
<strong>@(User?.Identity?.Name ?? "Admin")</strong>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-dark text-small shadow">
|
||||
<li><a class="dropdown-item" href="/admin/usersettings"><i class="fa-solid fa-user-gear me-2"></i>User Settings</a></li>
|
||||
<li><a class="dropdown-item" href="/" target="_blank"><i class="fa-solid fa-arrow-up-right-from-square me-2"></i>Go to site</a></li>
|
||||
<li><hr class="dropdown-divider" /></li>
|
||||
<li><a class="dropdown-item" href="/login/logout"><i class="fa-solid fa-right-from-bracket me-2"></i>Sign out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w3-container bg-dark">
|
||||
|
||||
<div class="admin-content p-4">
|
||||
@RenderBody()
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
body {
|
||||
background-color: #212529; /* Bootstrap's dark bg color */
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="modal fade" id="pasteImageModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content bg-dark text-white border border-secondary">
|
||||
<div class="modal-header border-secondary">
|
||||
<h5 class="modal-title">Paste Image</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body text-center">
|
||||
<div id="pasteImageTarget" contenteditable="true" spellcheck="false"
|
||||
class="border border-secondary rounded p-5 mb-3 text-white-50"
|
||||
style="outline:none;cursor:text;min-height:120px;display:flex;align-items:center;justify-content:center;">
|
||||
Click here, then press Ctrl+V to paste your image
|
||||
</div>
|
||||
<img id="pasteImageModalPreview" style="display:none;max-width:100%;max-height:220px;border-radius:6px;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="@Url.Content("~/web_atakanozbancom/assets/js/paste-upload.js")"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
@using Resources
|
||||
|
||||
@{
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@@ -178,6 +176,8 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
@Html.Action("wallpaper", "main")
|
||||
|
||||
<link href="~/web_atakanozbancom/assets/css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
@@ -196,9 +196,10 @@
|
||||
<div>
|
||||
<h3 class="float-md-start mb-0">Atakan</h3>
|
||||
<nav class="nav nav-masthead justify-content-center float-md-end">
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","main")">@Resource.NavHome</a>
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" aria-current="page" href="@Url.Action("index","about")">@Resource.NavAboutMe</a>
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="Home" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","myprojects")">@Resource.NavMyProjects</a> @{
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","main")">@atakanozbancom.App_GlobalResources.Resource.NavHome</a>
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" aria-current="page" href="@Url.Action("index","about")">@atakanozbancom.App_GlobalResources.Resource.NavAboutMe</a>
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","myprojects")">@atakanozbancom.App_GlobalResources.Resource.NavMyProjects</a>
|
||||
<a class="nav-link fw-bold py-1 px-0" asp-controller="main" asp-action="ChangeLanguage" asp-route-lang="en" href="@Url.Action("index","support")">@atakanozbancom.App_GlobalResources.Resource.NavAffiliateLinks</a> @{
|
||||
var currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
|
||||
var back = Request.RawUrl;
|
||||
}
|
||||
@@ -219,32 +220,9 @@
|
||||
@RenderBody()
|
||||
|
||||
<footer class="mt-auto text-white-50">
|
||||
<a class="text-decoration-underline text-white-50" href="https://link.atakanozban.com/status">@Resource.Server</a>
|
||||
<a class="text-decoration-underline text-white-50" href="https://link.atakanozban.com/status">@atakanozbancom.App_GlobalResources.Resource.Server</a>
|
||||
<div class="icons mb-2 mt-2">
|
||||
<a href="https://link.atakanozban.com/youtube" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-youtube"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/odysee" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-odysee"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/dailymotion" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-dailymotion"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/spotify" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-spotify"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/instagram" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-instagram"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/facebook" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-facebook"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/github" class="text-decoration-none text-white-50">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
<a href="https://link.atakanozban.com/stream" class="text-decoration-none text-white-50">
|
||||
<i class="fa-solid fa-link"></i>
|
||||
</a>
|
||||
@Html.Action("socialicons", "main")
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user