Initial commit: open-source release of atakanozban.com
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
@{
|
||||
ViewBag.Title = "About";
|
||||
}
|
||||
<main aria-labelledby="title">
|
||||
<h2 id="title">@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
||||
</main>
|
||||
@@ -0,0 +1,19 @@
|
||||
@{
|
||||
ViewBag.Title = "Contact";
|
||||
}
|
||||
<main aria-labelledby="title">
|
||||
<h2 id="title">@ViewBag.Title.</h2>
|
||||
<h3>@ViewBag.Message</h3>
|
||||
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
||||
</main>
|
||||
@@ -0,0 +1,33 @@
|
||||
@{
|
||||
ViewBag.Title = "Home Page";
|
||||
}
|
||||
|
||||
<main>
|
||||
<section class="row" aria-labelledby="aspnetTitle">
|
||||
<h1 id="title">ASP.NET</h1>
|
||||
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
|
||||
<p><a href="https://asp.net" class="btn btn-primary btn-md">Learn more »</a></p>
|
||||
</section>
|
||||
|
||||
<div class="row">
|
||||
<section class="col-md-4" aria-labelledby="gettingStartedTitle">
|
||||
<h2 id="gettingStartedTitle">Getting started</h2>
|
||||
<p>
|
||||
ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
|
||||
enables a clean separation of concerns and gives you full control over markup
|
||||
for enjoyable, agile development.
|
||||
</p>
|
||||
<p><a class="btn btn-outline-dark" href="https://go.microsoft.com/fwlink/?LinkId=301865">Learn more »</a></p>
|
||||
</section>
|
||||
<section class="col-md-4" aria-labelledby="librariesTitle">
|
||||
<h2 id="librariesTitle">Get more libraries</h2>
|
||||
<p>NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.</p>
|
||||
<p><a class="btn btn-outline-dark" href="https://go.microsoft.com/fwlink/?LinkId=301866">Learn more »</a></p>
|
||||
</section>
|
||||
<section class="col-md-4" aria-labelledby="hostingTitle">
|
||||
<h2 id="hostingTitle">Web Hosting</h2>
|
||||
<p>You can easily find a web hosting company that offers the right mix of features and price for your applications.</p>
|
||||
<p><a class="btn btn-outline-dark" href="https://go.microsoft.com/fwlink/?LinkId=301867">Learn more »</a></p>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Under Maintenance</title>
|
||||
</head>
|
||||
<body>
|
||||
<hgroup>
|
||||
<h1>Under Maintenance</h1>
|
||||
<h2>This page is updating right now. It'll be at your service soon.</h2>
|
||||
</hgroup>
|
||||
<a href="https://link.atakanozban.com/status">System Status</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.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>
|
||||
@{
|
||||
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" />
|
||||
|
||||
<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="/" 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="admin-content p-4">
|
||||
@RenderBody()
|
||||
</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>
|
||||
@@ -0,0 +1,232 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en" class="h-100" data-bs-theme="auto">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="In 2016, I started working on development...">
|
||||
<meta name="author" content="Atakan Doğan Özban">
|
||||
<meta name="keywords" content="atakandoganozban, atakan özban, atakan doğan özban, atakan ozban">
|
||||
<title>Atakan Doğan Özban</title>
|
||||
|
||||
<link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/cover/">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||||
|
||||
<style>
|
||||
|
||||
#preloader {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #181a1b;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
opacity: 1;
|
||||
animation: fadeout 1s forwards 2s;
|
||||
}
|
||||
|
||||
@@keyframes fadeout {
|
||||
from {
|
||||
opacity: 1;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
opacity: 0;
|
||||
animation: contentFadeIn 1s forwards 5s;
|
||||
}
|
||||
|
||||
@@keyframes contentFadeIn {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-height: 5vh;
|
||||
opacity: 0;
|
||||
animation: contentFadeIn 1s forwards 3.5s;
|
||||
}
|
||||
|
||||
@@keyframes contentFadeIn {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.index-title {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
min-height: 5vh;
|
||||
opacity: 0;
|
||||
animation: contentFadeIn 1s forwards 2.5s;
|
||||
}
|
||||
|
||||
@@keyframes contentFadeIn {
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.background-image {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url('web_atakanozbancom/assets/img/wp.jpg') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
opacity: 0.25;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.bd-placeholder-img {
|
||||
font-size: 1.125rem;
|
||||
text-anchor: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.b-example-divider {
|
||||
width: 100%;
|
||||
height: 3rem;
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
border: solid rgba(0, 0, 0, .15);
|
||||
border-width: 1px 0;
|
||||
box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
|
||||
}
|
||||
|
||||
.b-example-vr {
|
||||
flex-shrink: 0;
|
||||
width: 1.5rem;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.bi {
|
||||
vertical-align: -.125em;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.nav-scroller {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
height: 2.75rem;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.nav-scroller .nav {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
padding-bottom: 1rem;
|
||||
margin-top: -1px;
|
||||
overflow-x: auto;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.btn-bd-primary {
|
||||
--bd-violet-bg: #712cf9;
|
||||
--bd-violet-rgb: 112.520718, 44.062154, 249.437846;
|
||||
--bs-btn-font-weight: 600;
|
||||
--bs-btn-color: var(--bs-white);
|
||||
--bs-btn-bg: var(--bd-violet-bg);
|
||||
--bs-btn-border-color: var(--bd-violet-bg);
|
||||
--bs-btn-hover-color: var(--bs-white);
|
||||
--bs-btn-hover-bg: #6528e0;
|
||||
--bs-btn-hover-border-color: #6528e0;
|
||||
--bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
|
||||
--bs-btn-active-color: var(--bs-btn-hover-color);
|
||||
--bs-btn-active-bg: #5a23c8;
|
||||
--bs-btn-active-border-color: #5a23c8;
|
||||
}
|
||||
|
||||
.bd-mode-toggle {
|
||||
z-index: 1500;
|
||||
}
|
||||
|
||||
.bd-mode-toggle .dropdown-menu .active .bi {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@Html.Action("wallpaper", "main")
|
||||
|
||||
<link href="~/web_atakanozbancom/assets/css/style.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="d-flex h-100 text-center text-bg-dark">
|
||||
|
||||
<div id="preloader">
|
||||
<div class="spinner-border text-primary" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="background-image"></div>
|
||||
|
||||
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
|
||||
<header class="mb-auto">
|
||||
<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="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","affiliate")">@atakanozbancom.App_GlobalResources.Resource.NavAffiliateLinks</a> @{
|
||||
var currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.Name;
|
||||
var back = Request.RawUrl;
|
||||
}
|
||||
|
||||
@if (currentCulture.StartsWith("tr"))
|
||||
{
|
||||
<a href="@Url.Action("ChangeLanguage", "Main", new { lang = "en-US", returnUrl = back })" class="nav-link fw-bold py-1 px-0">EN</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.Action("ChangeLanguage", "Main", new { lang = "tr-TR", returnUrl = back })" class="nav-link fw-bold py-1 px-0">TR</a>
|
||||
}
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<footer class="mt-auto text-white-50">
|
||||
<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">
|
||||
@Html.Action("socialicons", "main")
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="atakanozbancom" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
|
||||
<system.web>
|
||||
<compilation>
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
</configuration>
|
||||
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
|
||||
<main class="px-3">
|
||||
<h1 class="mb-3">@atakanozbancom.App_GlobalResources.Resource.AboutMeTitle</h1>
|
||||
<p class="mb-5 text-start">
|
||||
@atakanozbancom.App_GlobalResources.Resource.About1
|
||||
<br /> <br />
|
||||
@atakanozbancom.App_GlobalResources.Resource.About2
|
||||
<br /> <br />
|
||||
@atakanozbancom.App_GlobalResources.Resource.About3
|
||||
<br /> <br />
|
||||
@atakanozbancom.App_GlobalResources.Resource.About4
|
||||
</p>
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
@model atakanozbancom.Models.classes.AdminAffiliateLinkVM
|
||||
@{
|
||||
ViewBag.Title = "affiliatelinkget";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="mt-3 text-white">Edit Affiliate Link</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("affiliatelinkget", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.HiddenFor(m => m.id)
|
||||
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Current Logo</label><br />
|
||||
<img id="logoPreview" src="@Model.existingImage" alt="@Model.TitleEN" style="@(string.IsNullOrWhiteSpace(Model.existingImage) ? "display:none;" : "")width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" />
|
||||
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white mt-2" accept="image/*" />
|
||||
<small class="text-muted">Leave empty to keep the current logo. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.url, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white", rows = 2 })
|
||||
</div>
|
||||
|
||||
<h3 class="mt-3 text-white">Translation (TR)</h3>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white", rows = 2 })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
enablePasteUpload('#logoFile', '#logoPreview');
|
||||
</script>
|
||||
@@ -0,0 +1,48 @@
|
||||
@using atakanozbancom.Models.classes
|
||||
@model List<affiliatelink>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "affiliatelinks";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Affiliate Links</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<tr class="bg-dark text-white">
|
||||
<th class="bg-dark text-white">Logo</th>
|
||||
<th class="bg-dark text-white">Title</th>
|
||||
<th class="bg-dark text-white">Description</th>
|
||||
<th class="bg-dark text-white">URL</th>
|
||||
<th class="bg-dark text-white">Order</th>
|
||||
<th class="bg-dark text-white">Edit</th>
|
||||
<th class="bg-dark text-white">Delete</th>
|
||||
</tr>
|
||||
@foreach (var x in Model)
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white"><img src="@x.image" alt="@x.title" style="width:40px;height:40px;object-fit:contain;background:#fff;border-radius:4px;padding:2px;" /></td>
|
||||
<td class="bg-dark text-white">@x.title</td>
|
||||
<td class="bg-dark text-white">@x.description</td>
|
||||
<td class="bg-dark text-white" style="word-break:break-all;">@x.url</td>
|
||||
<td class="bg-dark text-white">@x.sort_order</td>
|
||||
<td class="bg-dark text-white"><a href="/admin/affiliatelinkget/@x.id" class="btn btn-primary">Edit</a></td>
|
||||
<td class="bg-dark text-white">
|
||||
@using (Html.BeginForm("affiliatelinkdelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this affiliate link?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (!Model.Any())
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white-50" colspan="7">No affiliate links yet.</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<a href="/admin/newaffiliatepost" class="btn btn-primary">Create New Affiliate Link</a>
|
||||
@@ -0,0 +1,38 @@
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Dashboard</h2>
|
||||
<p class="text-white-50">Welcome back! Choose a section from the menu on the left to get started.</p>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="bg-dark border border-secondary rounded p-4 text-white">
|
||||
<h4>My Projects</h4>
|
||||
<p class="text-white-50 mb-3">@ViewBag.MyProjectsCount post(s) published.</p>
|
||||
<a href="/admin/myprojects" class="btn btn-primary">Manage My Projects</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="bg-dark border border-secondary rounded p-4 text-white">
|
||||
<h4>Affiliate Links</h4>
|
||||
<p class="text-white-50 mb-3">@ViewBag.AffiliateLinksCount link(s) published.</p>
|
||||
<a href="/admin/affiliatelinks" class="btn btn-primary">Manage Affiliate Links</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="bg-dark border border-secondary rounded p-4 text-white">
|
||||
<h4>Social Icons</h4>
|
||||
<p class="text-white-50 mb-3">@ViewBag.SocialIconsCount icon(s) in the footer.</p>
|
||||
<a href="/admin/socialicons" class="btn btn-primary">Manage Social Icons</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="bg-dark border border-secondary rounded p-4 text-white">
|
||||
<h4>Wallpaper</h4>
|
||||
<p class="text-white-50 mb-3">Change the background image used across the site.</p>
|
||||
<a href="/admin/wallpaper" class="btn btn-primary">Manage Wallpaper</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
@using atakanozbancom.Models.classes
|
||||
@model List<myprojects>
|
||||
|
||||
|
||||
@{
|
||||
ViewBag.Title = "myprojects";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">My Projects</h2>
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<tr class="bg-dark text-white">
|
||||
<th class="bg-dark text-white">ID</th>
|
||||
<th class="bg-dark text-white">Title</th>
|
||||
<th class="bg-dark text-white">Description</th>
|
||||
<th class="bg-dark text-white">Edit</th>
|
||||
<th class="bg-dark text-white">Delete</th>
|
||||
</tr>
|
||||
@foreach (var x in Model)
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white">@x.id</td>
|
||||
<td class="bg-dark text-white">@x.title</td>
|
||||
<td class="bg-dark text-white">@x.description</td>
|
||||
<td class="bg-dark text-white"><a href="/admin/myprojectsget/@x.id" class="btn btn-primary">Edit</a></td>
|
||||
<td class="bg-dark text-white">
|
||||
@using (Html.BeginForm("myprojectsdelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this project?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
<a href="/admin/newmppost" class="btn btn-primary">Create New Post</a>
|
||||
@@ -0,0 +1,143 @@
|
||||
@model atakanozbancom.Models.classes.AdminMyProjectsEditVM
|
||||
|
||||
@{
|
||||
ViewBag.Title = "myprojectsget";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="mt-3 text-white">My Projects Edit Post</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("myprojectsget", "admin", FormMethod.Post,
|
||||
new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.HiddenFor(m => m.id)
|
||||
|
||||
@Html.LabelFor(x => x.id, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(x => x.id, new { @class = "form-control bg-dark text-white", @readonly = "readonly" })
|
||||
<br />
|
||||
|
||||
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white required" })
|
||||
<br />
|
||||
|
||||
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white required" })
|
||||
<small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
|
||||
<br />
|
||||
|
||||
<h3 class="mt-3 text-white">Translation</h3>
|
||||
@Html.LabelFor(m => m.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(m => m.TitleTR, new { @class = "form-control bg-dark text-white required" })
|
||||
<br />
|
||||
@Html.LabelFor(m => m.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(m => m.DescTR, new { @class = "form-control bg-dark text-white required" })
|
||||
<small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
|
||||
<br />
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<hr />
|
||||
<h3 class="mt-3 text-white">Media Manager</h3>
|
||||
|
||||
@if (Model.medias != null && Model.medias.Count > 0)
|
||||
{
|
||||
<div class="bg-dark p-3 rounded">
|
||||
@foreach (var m in Model.medias)
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="text-white">
|
||||
<b>@m.media_type</b>
|
||||
<span class="text-muted"> (order: @m.sort_order)</span>
|
||||
<div style="word-break:break-all;">@m.url</div>
|
||||
@*@if (!string.IsNullOrWhiteSpace(m.title))
|
||||
{
|
||||
<div class="text-muted">@m.title</div>
|
||||
}*@
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm("deletemedia", "admin", new { id = m.id, projectId = Model.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this media?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
|
||||
}
|
||||
</div>
|
||||
<hr class="text-muted" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-muted">No media for this project.</div>
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("addmedia", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="projectId" value="@Model.id" />
|
||||
|
||||
<div class="mb-2">
|
||||
<label class="text-white">Type</label>
|
||||
<select id="mediaType" name="mediaType" class="form-control bg-dark text-white">
|
||||
<option value="1">Image</option>
|
||||
<option value="2">Iframe</option>
|
||||
@*<option value="3">Video</option>*@
|
||||
@*<option value="4">Document</option>*@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- IFRAME URL -->
|
||||
<div id="urlWrap" class="mb-2" style="display:none;">
|
||||
<label class="text-white">URL</label>
|
||||
<input id="iframeUrl" name="iframeUrl" class="form-control bg-dark text-white" placeholder="https://..." />
|
||||
<small class="text-muted">Only for iframe embed links.</small>
|
||||
</div>
|
||||
|
||||
<!-- FILE UPLOAD -->
|
||||
<div id="fileWrap" class="mb-2">
|
||||
<label class="text-white">Upload</label>
|
||||
<img id="mediaFilePreview" style="display:none;max-width:160px;max-height:120px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" class="mb-2 d-block" />
|
||||
<input id="mediaFile" type="file" name="mediaFile" class="form-control bg-dark text-white" />
|
||||
<small class="text-muted">Upload image/document files. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Sort Order</label>
|
||||
<input name="sortOrder" type="number" value="0" class="form-control bg-dark text-white" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary">Add Media</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var sel = document.getElementById("mediaType");
|
||||
var urlWrap = document.getElementById("urlWrap");
|
||||
var fileWrap = document.getElementById("fileWrap");
|
||||
var iframeUrl = document.getElementById("iframeUrl");
|
||||
var mediaFile = document.getElementById("mediaFile");
|
||||
|
||||
function sync() {
|
||||
var isIframe = sel.value === "2"; // Iframe
|
||||
urlWrap.style.display = isIframe ? "block" : "none";
|
||||
fileWrap.style.display = isIframe ? "none" : "block";
|
||||
|
||||
// optional: clear the hidden field so server doesn't get junk
|
||||
if (isIframe) {
|
||||
if (mediaFile) mediaFile.value = "";
|
||||
} else {
|
||||
if (iframeUrl) iframeUrl.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
sel.addEventListener("change", sync);
|
||||
sync();
|
||||
})();
|
||||
|
||||
enablePasteUpload('#mediaFile', '#mediaFilePreview');
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
@model atakanozbancom.Models.classes.AdminAffiliateLinkVM
|
||||
@{
|
||||
ViewBag.Title = "Add New Affiliate Link";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3">Add New Affiliate Link</h2>
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("newaffiliatepost", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Logo</label>
|
||||
<img id="logoPreview" style="display:none;width:64px;height:64px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" class="mb-2" />
|
||||
<input id="logoFile" type="file" name="logoFile" class="form-control bg-dark text-white" accept="image/*" />
|
||||
<small class="text-muted">PNG, JPG, WEBP or GIF. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.url, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white", placeholder = "https://..." })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white", placeholder = "e.g. Hetzner" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white", rows = 2, placeholder = "e.g. Get $20 free credit" })
|
||||
</div>
|
||||
|
||||
<h3 class="mt-3 text-white">Translation (TR)</h3>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleTR, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white", rows = 2 })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
|
||||
<small class="text-muted">Lower numbers show first.</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
enablePasteUpload('#logoFile', '#logoPreview');
|
||||
</script>
|
||||
@@ -0,0 +1,140 @@
|
||||
@model atakanozbancom.Models.classes.AdminMyProjectsEditVM
|
||||
@{
|
||||
ViewBag.Title = "Add New Project";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3">Add New My Projects Post</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
<br />
|
||||
|
||||
@using (Html.BeginForm("newmppost", "admin", FormMethod.Post,
|
||||
new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleEN, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleEN, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescEN, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescEN, new { @class = "form-control bg-dark text-white" })
|
||||
<small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
|
||||
</div>
|
||||
|
||||
<h3 class="mt-3 text-white">Translation (TR)</h3>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.TitleTR, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.TitleTR, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.DescTR, new { @class = "text-white" })
|
||||
@Html.TextAreaFor(p => p.DescTR, new { @class = "form-control bg-dark text-white" })
|
||||
<small class="text-muted">To add a link, use: [Link text](https://example.com)</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<hr />
|
||||
<h3 class="mt-3 text-white">Media Manager</h3>
|
||||
|
||||
@if (Model.medias != null && Model.medias.Count > 0)
|
||||
{
|
||||
<div class="bg-dark p-3 rounded">
|
||||
@foreach (var m in Model.medias)
|
||||
{
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<div class="text-white">
|
||||
<b>@m.media_type</b>
|
||||
<span class="text-muted"> (order: @m.sort_order)</span>
|
||||
<div style="word-break:break-all;">@m.url</div>
|
||||
@*@if (!string.IsNullOrWhiteSpace(m.title))
|
||||
{
|
||||
<div class="text-muted">@m.title</div>
|
||||
}*@
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm("deletemedia", "admin", new { id = m.id, projectId = Model.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this media?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
|
||||
}
|
||||
</div>
|
||||
<hr class="text-muted" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-muted">No media for this project.</div>
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("addmedia", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" name="projectId" value="@Model.id" />
|
||||
|
||||
<div class="mb-2">
|
||||
<label class="text-white">Type</label>
|
||||
<select id="mediaType" name="mediaType" class="form-control bg-dark text-white">
|
||||
<option value="1">Image</option>
|
||||
<option value="2">Iframe</option>
|
||||
@*<option value="3">Video</option>*@
|
||||
@*<option value="4">Document</option>*@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- IFRAME URL -->
|
||||
<div id="urlWrap" class="mb-2" style="display:none;">
|
||||
<label class="text-white">URL</label>
|
||||
<input id="iframeUrl" name="iframeUrl" class="form-control bg-dark text-white" placeholder="https://..." />
|
||||
<small class="text-muted">Only for iframe embed links.</small>
|
||||
</div>
|
||||
|
||||
<!-- FILE UPLOAD -->
|
||||
<div id="fileWrap" class="mb-2">
|
||||
<label class="text-white">Upload</label>
|
||||
<img id="mediaFilePreview" style="display:none;max-width:160px;max-height:120px;object-fit:contain;background:#fff;border-radius:6px;padding:4px;" class="mb-2 d-block" />
|
||||
<input id="mediaFile" type="file" name="mediaFile" class="form-control bg-dark text-white" />
|
||||
<small class="text-muted">Upload image/document files. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">Sort Order</label>
|
||||
<input name="sortOrder" type="number" value="0" class="form-control bg-dark text-white" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary">Add Media</button>
|
||||
}
|
||||
|
||||
<script>(function () {
|
||||
var sel = document.getElementById("mediaType");
|
||||
var urlWrap = document.getElementById("urlWrap");
|
||||
var fileWrap = document.getElementById("fileWrap");
|
||||
var iframeUrl = document.getElementById("iframeUrl");
|
||||
var mediaFile = document.getElementById("mediaFile");
|
||||
|
||||
function sync() {
|
||||
var isIframe = sel.value === "2"; // Iframe
|
||||
urlWrap.style.display = isIframe ? "block" : "none";
|
||||
fileWrap.style.display = isIframe ? "none" : "block";
|
||||
|
||||
// optional: clear the hidden field so server doesn't get junk
|
||||
if (isIframe) {
|
||||
if (mediaFile) mediaFile.value = "";
|
||||
} else {
|
||||
if (iframeUrl) iframeUrl.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
sel.addEventListener("change", sync);
|
||||
sync();
|
||||
})();
|
||||
|
||||
enablePasteUpload('#mediaFile', '#mediaFilePreview');</script>
|
||||
@@ -0,0 +1,48 @@
|
||||
@model atakanozbancom.Models.classes.AdminSocialIconVM
|
||||
@{
|
||||
ViewBag.Title = "Add New Social Icon";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||||
|
||||
<h2 class="text-white mt-3">Add New Social Icon</h2>
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("newsocialicon", "admin", FormMethod.Post))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.icon, new { @class = "text-white" })
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-dark text-white fs-4" style="width:3rem;justify-content:center;">
|
||||
<i id="icon-preview" class="@Model.icon"></i>
|
||||
</span>
|
||||
@Html.TextBoxFor(p => p.icon, new { @class = "form-control bg-dark text-white", placeholder = "e.g. fa-brands fa-youtube", id = "icon-input" })
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
Any <a href="https://fontawesome.com/search?ic=brands" target="_blank" rel="noopener" class="text-info">Font Awesome</a> class name, e.g. <code>fa-brands fa-youtube</code> or <code>fa-solid fa-link</code>.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.url, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white", placeholder = "https://..." })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
|
||||
<small class="text-muted">Lower numbers show first.</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
document.getElementById('icon-input').addEventListener('input', function () {
|
||||
document.getElementById('icon-preview').className = this.value;
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,50 @@
|
||||
@model atakanozbancom.Models.classes.AdminSocialIconVM
|
||||
@{
|
||||
ViewBag.Title = "socialiconget";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||||
|
||||
<h2 class="mt-3 text-white">Edit Social Icon</h2>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
<hr />
|
||||
|
||||
@using (Html.BeginForm("socialiconget", "admin", FormMethod.Post))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
@Html.HiddenFor(m => m.id)
|
||||
@Html.ValidationSummary(false, "", new { @class = "alert alert-danger" + (ViewData.ModelState.IsValid ? " d-none" : "") })
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.icon, new { @class = "text-white" })
|
||||
<div class="input-group">
|
||||
<span class="input-group-text bg-dark text-white fs-4" style="width:3rem;justify-content:center;">
|
||||
<i id="icon-preview" class="@Model.icon"></i>
|
||||
</span>
|
||||
@Html.TextBoxFor(p => p.icon, new { @class = "form-control bg-dark text-white", id = "icon-input" })
|
||||
</div>
|
||||
<small class="text-muted">
|
||||
Any <a href="https://fontawesome.com/search?ic=brands" target="_blank" rel="noopener" class="text-info">Font Awesome</a> class name, e.g. <code>fa-brands fa-youtube</code> or <code>fa-solid fa-link</code>.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.url, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.url, new { @class = "form-control bg-dark text-white" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@Html.LabelFor(p => p.sort_order, new { @class = "text-white" })
|
||||
@Html.TextBoxFor(p => p.sort_order, new { @class = "form-control bg-dark text-white", type = "number" })
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Save</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
document.getElementById('icon-input').addEventListener('input', function () {
|
||||
document.getElementById('icon-preview').className = this.value;
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
@using atakanozbancom.Models.classes
|
||||
@model List<socialicon>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "socialicons";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Social Icons</h2>
|
||||
<p class="text-white-50">These appear as the icon row at the bottom of every public page.</p>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
|
||||
<table class="table table-bordered mt-3">
|
||||
<tr class="bg-dark text-white">
|
||||
<th class="bg-dark text-white">Icon</th>
|
||||
<th class="bg-dark text-white">Class</th>
|
||||
<th class="bg-dark text-white">URL</th>
|
||||
<th class="bg-dark text-white">Order</th>
|
||||
<th class="bg-dark text-white">Edit</th>
|
||||
<th class="bg-dark text-white">Delete</th>
|
||||
</tr>
|
||||
@foreach (var x in Model)
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white fs-4"><i class="@x.icon"></i></td>
|
||||
<td class="bg-dark text-white">@x.icon</td>
|
||||
<td class="bg-dark text-white" style="word-break:break-all;">@x.url</td>
|
||||
<td class="bg-dark text-white">@x.sort_order</td>
|
||||
<td class="bg-dark text-white"><a href="/admin/socialiconget/@x.id" class="btn btn-primary">Edit</a></td>
|
||||
<td class="bg-dark text-white">
|
||||
@using (Html.BeginForm("socialicondelete", "admin", new { id = x.id }, FormMethod.Post, new { onsubmit = "return confirm('Delete this icon?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-danger">Delete</button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (!Model.Any())
|
||||
{
|
||||
<tr>
|
||||
<td class="bg-dark text-white-50" colspan="6">No social icons yet.</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<a href="/admin/newsocialicon" class="btn btn-primary">Create New Icon</a>
|
||||
@@ -0,0 +1,38 @@
|
||||
@{
|
||||
ViewBag.Title = "wallpaper";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h2 class="text-white mt-3 mb-3">Wallpaper</h2>
|
||||
<p class="text-white-50">This image is used as the background on every public page.</p>
|
||||
@if (TempData["ok"] != null)
|
||||
{<div class="alert alert-success">@TempData["ok"]</div>}
|
||||
|
||||
<div class="mb-4">
|
||||
<label class="text-white d-block mb-2">Current wallpaper</label>
|
||||
<img src="@ViewBag.CurrentWallpaper" style="max-width:100%;max-height:300px;border-radius:8px;border:1px solid #444;" />
|
||||
</div>
|
||||
|
||||
@using (Html.BeginForm("Wallpaper", "admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="text-white">New wallpaper image</label>
|
||||
<img id="wallpaperPreview" style="display:none;max-width:100%;max-height:300px;border-radius:8px;" class="mb-2 d-block" />
|
||||
<input id="wallpaperFile" type="file" name="wallpaperFile" class="form-control bg-dark text-white" accept="image/*" />
|
||||
<small class="text-muted">PNG, JPG, WEBP or GIF. You can also paste (Ctrl+V) an image directly.</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-success">Upload New Wallpaper</button>
|
||||
}
|
||||
|
||||
@using (Html.BeginForm("WallpaperReset", "admin", FormMethod.Post, new { onsubmit = "return confirm('Reset wallpaper to the default image?');" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-secondary mt-2">Reset to Default</button>
|
||||
}
|
||||
|
||||
<script>
|
||||
enablePasteUpload('#wallpaperFile', '#wallpaperPreview');
|
||||
</script>
|
||||
@@ -0,0 +1,35 @@
|
||||
@model List<atakanozbancom.Models.classes.AffiliateLinkVM>
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
|
||||
<main class="px-3">
|
||||
<h1 class="mb-3">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksTitle</h1>
|
||||
<p class="mb-4 text-white">@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksIntro</p>
|
||||
|
||||
@if (Model != null && Model.Any())
|
||||
{
|
||||
<div class="affiliate-list mb-5">
|
||||
@foreach (var link in Model)
|
||||
{
|
||||
<a class="affiliate-card" href="@link.url" target="_blank" rel="nofollow sponsored noopener">
|
||||
<img class="affiliate-logo" src="@link.image" alt="@link.title" loading="lazy" />
|
||||
<div class="affiliate-text">
|
||||
<div class="affiliate-title">@link.title</div>
|
||||
@if (!string.IsNullOrWhiteSpace(link.description))
|
||||
{
|
||||
<div class="affiliate-desc">@link.description</div>
|
||||
}
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="mb-5 text-start">
|
||||
@atakanozbancom.App_GlobalResources.Resource.AffiliateLinksComingSoon
|
||||
</p>
|
||||
}
|
||||
</main>
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="dark">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Sign-in</title>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
|
||||
<style>
|
||||
.form-control {
|
||||
background-color: #212529 !important;
|
||||
color: white !important;
|
||||
border: 1px solid #6c757d;
|
||||
}
|
||||
|
||||
.form-control::placeholder {
|
||||
color: #adb5bd !important;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
border-color: #0d6efd !important;
|
||||
box-shadow: 0 0 5px rgba(13, 110, 253, 0.5);
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
background-color: #343a40 !important;
|
||||
border-color: #6c757d !important;
|
||||
}
|
||||
|
||||
.form-check-input:checked {
|
||||
background-color: #0d6efd !important;
|
||||
border-color: #0d6efd !important;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0d6efd !important;
|
||||
border-color: #0d6efd !important;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #0b5ed7 !important;
|
||||
border-color: #0a58ca !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-dark d-flex align-items-center justify-content-center vh-100">
|
||||
<main class="form-signin w-100" style="max-width: 400px;">
|
||||
@using (Html.BeginForm("index", "login", FormMethod.Post))
|
||||
{
|
||||
<h1 class="h3 mb-3 fw-normal text-white text-center">Please sign in</h1>
|
||||
|
||||
<div class="form-floating">
|
||||
<input type="text" name="username" class="form-control" id="floatingInput" placeholder="Username">
|
||||
<label for="floatingInput">Username</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mt-2 mb-2">
|
||||
<input type="password" name="password" class="form-control" id="floatingPassword" placeholder="Password">
|
||||
<label for="floatingPassword">Password</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 py-2" type="submit">Sign in</button>
|
||||
}
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
|
||||
<main class="px-3">
|
||||
<h1 class="index-title">@atakanozbancom.App_GlobalResources.Resource.MainH1</h1>
|
||||
<div class="wrapper fs-5">
|
||||
@atakanozbancom.App_GlobalResources.Resource.MainDiv
|
||||
</div>
|
||||
</main>
|
||||
@@ -0,0 +1,9 @@
|
||||
@using atakanozbancom.Models.classes
|
||||
@model List<socialicon>
|
||||
|
||||
@foreach (var x in Model)
|
||||
{
|
||||
<a href="@x.url" class="text-decoration-none text-white-50">
|
||||
<i class="@x.icon"></i>
|
||||
</a>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.background-image {
|
||||
background-image: url('@ViewBag.WallpaperUrl');
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
@{
|
||||
ViewBag.Title = "index";
|
||||
Layout = "~/Views/Shared/_PortfolioLayout.cshtml";
|
||||
}
|
||||
<link href="@Url.Content("~/assets/css/style.css")" rel="stylesheet" />
|
||||
|
||||
<main class="px-3">
|
||||
<h1 class="m-4 text-white">@atakanozbancom.App_GlobalResources.Resource.MyProjectsTitle</h1>
|
||||
@Html.Action("projectposts", "myprojects")
|
||||
</main>
|
||||
@@ -0,0 +1,180 @@
|
||||
@model IEnumerable<atakanozbancom.Models.classes.MyProjectsVM>
|
||||
|
||||
<p class="text-center">
|
||||
@(atakanozbancom.App_GlobalResources.Resource.MyProjectsP1)
|
||||
<a href="https://git.atakanozban.com/gitea" style="text-decoration:none;color:darkgrey;" target="_blank">
|
||||
@atakanozbancom.App_GlobalResources.Resource.Gitea
|
||||
</a>
|
||||
@atakanozbancom.App_GlobalResources.Resource.MyProjectsP1_1
|
||||
</p>
|
||||
|
||||
<style>
|
||||
.carousel-media-iframe {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.carousel-media-iframe iframe {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.carousel-media-image {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.carousel-media-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.media-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
opacity: 0.9;
|
||||
bottom: auto;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.carousel-control-prev {
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
.carousel-control-next {
|
||||
right: 1rem;
|
||||
}
|
||||
|
||||
.carousel-indicators {
|
||||
z-index: 6;
|
||||
}
|
||||
</style>
|
||||
|
||||
@foreach (var p in Model)
|
||||
{
|
||||
var media = p.medias ?? new List<atakanozbancom.Models.classes.ProjectMediaVM>();
|
||||
var carouselId = $"projCarousel_{p.id}";
|
||||
var hasMultiple = media.Count > 1;
|
||||
|
||||
<div class="container py-4">
|
||||
|
||||
@if (media.Count > 0)
|
||||
{
|
||||
<div id="@carouselId" class="carousel slide" data-bs-ride="carousel">
|
||||
|
||||
@if (hasMultiple)
|
||||
{
|
||||
<div class="carousel-indicators">
|
||||
@for (int i = 0; i < media.Count; i++)
|
||||
{
|
||||
<button type="button"
|
||||
data-bs-target="#@carouselId"
|
||||
data-bs-slide-to="@i"
|
||||
class="@(i == 0 ? "active" : "")"
|
||||
aria-current="@(i == 0 ? "true" : null)"
|
||||
aria-label="Slide @(i + 1)"></button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="carousel-inner">
|
||||
|
||||
@for (int i = 0; i < media.Count; i++)
|
||||
{
|
||||
var m = media[i];
|
||||
|
||||
<div class="carousel-item @(i == 0 ? "active" : "")"
|
||||
data-bs-interval="false">
|
||||
|
||||
@if (m.type == "iframe")
|
||||
{
|
||||
<div class="carousel-media-iframe">
|
||||
<iframe src="@m.url"
|
||||
loading="lazy"
|
||||
allowfullscreen></iframe>
|
||||
|
||||
|
||||
@if (hasMultiple)
|
||||
{
|
||||
<button class="carousel-control-prev media-arrow"
|
||||
type="button"
|
||||
data-bs-target="#@carouselId"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
|
||||
<button class="carousel-control-next media-arrow"
|
||||
type="button"
|
||||
data-bs-target="#@carouselId"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else if (m.type == "image")
|
||||
{
|
||||
<div class="carousel-media-image">
|
||||
<img src="@m.url" alt="@p.title" />
|
||||
|
||||
@if (hasMultiple)
|
||||
{
|
||||
<button class="carousel-control-prev media-arrow"
|
||||
type="button"
|
||||
data-bs-target="#@carouselId"
|
||||
data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon"></span>
|
||||
</button>
|
||||
|
||||
<button class="carousel-control-next media-arrow"
|
||||
type="button"
|
||||
data-bs-target="#@carouselId"
|
||||
data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon"></span>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@*else if (m.type == "video")
|
||||
{
|
||||
<video class="d-block w-100" controls preload="metadata">
|
||||
<source src="@m.url" type="video/mp4" />
|
||||
</video>
|
||||
}*@
|
||||
@*else if (m.type == "document")
|
||||
{
|
||||
<div class="ratio ratio-4x3">
|
||||
<iframe src="@m.url"></iframe>
|
||||
</div>
|
||||
<div class="text-center mt-2">
|
||||
<a href="@m.url" target="_blank">Open document</a>
|
||||
</div>
|
||||
}*@
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<h3 class="mt-3 text-center">@p.title</h3>
|
||||
<p class="lead mb-5 text-center">@Html.Raw(atakanozbancom.Models.classes.DescriptionFormatter.ToSafeHtml(p.description))</p>
|
||||
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user