remove front end

This commit is contained in:
2025-04-14 21:35:40 -04:00
parent 8803a70a31
commit 6410d84754
40 changed files with 7 additions and 19740 deletions

View File

@@ -9,22 +9,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="Styles\main.scss" />
<Content Include="Styles\mixins.scss" />
<Content Include="Styles\UI\Inputs.scss" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.SassCompiler" Version="1.86.0" />
<PackageReference Include="Isopoh.Cryptography.Argon2" Version="2.0.0" /> <PackageReference Include="Isopoh.Cryptography.Argon2" Version="2.0.0" />
<PackageReference Include="MaybeError" Version="1.0.5" /> <PackageReference Include="MaybeError" Version="1.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.3" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.3" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.3" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.7.0" /> <PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.7.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="5.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.2" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.2" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="3.0.71" /> <PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="3.0.71" />
<PackageReference Include="MongoDB.Analyzer" Version="1.5.0" /> <PackageReference Include="MongoDB.Analyzer" Version="1.5.0" />

View File

@@ -1,9 +1,9 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace AobaV2.Controllers.Api; namespace AobaV2.Controllers.Api;
[Route("/api/auth")] [Route("/api/auth")]
public class AuthApi: ControllerBase public class AuthApi : ControllerBase
{ {
[HttpGet("login")] [HttpGet("login")]
public async Task<IActionResult> LoginAsync() public async Task<IActionResult> LoginAsync()
@@ -12,7 +12,7 @@ public class AuthApi: ControllerBase
} }
[HttpGet("register")] [HttpGet("register")]
public async Task<IActionResult> LoginAsync() public async Task<IActionResult> RegisterAsync()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@@ -1,32 +0,0 @@
using System.Diagnostics;
using AobaV2.Models;
using Microsoft.AspNetCore.Mvc;
namespace AobaV2.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
}
public IActionResult Index()
{
return View();
}
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}

View File

@@ -13,7 +13,6 @@ public class MediaController(MediaService media) : Controller
[HttpGet("{id}")] [HttpGet("{id}")]
public IActionResult Media(ObjectId id) public IActionResult Media(ObjectId id)
{ {
meda
return View(); return View();
} }

View File

@@ -1,9 +0,0 @@
namespace AobaV2.Models
{
public class ErrorViewModel
{
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}

View File

@@ -12,14 +12,9 @@ using Microsoft.IdentityModel.Tokens;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Add services to the container. // Add services to the container.
#if DEBUG builder.Services
builder.Services .AddControllers(opt => opt.ModelBinderProviders.Add(new BsonIdModelBinderProvider()));
.AddControllersWithViews(opt => opt.ModelBinderProviders.Add(new BsonIdModelBinderProvider()))
.AddRazorRuntimeCompilation();
builder.Services.AddSassCompiler();
#else
builder.Services.AddControllersWithViews();
#endif
var authInfo = AuthInfo.LoadOrCreate("Auth.json", "aobaV2", "aoba"); var authInfo = AuthInfo.LoadOrCreate("Auth.json", "aobaV2", "aoba");
builder.Services.AddSingleton(authInfo); builder.Services.AddSingleton(authInfo);
@@ -85,20 +80,6 @@ if (!app.Environment.IsDevelopment())
app.UseHsts(); app.UseHsts();
} }
//Javascript frameworks were a mistake
app.Use((c, n) =>
{
if(!c.Request.Path.HasValue)
return n.Invoke();
if (c.Request.Path.Value.EndsWith(".js"))
return n.Invoke();
if (!(c.Request.Path.StartsWithSegments("/js") || c.Request.Path.StartsWithSegments("/lib")))
return n.Invoke();
c.Response.Redirect($"{c.Request.Path}.js{c.Request.QueryString}");
c.Response.StatusCode = StatusCodes.Status301MovedPermanently;
return Task.CompletedTask;
});
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseRouting(); app.UseRouting();

View File

@@ -2,7 +2,6 @@
"profiles": { "profiles": {
"http": { "http": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
@@ -11,7 +10,6 @@
}, },
"https": { "https": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
@@ -20,7 +18,6 @@
}, },
"Container (Dockerfile)": { "Container (Dockerfile)": {
"commandName": "Docker", "commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_HTTPS_PORTS": "8081", "ASPNETCORE_HTTPS_PORTS": "8081",

View File

@@ -1,10 +0,0 @@
@import '../mixins';
@import '../vars';
a{
color:$featureColor;
&:hover{
color:$accentColor;
}
}

View File

@@ -1,2 +0,0 @@
@import '../mixins';
@import '../vars';

View File

@@ -1,34 +0,0 @@
@import 'mixins';
@import 'vars';
@import 'UI/Inputs.scss';
@import 'UI/Common.scss';
:root {
background-color: $mainBGColor;
color: $mainTextColor;
box-sizing: border-box;
font-family: "Noto Sans", sans-serif;
font-optical-sizing: auto;
font-weight: 400;
font-style: normal;
font-variation-settings: "wdth" 100;
}
body {
padding: 0;
margin: 0;
}
nav{
position:sticky;
top:0;
background-color:$featureColor;
height:$navBarSize;
.branding{
img{
height:$navBarSize;
}
}
}

View File

@@ -1,43 +0,0 @@
$navBarSize: 40px;
@mixin mobile {
@media (max-width: 700px) {
@content;
}
}
@mixin max-screen($size) {
@media (max-width: #{$size}) {
@content;
}
}
@mixin max-container($size) {
@container (max-width: #{$size}) {
@content;
}
}
@mixin small-container {
@container (max-width: 500px) {
@content;
}
}
@mixin medium-container {
@container (max-width: 800px) {
@content;
}
}
@mixin large-container {
@container (max-width: 1000px) {
@content;
}
}
@mixin xlarge-container {
@container (max-width: 1200px) {
@content;
}
}

View File

@@ -1,11 +0,0 @@
$mainBGColor: #584577;
$featureColor: #CE2D4F;
$accentColor: #f0eaf8;
$mainTextColor: #eee;
$brightTextColor: #fff;
$invertTextColor: #222;
$invertBrightTextColor: #000;
$navBarSize: 50px;

View File

@@ -1,5 +0,0 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

View File

@@ -1,5 +0,0 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}

View File

@@ -1,4 +0,0 @@
@{
ViewData["Title"] = "Home Page";
}
<partial name="ImageGrid" />

View File

@@ -1,6 +0,0 @@
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
<p>Use this page to detail your site's privacy policy.</p>

View File

@@ -1,25 +0,0 @@
@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>

View File

@@ -1,3 +0,0 @@
@{
}
<div>Image Grid</div>

View File

@@ -1,14 +0,0 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
<nav>
<div class="branding">
<img src="favicon.ico"/>
</div>
<div class="search">
</div>
<div class="controls"></div>
</nav>

View File

@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - AobaV2</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap" />
<link rel="stylesheet" href="~/css/main.css" asp-append-version="true" />
</head>
<body>
<partial name="Navigation"/>
@RenderBody()
<script src="~/lib/jquery/jquery.min.js" defer></script>
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>

View File

@@ -1,48 +0,0 @@
/* 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;
}

View File

@@ -1,2 +0,0 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/dist/jquery.validate.unobtrusive.min.js"></script>

View File

@@ -1,3 +0,0 @@
@using AobaV2
@using AobaV2.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -1,3 +0,0 @@
@{
Layout = "_Layout";
}

View File

@@ -5,19 +5,5 @@
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
}, },
"AllowedHosts": "*", "AllowedHosts": "*"
"SassCompiler": {
"SourceFolder": "Styles",
"TargetFolder": "wwwroot/css",
"Arguments": "--style=compressed",
"GenerateScopedCss": true,
"ScopedCssFolders": [ "Views", "Pages", "Shared", "Components" ],
"IncludePaths": [],
"Configurations": {
"Debug": {
"Arguments": "--style=expanded"
}
}
}
} }

View File

@@ -1,11 +0,0 @@
{
"version": "3.0",
"defaultProvider": "jsdelivr",
"libraries": [
{
"provider": "cdnjs",
"library": "jquery@3.7.1",
"destination": "wwwroot/lib/jquery/"
}
]
}

View File

@@ -1,29 +0,0 @@
{
"name": "AobaV2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"devDependencies": {
"@types/jquery": "^3.5.32"
}
},
"node_modules/@types/jquery": {
"version": "3.5.32",
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.32.tgz",
"integrity": "sha512-b9Xbf4CkMqS02YH8zACqN1xzdxc3cO735Qe5AbSUFmyOiaWAbcpqh9Wna+Uk0vgACvoQHpWDg2rGdHkYPLmCiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/sizzle": "*"
}
},
"node_modules/@types/sizzle": {
"version": "2.3.9",
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.9.tgz",
"integrity": "sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==",
"dev": true,
"license": "MIT"
}
}
}

View File

@@ -1,6 +0,0 @@
{
"private": true,
"devDependencies": {
"@types/jquery": "^3.5.32"
}
}

View File

@@ -1,18 +0,0 @@
{
"compileOnSave": true,
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"module": "esnext",
"target": "ES6",
"outDir": "wwwroot/js"
},
"include": [
"wwwroot/js/**/*"
],
"exclude": [
"node_modules"
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -1,2 +0,0 @@
*.css
*.css.map

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -1,2 +0,0 @@
*.js
*.js.map

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long