diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 55cc528..0000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2023 neroduckale - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 2573984..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# nrdkwebsite - -просто мой вебсайт \ No newline at end of file diff --git a/nrdkwebsite/Pages/_ViewImports.cshtml b/nrdkwebsite/Pages/_ViewImports.cshtml new file mode 100644 index 0000000..f90b56a --- /dev/null +++ b/nrdkwebsite/Pages/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using nrdkwebsite +@namespace nrdkwebsite.Pages +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file diff --git a/nrdkwebsite/Pages/_ViewStart.cshtml b/nrdkwebsite/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..2157e73 --- /dev/null +++ b/nrdkwebsite/Pages/_ViewStart.cshtml @@ -0,0 +1,4 @@ +@using nrdkwebsite.Pages +@{ + Layout = "layout"; +} diff --git a/nrdkwebsite/Pages/about.cshtml b/nrdkwebsite/Pages/about.cshtml new file mode 100644 index 0000000..ba7b54d --- /dev/null +++ b/nrdkwebsite/Pages/about.cshtml @@ -0,0 +1,9 @@ +@page +@model About +@{ ViewData["Title"] = "about"; } +
+

neroduckale.

+

telegram

+
+nero's logo + diff --git a/nrdkwebsite/Pages/about.cshtml.cs b/nrdkwebsite/Pages/about.cshtml.cs new file mode 100644 index 0000000..3216551 --- /dev/null +++ b/nrdkwebsite/Pages/about.cshtml.cs @@ -0,0 +1,19 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages; + +public class About : PageModel +{ + private readonly ILogger _logger; + + public About(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + + } +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/error.cshtml b/nrdkwebsite/Pages/error.cshtml new file mode 100644 index 0000000..6f92b95 --- /dev/null +++ b/nrdkwebsite/Pages/error.cshtml @@ -0,0 +1,26 @@ +@page +@model ErrorModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to the Development environment displays detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/nrdkwebsite/Pages/error.cshtml.cs b/nrdkwebsite/Pages/error.cshtml.cs new file mode 100644 index 0000000..93b0804 --- /dev/null +++ b/nrdkwebsite/Pages/error.cshtml.cs @@ -0,0 +1,26 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.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 _logger; + + public ErrorModel(ILogger logger) + { + _logger = logger; + } + + public void OnGet() + { + RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; + } +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/302.cshtml b/nrdkwebsite/Pages/errors/302.cshtml new file mode 100644 index 0000000..1a53285 --- /dev/null +++ b/nrdkwebsite/Pages/errors/302.cshtml @@ -0,0 +1,8 @@ +@page +@model error302 + +@{ + ViewData["Title"] = "найден"; +} + +

302! найден, но не в состоянии появиться здесь.

\ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/302.cshtml.cs b/nrdkwebsite/Pages/errors/302.cshtml.cs new file mode 100644 index 0000000..4f533eb --- /dev/null +++ b/nrdkwebsite/Pages/errors/302.cshtml.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages.errors; + +public class error302 : PageModel +{ + public void OnGet() + { + HttpContext.Response.StatusCode = 302; + } +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/404.cshtml b/nrdkwebsite/Pages/errors/404.cshtml new file mode 100644 index 0000000..9e9dcec --- /dev/null +++ b/nrdkwebsite/Pages/errors/404.cshtml @@ -0,0 +1,8 @@ +@page +@model error404 + +@{ + ViewData["Title"] = "not found"; +} + +

404! Страница не найдена

\ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/404.cshtml.cs b/nrdkwebsite/Pages/errors/404.cshtml.cs new file mode 100644 index 0000000..8bbfb3f --- /dev/null +++ b/nrdkwebsite/Pages/errors/404.cshtml.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages.errors; + +public class error404 : PageModel +{ + public void OnGet() + { + + } + +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/409.cshtml b/nrdkwebsite/Pages/errors/409.cshtml new file mode 100644 index 0000000..3df9016 --- /dev/null +++ b/nrdkwebsite/Pages/errors/409.cshtml @@ -0,0 +1,8 @@ +@page +@model error409 + +@{ + ViewData["Title"] = "conflict"; +} + +

409! Conflict!

\ No newline at end of file diff --git a/nrdkwebsite/Pages/errors/409.cshtml.cs b/nrdkwebsite/Pages/errors/409.cshtml.cs new file mode 100644 index 0000000..585b013 --- /dev/null +++ b/nrdkwebsite/Pages/errors/409.cshtml.cs @@ -0,0 +1,12 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages.errors; + +public class error409 : PageModel +{ + public void OnGet() + { + + } + +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/index.cshtml b/nrdkwebsite/Pages/index.cshtml new file mode 100644 index 0000000..0207270 --- /dev/null +++ b/nrdkwebsite/Pages/index.cshtml @@ -0,0 +1,9 @@ +@page +@model IndexModel +@{ + ViewData["Title"] = "home page"; +} + +

Привет, это сайт neroduckale

+

Мой никнейм читается по разному - неродакля, неродукель, неродакале, но одно в нем остается неизменным - неро.

+спасибо мактайлорс за помощь с созданием сайта. version: 0.7 diff --git a/nrdkwebsite/Pages/index.cshtml.cs b/nrdkwebsite/Pages/index.cshtml.cs new file mode 100644 index 0000000..511dbb9 --- /dev/null +++ b/nrdkwebsite/Pages/index.cshtml.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages; + +public class IndexModel : PageModel +{ + private readonly ILogger _logger; + + public IndexModel(ILogger logger) + { + _logger = logger; + } + + + public void OnGet() + { + + } +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/layout.cshtml b/nrdkwebsite/Pages/layout.cshtml new file mode 100644 index 0000000..bf9fd08 --- /dev/null +++ b/nrdkwebsite/Pages/layout.cshtml @@ -0,0 +1,40 @@ +@{ + if (ViewBag.Title == null) ViewBag.Title = "unknown"; +} + + + + + neroduckale's @ViewBag.Title + + + + + + @* *@ + + + + + + + +
+ @RenderBody() +
+ + + + + \ No newline at end of file diff --git a/nrdkwebsite/Pages/minecraftia.cshtml b/nrdkwebsite/Pages/minecraftia.cshtml new file mode 100644 index 0000000..b3fd93f --- /dev/null +++ b/nrdkwebsite/Pages/minecraftia.cshtml @@ -0,0 +1,72 @@ +@page +@model Minecraftia +@{ + ViewData["Title"] = "minecraft"; + string[] custom = ["interact_with_crafting_table", "leave_game", "time_since_death", "damage_resisted", "sprint_one_cm","damage_blocked_by_shield","drop","talked_to_villager","play_time","deaths","jump","walk_on_water_one_cm","enchant_item","interact_with_furnace","sleep_in_bed","waystone_activated","damage_dealt","player_kills","crouch_one_cm","interact_with_smoker","interact_with_smithing_table","interact_with_anvil","mob_kills","damage_dealt_resisted","climb_one_cm","walk_one_cm","sneak_time","walk_under_water_one_cm","boat_one_cm","total_world_time","interact_with_stonecutter","interact_with_grindstone","time_since_rest","damage_absorbed","damage_taken","trigger_trapped_chest","swim_one_cm","fly_one_cm","pig_one_cm","open_chest","fall_one_cm"]; +} + +Статистика игрока + + + + +
Сюда внесены первые десять позиций по количеству, типо какого предмета я скрафтил в больших количествах и так далее
+
+
+ Дроп вещей + +
+
+ Использование вещей + +
+
+ Скрафчено + +
+
+ Умер (причина) + +
+
+ Сломано + +
+
+ Убил (кого) + +
+
+ Подобрал (предметов) + +
+
+ Вскопал (блок) + +
+
+ + + +
+
+ +
+
+ + + \ No newline at end of file diff --git a/nrdkwebsite/Pages/minecraftia.cshtml.cs b/nrdkwebsite/Pages/minecraftia.cshtml.cs new file mode 100644 index 0000000..dae59af --- /dev/null +++ b/nrdkwebsite/Pages/minecraftia.cshtml.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages; + +public class Minecraftia : PageModel +{ + public void OnGet() + { + + } +} \ No newline at end of file diff --git a/nrdkwebsite/Pages/ygolek.cshtml b/nrdkwebsite/Pages/ygolek.cshtml new file mode 100644 index 0000000..874b4bd --- /dev/null +++ b/nrdkwebsite/Pages/ygolek.cshtml @@ -0,0 +1,5 @@ +@page +@model Ygolek +@{ ViewData["Title"] = "ygolek";} + +YGOLEK'S PHOTO \ No newline at end of file diff --git a/nrdkwebsite/Pages/ygolek.cshtml.cs b/nrdkwebsite/Pages/ygolek.cshtml.cs new file mode 100644 index 0000000..8dd5150 --- /dev/null +++ b/nrdkwebsite/Pages/ygolek.cshtml.cs @@ -0,0 +1,11 @@ +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace nrdkwebsite.Pages; + +public class Ygolek : PageModel +{ + public void OnGet() + { + + } +} \ No newline at end of file diff --git a/nrdkwebsite/Program.cs b/nrdkwebsite/Program.cs new file mode 100644 index 0000000..085eceb --- /dev/null +++ b/nrdkwebsite/Program.cs @@ -0,0 +1,41 @@ +var builder = WebApplication.CreateBuilder(args); +var myAllowSpecificOrigins = "_myAllowSpecificOrigins"; +//builder.Services.AddDbContext(options => options.UseMySql(connection, ServerVersion.Create(new Version(8, 0, 35), ServerType.MySql))); +builder.Services.AddRazorPages(); +builder.Services.AddCors(options => +{ + options.AddPolicy(name: myAllowSpecificOrigins, policy => { policy.WithOrigins("*"); }); +}); +var app = builder.Build(); +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} +app.UseStatusCodePagesWithReExecute("/errors/{0}"); +app.UseHttpsRedirection(); +app.UseCors(myAllowSpecificOrigins); +app.UseStaticFiles(new StaticFileOptions +{ + ServeUnknownFileTypes = true +}); + +// app.MapGet("/api/users", API.GetUsers); //WORKS +// app.MapGet("/api/users/{id:int}", API.GetUserById); //WORKS +// app.MapGet("/api/users/nickname/{name}", API.GetUserByName); //WORKS +// app.MapDelete("/api/users/{id:int}", API.DeleteUser); //WORKS +// app.MapPost("/api/users", API.PostNewUser); //WORKS +app.MapGet("/mctaylors", (HttpContext aaa) => aaa.Response.Redirect("/errors/302")); +app.MapGet("/octol1ttle", (HttpContext aaa) => aaa.Response.Redirect("/errors/409")); + +app.UseRouting(); +app.UseAuthorization(); +app.MapRazorPages(); +app.Run(); + + + + + + diff --git a/nrdkwebsite/Properties/launchSettings.json b/nrdkwebsite/Properties/launchSettings.json new file mode 100644 index 0000000..ecf41a8 --- /dev/null +++ b/nrdkwebsite/Properties/launchSettings.json @@ -0,0 +1,37 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:60434", + "sslPort": 44306 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5196", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7106;http://localhost:5196", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/nrdkwebsite/wwwroot/css/style.css b/nrdkwebsite/wwwroot/css/style.css new file mode 100644 index 0000000..c0e56f6 --- /dev/null +++ b/nrdkwebsite/wwwroot/css/style.css @@ -0,0 +1,73 @@ +body { + font-family: 'Raleway', sans-serif; + color: white; + margin: 0; + background: #2c2c2c; +} +a { + text-decoration: none; +} +.content { + text-align: center; + padding-top: 20px; +} + +.header-links { /*