diff --git a/MyWebsite.old.sln b/MyWebsite.old.sln
deleted file mode 100644
index 019116a..0000000
--- a/MyWebsite.old.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29306.81
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWebsite", "MyWebsite\MyWebsite.csproj", "{11629863-00FC-468B-B82A-78BFEB3C676E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {11629863-00FC-468B-B82A-78BFEB3C676E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {11629863-00FC-468B-B82A-78BFEB3C676E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {11629863-00FC-468B-B82A-78BFEB3C676E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {11629863-00FC-468B-B82A-78BFEB3C676E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {D886244E-2CDB-48D2-9E99-F449E46F405C}
- EndGlobalSection
-EndGlobal
diff --git a/MyWebsite.old/Controllers/AboutController.cs b/MyWebsite.old/Controllers/AboutController.cs
deleted file mode 100644
index 661c2f8..0000000
--- a/MyWebsite.old/Controllers/AboutController.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-
-namespace MyWebsite.Controllers
-{
- public class AboutController : Controller
- {
- public IActionResult Index() =>
- View();
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Controllers/AdminController.cs b/MyWebsite.old/Controllers/AdminController.cs
deleted file mode 100644
index d204192..0000000
--- a/MyWebsite.old/Controllers/AdminController.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-using Newtonsoft.Json;
-
-namespace MyWebsite.Controllers
-{
- public class AdminController : Controller
- {
- public IActionResult Index()
- {
- return View();
- }
-
- public async Task Projects(int? id)
- {
- if (id == null)
- return View();
- else
- {
- Project[] projects = JsonConvert.DeserializeObject(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Projects.json"));
-
- ViewData["Project"] = projects[id.Value];
- ViewData["Badges"] = new Dictionary
- {
- { "csharp", "C# Programming language" },
- { "dotnet", ".NET Framework" },
- { "xamarin", "Xamarin Framework" },
- { "unity", "Unity Engine" },
- { "uwp", "Universal Windows Platform" },
- { "windows", "Windows Platform" },
- { "win32", "Windows Platform (Win32)" },
- { "android", "Android Platform" },
- { "ios", "iOS Platform" }
- };
-
- return View("Views/Admin/ProjectEditor.cshtml");
- }
- }
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Controllers/CVController.cs b/MyWebsite.old/Controllers/CVController.cs
deleted file mode 100644
index a1bae37..0000000
--- a/MyWebsite.old/Controllers/CVController.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using SelectPdf;
-
-namespace MyWebsite.Controllers
-{
- public class CVController : Controller
- {
- public IActionResult Index() =>
- View();
-
- public IActionResult Download()
- {
- HtmlToPdf converter = new HtmlToPdf();
- converter.Options.MarginTop = 25;
- converter.Options.MarginBottom = 25;
- PdfDocument doc = converter.ConvertUrl($"{Request.Scheme}://{Request.Host}/CV/PrintCV?pdfPreview=true");
- byte[] data = doc.Save();
- doc.Close();
- return File(data, "application/pdf", "[Michael Gordeev] CV.pdf");
- }
-
- public IActionResult PrintCV(bool pdfPreview = false)
- {
- ViewData["pdfPreview"] = pdfPreview;
- return View();
- }
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Controllers/ContactsController.cs b/MyWebsite.old/Controllers/ContactsController.cs
deleted file mode 100644
index e4a2864..0000000
--- a/MyWebsite.old/Controllers/ContactsController.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-using Newtonsoft.Json;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-
-namespace MyWebsite.Controllers
-{
- public class ContactsController : Controller
- {
- public IActionResult Index()
- {
- Dictionary links = JsonConvert.DeserializeObject>(new WebClient().DownloadString($"{Request.Scheme}://{Request.Host}/Links.json"));
- ViewData["contactLinks"] = links.Values.ToList().FindAll(i => i.CanContactMe);
- ViewData["otherLinks"] = links.Values.ToList().FindAll(i => !i.CanContactMe);
-
- return View();
- }
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Controllers/GalleryController.cs b/MyWebsite.old/Controllers/GalleryController.cs
deleted file mode 100644
index 5ae91c3..0000000
--- a/MyWebsite.old/Controllers/GalleryController.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-using Newtonsoft.Json;
-using System.Net.Http;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MyWebsite.Controllers
-{
- public class GalleryController : Controller
- {
- [HttpGet("Arts")]
- public async Task Index()
- {
- return View(JsonConvert.DeserializeObject(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Gallery.json")));
- }
-
- [HttpGet("Image")]
- public async Task Details(string id)
- {
- return View(JsonConvert.DeserializeObject(await new HttpClient().GetStringAsync($"https://{Request.Host}/Gallery.json")).First(i => i.FileName == id));
- }
-
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Controllers/HomeController.cs b/MyWebsite.old/Controllers/HomeController.cs
deleted file mode 100644
index f6d048d..0000000
--- a/MyWebsite.old/Controllers/HomeController.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Diagnostics;
-using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-
-namespace MyWebsite.Controllers
-{
- public class HomeController : Controller
- {
- // TODO: Add more specific OpenGraph meta tags
- // TODO: Create custom error page
- // TODO: Update Projects.json and Gallery.json (Add this site, BSI)
- // TODO: Complete About page
- // TODO: Localize application
- // TODO: Make authorization system and ability to update website through GUI
- // TODO: Consider a database connection
- // TODO: Add more detailed parsing of artwork descriptions
- public IActionResult Index() =>
- View();
-
- [HttpGet("Error")]
- [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
- public IActionResult Error() =>
- View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
- }
-}
diff --git a/MyWebsite.old/Controllers/ProjectsController.cs b/MyWebsite.old/Controllers/ProjectsController.cs
deleted file mode 100644
index fc61941..0000000
--- a/MyWebsite.old/Controllers/ProjectsController.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-using Newtonsoft.Json;
-using System.Net.Http;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-
-namespace MyWebsite.Controllers
-{
- public class ProjectsController : Controller
- {
- public async Task Index()
- {
- Project[] projects = JsonConvert.DeserializeObject(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Projects.json"));
-
- ViewData["Projects"] = projects;
- ViewData["Badges"] = new Dictionary
- {
- { "csharp", "C# Programming language" },
- { "dotnet", ".NET Framework" },
- { "xamarin", "Xamarin Framework" },
- { "unity", "Unity Engine" },
- { "uwp", "Universal Windows Platform" },
- { "windows", "Windows Platform" },
- { "win32", "Windows Platform (Win32)" },
- { "android", "Android Platform" },
- { "ios", "iOS Platform" }
- };
-
- return View();
- }
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Models/ErrorViewModel.cs b/MyWebsite.old/Models/ErrorViewModel.cs
deleted file mode 100644
index b03a5db..0000000
--- a/MyWebsite.old/Models/ErrorViewModel.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace MyWebsite.Models
-{
- public class ErrorViewModel
- {
- public string RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Models/Image.cs b/MyWebsite.old/Models/Image.cs
deleted file mode 100644
index 840af55..0000000
--- a/MyWebsite.old/Models/Image.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Globalization;
-
-namespace MyWebsite.Models
-{
- public class Image
- {
- public string Title { get; set; }
- public string Description { get; set; }
- public DateTime CreationDate { get; set; }
- public string FileName { get; set; }
- }
-}
diff --git a/MyWebsite.old/Models/Link.cs b/MyWebsite.old/Models/Link.cs
deleted file mode 100644
index 6a9f5ca..0000000
--- a/MyWebsite.old/Models/Link.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MyWebsite.Models
-{
- public class Link
- {
- public string Title { get; set; }
- public string Socicon { get; set; }
- public string Username { get; set; }
- public string Url { get; set; }
- public bool CanContactMe { get; set; }
- }
-}
diff --git a/MyWebsite.old/Models/Project.cs b/MyWebsite.old/Models/Project.cs
deleted file mode 100644
index 21690c6..0000000
--- a/MyWebsite.old/Models/Project.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MyWebsite.Models
-{
- public class Project
- {
- public string Title { get; set; }
- public string Description { get; set; }
- public string ImageName { get; set; }
- public string Link { get; set; }
- public string LinkCaption { get; set; }
- public string[] Badges { get; set; }
- }
-}
diff --git a/MyWebsite.old/MyWebsite.csproj b/MyWebsite.old/MyWebsite.csproj
deleted file mode 100644
index fe3a975..0000000
--- a/MyWebsite.old/MyWebsite.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- netcoreapp2.1
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MyWebsite.old/MyWebsite.csproj.user b/MyWebsite.old/MyWebsite.csproj.user
deleted file mode 100644
index 0033d77..0000000
--- a/MyWebsite.old/MyWebsite.csproj.user
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- MvcControllerEmptyScaffolder
- root/Controller
- 600
- True
- False
- False
- False
- 600
- FolderProfile
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Program.cs b/MyWebsite.old/Program.cs
deleted file mode 100644
index 46c009f..0000000
--- a/MyWebsite.old/Program.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Microsoft.AspNetCore;
-using Microsoft.AspNetCore.Hosting;
-
-namespace MyWebsite
-{
- public class Program
- {
- public static void Main(string[] args) =>
- CreateWebHostBuilder(args).Build().Run();
-
- public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
- WebHost.CreateDefaultBuilder(args)
- .UseStartup();
- }
-}
diff --git a/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml b/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml
deleted file mode 100644
index 332e2cd..0000000
--- a/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- FileSystem
- FileSystem
- Release
- Any CPU
-
- True
- False
- 11629863-00fc-468b-b82a-78bfeb3c676e
- bin\Release\netcoreapp2.1\publish\
- False
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml.user b/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml.user
deleted file mode 100644
index 89516f9..0000000
--- a/MyWebsite.old/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
- <_PublishTargetUrl>C:\Users\micha\Repositories\CVWebsite\MyWebsite\MyWebsite\bin\Release\netcoreapp2.1\publish\
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Properties/launchSettings.json b/MyWebsite.old/Properties/launchSettings.json
deleted file mode 100644
index 79ead9d..0000000
--- a/MyWebsite.old/Properties/launchSettings.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:51478",
- "sslPort": 44308
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "MyWebsite": {
- "commandName": "Project",
- "launchBrowser": true,
- "applicationUrl": "https://localhost:5001;http://localhost:5000",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/Startup.cs b/MyWebsite.old/Startup.cs
deleted file mode 100644
index 0af09b1..0000000
--- a/MyWebsite.old/Startup.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace MyWebsite
-{
- public class Startup
- {
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
-
- public IConfiguration Configuration { get; }
-
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.Configure(options =>
- {
- // This lambda determines whether user consent for non-essential cookies is needed for a given request.
- options.CheckConsentNeeded = context => true;
- options.MinimumSameSitePolicy = SameSiteMode.None;
- });
-
-
- services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, IHostingEnvironment env)
- {
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseExceptionHandler("/Home/Error");
- app.UseHsts();
- }
-
- app.UseHttpsRedirection();
- app.UseStaticFiles();
- app.UseCookiePolicy();
-
- app.UseMvc(routes =>
- {
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
- });
- }
- }
-}
diff --git a/MyWebsite.old/Views/Admin/Index.cshtml b/MyWebsite.old/Views/Admin/Index.cshtml
deleted file mode 100644
index 65c9845..0000000
--- a/MyWebsite.old/Views/Admin/Index.cshtml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-@{
- ViewData["Title"] = "Admin panel";
-}
-
-
- Administration
- Note: Any write/read operations in this section will require an admin password
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Admin/ProjectEditor.cshtml b/MyWebsite.old/Views/Admin/ProjectEditor.cshtml
deleted file mode 100644
index 0556214..0000000
--- a/MyWebsite.old/Views/Admin/ProjectEditor.cshtml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-@{
- ViewData["Title"] = "Project editor";
- Project project = ViewData["Project"] as Project;
-}
-
-
- Project editor
- @project.Title
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Admin/Projects.cshtml b/MyWebsite.old/Views/Admin/Projects.cshtml
deleted file mode 100644
index 5bcbf33..0000000
--- a/MyWebsite.old/Views/Admin/Projects.cshtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-@{
- ViewData["Title"] = "Projects list";
-}
-
-Projects
-
diff --git a/MyWebsite.old/Views/CV/CVContent.cshtml b/MyWebsite.old/Views/CV/CVContent.cshtml
deleted file mode 100644
index f8ca3db..0000000
--- a/MyWebsite.old/Views/CV/CVContent.cshtml
+++ /dev/null
@@ -1,157 +0,0 @@
-
- Michael (Mikhail) A. Gordeev
-
-
- Saint Petersburg,
- Russia
- Phone (Russia): +7 (996) 929-19-69
- Email: michael.xfox@outlook.com
- Personal Website: https://www.xfox111.net/
-
-
- Overall Summary:
-
- Self- directed, detail-oriented, and professional C# programmer with more than 3 years of experience in designing, developing, analyzing, and implementing client-server, web and desktop-based applications using C# language. Expertise in system designing as well as in testing, debugging and modifying related application code. Capable of learning new programming languages and technologies and complete projects within specified deadlines. Possess excellent communication, problem-solving, documentation, analytical, and decision solving skills.
-
-
- Summary of Skills:
-
-
- Thorough knowledge of C# programming concepts, OOP, SOILD, SDLC, testing and debugging methods, system design and implementation, database system, including DB2 and relational databases, program documentation, web and desktop application development
-
-
- Proficient in Object oriented programming such as C#, C++, Java as well as experience with .NET, ASP.NET Core, MVC, Xamarin and Unity frameworks
-
-
- Strong understanding of HTML, CSS, JavaScript, Visual Studio, design and architectural patterns
-
-
- Have a medium knowledge of Computer Vision and Machine learning
-
-
- Ability to analyze and understand complex problems, and generate appropriate technical solutions independently
-
-
- Effective communication and interpersonal skills with the ability to maintain good relations and share technical ideas with users or clients, technical and management staff
-
-
- Ability to work independently and within teams
-
-
- Strong organizational skills along with the ability to accomplish multiple tasks under extreme pressure, and meet specific deadlines
-
-
- Ability to grasp and apply new concepts quickly and stay updated with latest trends and technical advancements
-
-
-
- TECHNICAL SKILLS:
-
-
- Knowledge of Microsoft Windows Operating System
-
-
- Technologies stack: .NET, ASP.NET MVC, Unity, Xamarin, Azure DevOps
-
-
- Languages: C#, JavaScript, Java, C++, Pascal, XAML, HTML, XML, CSS, SQL
-
-
- Platforms: UWP, Win32, Web, Android, iOS
-
-
- Software: Visual Studio, Adobe Photoshop, Illustrator, DaVinci Resolve, Sony Vegas Pro, FL Studio, Microsoft Office, 3Ds Max, Kompass 3D
-
-
- Database: MySQL, Microsoft Access
-
-
- English knowledge: C1 (Advanced)
-
-
- Very energetic and ready to take new challenges
-
-
- Ready to learn anything new
-
-
- Excellent communication and presentation skills
-
-
-
- Work Experience:
-
- C# Software Developer
- Technologies of Informational and Educational Systems Research Facility, SPbSUT , St. Petersburg, Russia
- September 2019 – Present
-
-
-
- Developing a cross-platform application for University's students and professors
-
-
- Supporting and maintaining existing .NET solutions
-
-
- Providing UI and processing solutions for internal research projects
-
-
- Consulting in Software development projects
-
-
-
- C# Software Developer
- Self-Employed, Lipetsk, Russia
- 2015 - September 2019
-
-
-
- Developing a YouTube client application for Universal Windows Platform
-
-
- Comming out as a head of research group which was developing a Computer Vision based software
-
-
- Doing small freelance tasks for Unity projects
-
-
-
- Phone salesman
- DOM.RU, Lipetsk, Russia
- 2014 - 2015
-
-
-
- Promoting and selling company's infocommunication services to end-users
-
-
-
- Education:
-
-
-
- Bachelor's Degree in Computer Science (11.03.02 Infocommunication Systems)
- State University of Telecommunications, Saint Petersburg, Russia
- 2019 – (Present) – 2023
-
-
-
-
- High School 3.5/4.0 GPA
- Lyceum №66, Lipetsk, Russia
- 2017-2019
-
-
-
-
- Secondary specialized education in Fortepiano
- Regional College of Arts, Lipetsk, Russia
- 2007-2015
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/CV/Index.cshtml b/MyWebsite.old/Views/CV/Index.cshtml
deleted file mode 100644
index 1c1b54e..0000000
--- a/MyWebsite.old/Views/CV/Index.cshtml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-@{
- ViewData["Title"] = "Curriculum vitae";
-}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/CV/PrintCV.cshtml b/MyWebsite.old/Views/CV/PrintCV.cshtml
deleted file mode 100644
index 0b78b00..0000000
--- a/MyWebsite.old/Views/CV/PrintCV.cshtml
+++ /dev/null
@@ -1,33 +0,0 @@
-@{
- Layout = null;
-}
-
-
-
-
- CV print preview page - XFox111.NET
-
-
-
-
-
-
-
-
-
- @if (!(bool)ViewData["pdfPreview"])
- {
-
-
- }
-
-
diff --git a/MyWebsite.old/Views/Contacts/Index.cshtml b/MyWebsite.old/Views/Contacts/Index.cshtml
deleted file mode 100644
index eeed523..0000000
--- a/MyWebsite.old/Views/Contacts/Index.cshtml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-@{
- ViewData["Title"] = "Contact info";
-}
-
-
-
-
-
- @foreach(Link link in ViewData["contactLinks"] as List )
- {
- @(link.Title) @(link.Username)
- }
-
-
- @foreach (Link link in ViewData["otherLinks"] as List )
- {
- @(link.Title) @(link.Username)
- }
-
-
-
diff --git a/MyWebsite.old/Views/Gallery/Details.cshtml b/MyWebsite.old/Views/Gallery/Details.cshtml
deleted file mode 100644
index a7d2c41..0000000
--- a/MyWebsite.old/Views/Gallery/Details.cshtml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-@{
- ViewData["Title"] = Model.Title;
- Image image = Model;
-}
-
-
-
-
-
-
-
-
@image.Title
-
Creation date: @image.CreationDate.ToShortDateString()
-
- @foreach(string line in image.Description.Split("\n"))
- {
- @line
- }
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Gallery/Index.cshtml b/MyWebsite.old/Views/Gallery/Index.cshtml
deleted file mode 100644
index def399a..0000000
--- a/MyWebsite.old/Views/Gallery/Index.cshtml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-@{
- ViewData["Title"] = "My artworks";
-}
-
-
-
-
- @foreach (Image image in Model)
- {
-
- }
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Projects/Index.cshtml b/MyWebsite.old/Views/Projects/Index.cshtml
deleted file mode 100644
index 9328369..0000000
--- a/MyWebsite.old/Views/Projects/Index.cshtml
+++ /dev/null
@@ -1,37 +0,0 @@
-@{
- ViewData["Title"] = "My projects";
-}
-
-
-
-
- @foreach (Project p in ViewData["Projects"] as Project[])
- {
-
-
-
@p.Title
-
- @foreach(string line in p.Description.Split("\n"))
- {
- @line
- }
-
-
@p.LinkCaption
-
-
- @foreach (string i in p.Badges)
- {
-
- }
-
-
- }
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Shared/ContactsBlock.cshtml b/MyWebsite.old/Views/Shared/ContactsBlock.cshtml
deleted file mode 100644
index a3f6f21..0000000
--- a/MyWebsite.old/Views/Shared/ContactsBlock.cshtml
+++ /dev/null
@@ -1,29 +0,0 @@
-@using Newtonsoft.Json
-@using System.Net
-@{
- Dictionary links = JsonConvert.DeserializeObject>(new WebClient().DownloadString($"{Context.Request.Scheme}://{Context.Request.Host}/Links.json"));
-}
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Shared/Error.cshtml b/MyWebsite.old/Views/Shared/Error.cshtml
deleted file mode 100644
index 7ac479c..0000000
--- a/MyWebsite.old/Views/Shared/Error.cshtml
+++ /dev/null
@@ -1,27 +0,0 @@
-@model ErrorViewModel
-@{
- ViewData["Title"] = "Error";
-}
-
-
- Error.
- An error occurred while processing your request.
-
-
-
- @if (Model.ShowRequestId)
- {
-
- Request ID: @Model.RequestId
-
- }
-
- Development Mode
-
- Swapping to Development environment will display more detailed information about the error that occurred.
-
-
- Development environment should not be enabled in deployed applications , as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development , and restarting the application.
-
-
-
diff --git a/MyWebsite.old/Views/Shared/Index.cshtml b/MyWebsite.old/Views/Shared/Index.cshtml
deleted file mode 100644
index a78db35..0000000
--- a/MyWebsite.old/Views/Shared/Index.cshtml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-@{
- ViewData["Title"] = "Hello, World!";
-}
-
-
-
-
-
Hello, World!
-
My name is Michael
- I'm a C# developer
- and this is my website.
-
-
-
-
-
-
Now I'm studying at The Bonch-Bruevich Saint-Petersburg State University of Telecommunications on Infocommunication Systems bachelor's degree
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MyWebsite.old/Views/Shared/_Layout.cshtml b/MyWebsite.old/Views/Shared/_Layout.cshtml
deleted file mode 100644
index 6b7bcfb..0000000
--- a/MyWebsite.old/Views/Shared/_Layout.cshtml
+++ /dev/null
@@ -1,63 +0,0 @@
-@using Newtonsoft.Json
-@using System.Net
-@{
- Dictionary links = JsonConvert.DeserializeObject>(new WebClient().DownloadString($"{Context.Request.Scheme}://{Context.Request.Host}/Links.json"));
-}
-
-
-
-
- @ViewData["Title"] - XFox111.NET
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- XFox111.NET
-
-
- AboutMe();
- CV();
- Projects();
- Arts();
- Contacts();
-
-
- РУС
-
-
-
-
- @RenderBody()
-
-
-
-
-
- @{
- foreach (Link link in new List { links["email"], links["linkedin"], links["github"] })
- {
-
- }
- }
-
-
-
diff --git a/MyWebsite.old/Views/_ViewImports.cshtml b/MyWebsite.old/Views/_ViewImports.cshtml
deleted file mode 100644
index 5ecdfbb..0000000
--- a/MyWebsite.old/Views/_ViewImports.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@using MyWebsite
-@using MyWebsite.Models
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/MyWebsite.old/Views/_ViewStart.cshtml b/MyWebsite.old/Views/_ViewStart.cshtml
deleted file mode 100644
index a5f1004..0000000
--- a/MyWebsite.old/Views/_ViewStart.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@{
- Layout = "_Layout";
-}
diff --git a/MyWebsite.old/appsettings.Development.json b/MyWebsite.old/appsettings.Development.json
deleted file mode 100644
index e203e94..0000000
--- a/MyWebsite.old/appsettings.Development.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Debug",
- "System": "Information",
- "Microsoft": "Information"
- }
- }
-}
diff --git a/MyWebsite.old/appsettings.json b/MyWebsite.old/appsettings.json
deleted file mode 100644
index def9159..0000000
--- a/MyWebsite.old/appsettings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Warning"
- }
- },
- "AllowedHosts": "*"
-}
diff --git a/MyWebsite.old/wwwroot/css/AboutMe.css b/MyWebsite.old/wwwroot/css/AboutMe.css
deleted file mode 100644
index 41d61a8..0000000
--- a/MyWebsite.old/wwwroot/css/AboutMe.css
+++ /dev/null
@@ -1,37 +0,0 @@
-article {
- margin: 0px;
-}
-
-.block {
- position: relative;
- margin-bottom: -10px;
- z-index: -1;
-}
-.block .content {
- position: absolute;
-}
-.block .background {
- width: 100%;
-}
-
-.intro {
- color: white;
- background-color: #00a7dc;
- font-size: 36px;
- text-shadow: 2px 2px 1px black;
-}
-.intro .content {
- bottom: 50px;
- left: 50px;
- max-width: 65%;
-}
-
-.sut {
- color: white;
- background-color: #ff8000;
- font-size: 28px;
- text-shadow: 2px 2px 1px black;
-}
-.sut .content {
- margin: 50px 50px;
-}
\ No newline at end of file
diff --git a/MyWebsite.old/wwwroot/css/Admin.css b/MyWebsite.old/wwwroot/css/Admin.css
deleted file mode 100644
index de3f343..0000000
--- a/MyWebsite.old/wwwroot/css/Admin.css
+++ /dev/null
@@ -1,62 +0,0 @@
-input {
- padding: 10px;
- border-radius: 10px;
- border: 1px solid black;
- width: 100%;
- box-sizing: border-box;
-}
-
-select {
- padding: 10px;
- border: 1px solid black;
- border-radius: 10px;
- width: 100%;
- -moz-appearance: none; /* Firefox */
- -webkit-appearance: none; /* Safari and Chrome */
-}
-
-button {
- margin: 10px;
- border-radius: 10px;
- border: 0px;
- padding: 10px 20px;
- background-color: #343434;
- color: white;
-}
-
-textarea {
- resize: none;
- width: 100%;
- border-radius: 10px;
- border: 1px solid black;
- padding: 10px;
- box-sizing: border-box;
- height: 200px;
- font-family: Consolas;
-}
-
-.select-container::after {
- content: '>';
- transform: rotate(90deg);
- -webkit-transform: rotate(90deg);
- -moz-transform: rotate(90deg);
- -ms-transform: rotate(90deg);
- right: 11px;
- top: 11px;
- position: absolute;
- pointer-events: none;
-}
-
-.select-container {
- position: relative;
-}
-
-form {
- max-width: 50%;
-}
-
-@media only screen and (max-width: 700px) {
- form {
- max-width: initial;
- }
-}
diff --git a/MyWebsite.old/wwwroot/css/ContactsBlock.css b/MyWebsite.old/wwwroot/css/ContactsBlock.css
deleted file mode 100644
index 61dcf0c..0000000
--- a/MyWebsite.old/wwwroot/css/ContactsBlock.css
+++ /dev/null
@@ -1,37 +0,0 @@
-footer {
- display: none;
-}
-
-.contact-me {
- padding: 30px 50px;
- background-color: #1e1e1e;
- color: white;
-}
-
-code {
- font: inherit;
-}
-
-var {
- color: #569cd6;
- font: inherit;
-}
-
-.class {
- color: #4ec9b0;
-}
-
-.string, .string:visited {
- color: #d69d85;
- text-decoration: none;
-}
-.string:link:hover {
- text-decoration: underline;
-}
-
-.method {
- color: #dcdcaa;
-}
-
-.t1 { margin-right: 25px; }
-.t2 { margin-right: 50px; }
\ No newline at end of file
diff --git a/MyWebsite.old/wwwroot/css/Gallery.css b/MyWebsite.old/wwwroot/css/Gallery.css
deleted file mode 100644
index f81e39c..0000000
--- a/MyWebsite.old/wwwroot/css/Gallery.css
+++ /dev/null
@@ -1,35 +0,0 @@
-.gallery img {
- object-fit: cover;
- max-height: 300px;
- max-width: 100%;
- margin: 2px;
- transition: .25s;
-}
-.gallery img:hover {
- filter: brightness(125%);
- transform: scale(1.1);
-}
-
-.image-overview-block img {
- max-height: 50vh;
- max-width: 100%;
- float: left;
- cursor: zoom-in;
-}
-.image-overview-block div {
- display: inline-block;
- margin-left: 20px;
-}
-.image-overview-block h1 {
- margin-bottom: 0px;
-}
-
-@media only screen and (max-width: 600px) {
- .gallery img {
- max-height: none;
- }
- .gallery img:hover {
- filter: brightness(125%);
- transform: none;
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/wwwroot/css/Projects.css b/MyWebsite.old/wwwroot/css/Projects.css
deleted file mode 100644
index 1856c78..0000000
--- a/MyWebsite.old/wwwroot/css/Projects.css
+++ /dev/null
@@ -1,51 +0,0 @@
-header {
- display: grid;
- grid-template-columns: 1fr auto;
- grid-template-rows: auto auto;
- grid-column-gap: 20px;
- margin-bottom: 20px;
-}
-
-article {
- margin: 0px 10px;
-}
-
-.github-stats {
- margin-top: 20px;
- width: 200px;
- height: 110px;
-}
-
-.project-item {
- display: grid;
- padding: 20px;
- padding-top: 0px;
- grid-template-rows: auto auto;
- grid-row-gap: 20px;
- background-color: whitesmoke;
- margin-bottom: 10px;
-}
-
-.badge {
- height: 25px;
- width: 25px;
- margin-right: 10px;
- display: inline-block;
- background-size: contain;
-}
-
-.csharp { background-image: url(../images/Badges/csharp.png); }
-.dotnet { background-image: url("../images/Badges/dotnet.png"); }
-.xamarin { background-image: url("../images/Badges/xamarin.png"); }
-.unity { background-image: url("../images/Badges/unity.png"); }
-.android { background-image: url("../images/Badges/android.png"); }
-.uwp { background-image: url("../images/Badges/windows.png"); }
-.win32 { background-image: url("../images/Badges/windows.png"); }
-.windows { background-image: url("../images/Badges/windows.png"); }
-.ios { background-image: url("../images/Badges/ios.png"); }
-
-@media only screen and (max-width: 600px) {
- .github-stats {
- grid-row: 2;
- }
-}
\ No newline at end of file
diff --git a/MyWebsite.old/wwwroot/css/Style.css b/MyWebsite.old/wwwroot/css/Style.css
deleted file mode 100644
index 0308b2a..0000000
--- a/MyWebsite.old/wwwroot/css/Style.css
+++ /dev/null
@@ -1,122 +0,0 @@
-@font-face {
- font-family: 'Consolas';
- src: url("/fonts/consolas.eot");
- src: url("/fonts/consolas.eot?#iefix") format("embedded-opentype"), url("/fonts/consolas.otf") format("opentype"), url("/fonts/consolas.svg") format("svg"), url("/fonts/consolas.ttf") format("truetype"), url("/fonts/consolas.woff") format("woff"), url("/fonts/consolas.woff2") format("woff2");
-}
-
-@font-face {
- font-family: 'Segoe MDL2 Assets';
- src: url("/fonts/segoeMLD2assets.eot");
- src: url("/fonts/segoeMLD2assets.eot?#iefix") format("embedded-opentype"), url("/fonts/segoeMLD2assets.otf") format("opentype"), url("/fonts/segoeMLD2assets.svg") format("svg"), url("/fonts/segoeMLD2assets.ttf") format("truetype"), url("/fonts/segoeMLD2assets.woff") format("woff"), url("/fonts/segoeMLD2assets.woff2") format("woff2");
-}
-
-/*Header styles*/
-.navbar {
- display: grid;
- grid-template-columns: auto 1fr auto auto;
- grid-column-gap: 10px;
- grid-template-rows: auto auto;
- background-color: #343434;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 10;
- padding: 10px;
- min-height: 33px;
- font-size: 26px;
-}
-
-.navbar a {
- text-decoration: none;
- color: white;
-}
-.navbar a:hover {
- color: gray;
-}
-
-.main-menu {
- margin: 26px auto 26px auto;
- grid-row: 2;
- list-style: none;
-}
-.main-menu li {
- font-size: 20px;
- margin-top: 10px;
-}
-
-.language-switch {
- grid-column: 3;
- user-select: none
-}
-.menu-toggle {
- grid-column: 4;
- cursor: pointer;
- user-select: none;
-}
-
-/*Footer styles*/
-footer {
- padding: 10px;
- display: grid;
- align-items: center;
- grid-template-columns: 1fr auto auto auto;
- grid-column-gap: 10px;
-}
-footer a {
- text-decoration: none;
- color: black;
-}
-footer a:hover {
- color: orangered;
-}
-
-/*Body styles*/
-body {
- margin: 0px;
- margin-top: 53px;
- font-family: Consolas, 'Segoe MDL2 Assets';
-
- /*This stuff is necessary for sticky footer*/
- display: grid;
- grid-template-rows: 1fr auto;
- height: calc(100vh - 53px);
-}
-
-header a {
- text-decoration: none;
- color: black;
-}
-header a:hover {
- text-decoration: underline;
-}
-
-article, header {
- margin: 0px 50px;
-}
-
-article a:visited, article a:link {
- color: blue;
-}
-
-.comment, .comment:visited {
- color: #57a64a;
-}
-
-/*Adaptive code*/
-@media only screen and (min-width: 1000px) {
- .main-menu {
- display: initial !important;
- grid-row: 1;
- grid-column: 2;
- margin: 0px;
- }
- .main-menu li {
- display: inline-block;
- margin-right: 10px;
- margin-top: 0px;
- }
- .menu-toggle {
- display: none;
- }
-}
\ No newline at end of file
diff --git a/MyWebsite/.editorconfig b/MyWebsite/.editorconfig
new file mode 100644
index 0000000..814ea3c
--- /dev/null
+++ b/MyWebsite/.editorconfig
@@ -0,0 +1,4 @@
+[*.cs]
+
+# CA1303: Do not pass literals as localized parameters
+dotnet_diagnostic.CA1303.severity = none
diff --git a/MyWebsite/MyWebsite.sln b/MyWebsite/MyWebsite.sln
index f3c3942..5e4e7ad 100644
--- a/MyWebsite/MyWebsite.sln
+++ b/MyWebsite/MyWebsite.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.181
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWebsite", "MyWebsite\MyWebsite.csproj", "{9FB2B925-DC18-4081-AC91-96F2C49415F9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyWebsite", "MyWebsite\MyWebsite.csproj", "{9FB2B925-DC18-4081-AC91-96F2C49415F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/MyWebsite/MyWebsite/Areas/API/FoxTubeController.cs b/MyWebsite/MyWebsite/Areas/API/FoxTubeController.cs
index 1a1f26f..eece78c 100644
--- a/MyWebsite/MyWebsite/Areas/API/FoxTubeController.cs
+++ b/MyWebsite/MyWebsite/Areas/API/FoxTubeController.cs
@@ -1,50 +1,44 @@
using System;
using System.Linq;
-using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using MyWebsite.Areas.API.Models;
+using System.Globalization;
+using MyWebsite.Models.Databases;
namespace MyWebsite.Areas.API
{
- [Route("API/[controller]")]
- [Area("API")]
[ApiController]
+ [Route("API/[controller]")]
public class FoxTubeController : ControllerBase
{
- FoxTubeDatabaseContext db;
+ readonly FoxTubeDatabaseContext db;
public FoxTubeController(FoxTubeDatabaseContext context) =>
db = context;
- [HttpPost("AddMetrics")]
- public string AddMetrics()
+ [HttpPost]
+ [Route("AddMetrics")]
+ public IActionResult AddMetrics(MetricsPackage package)
{
- MetricsPackage metrics = new MetricsPackage
- {
- Title = Request.Form["Title"],
- Content = Request.Form["Content"],
- Version = Request.Form["Version"],
- TimeStamp = DateTime.Now
- };
-
- db.Metrics.Add(metrics);
+ Guid id = db.Metrics.Add(package).Entity.Id;
db.SaveChanges();
- return db.Metrics.FirstOrDefault(i => i.TimeStamp == metrics.TimeStamp)?.Id.ToString();
+ return Accepted(value: id.ToString());
}
- [HttpGet("Messages")]
- public object Messages(bool toast = false, DateTime? publishedAfter = null, string lang = "en-US")
+ [HttpGet]
+ [Route("Messages")]
+ public IActionResult Messages(bool toast = false, DateTime? publishedAfter = null, string lang = "en-US")
{
- if(toast)
+ if (toast)
{
- Message message = publishedAfter.HasValue ?
- db.Messages.FirstOrDefault(i => i.PublishedAt >= publishedAfter && i.PublishedAt <= DateTime.Now && i.Language == lang) :
+ Message message = publishedAfter.HasValue ?
+ db.Messages.FirstOrDefault(i => i.PublishedAt >= publishedAfter && i.PublishedAt <= DateTime.Now && i.Language == lang) :
db.Messages.OrderByDescending(i => i.PublishedAt).FirstOrDefault();
if (message == null)
return NoContent();
- return $@"
+ return Ok($@"
@@ -53,29 +47,23 @@ namespace MyWebsite.Areas.API
{message.Description}
- ";
+ ");
}
else
- {
- List messages = db.Messages.Where(i => i.PublishedAt <= DateTime.Now).ToList();
-
- return messages;
- }
+ return Ok(db.Messages.Where(i => i.PublishedAt <= DateTime.Now).ToList());
}
- [HttpGet("Changelogs")]
- public object Changelogs(bool toast = false, string version = null, string lang = "en-US")
+ [HttpGet]
+ [Route("Changelogs")]
+ public IActionResult Changelogs(string version, bool toast = false, string lang = "en-US")
{
- if (string.IsNullOrWhiteSpace(version))
- throw new ArgumentNullException("You must specify required version number");
-
- if(toast)
+ if (toast)
{
Changelog changelog = db.Changelogs.FirstOrDefault(i => i.Version == version && i.Language == lang);
if (changelog == null)
return NoContent();
- return $@"
+ return Ok($@"
@@ -84,26 +72,18 @@ namespace MyWebsite.Areas.API
{changelog.Title}
- ";
+ ");
}
else
- {
- List changelogs = db.Changelogs.Where(i => !IsVersionGreater(i.Version, version)).ToList();
-
- return changelogs;
- }
+ return Ok(db.Changelogs.Where(i => !IsVersionGreater(i.Version, version)).ToList());
}
private static bool IsVersionGreater(string versionOne, string versionTwo)
{
- string[] v1 = versionOne.Split('.');
- string[] v2 = versionTwo.Split('.');
+ versionOne = versionOne.Replace(".", "", StringComparison.InvariantCulture);
+ versionTwo = versionTwo.Replace(".", "", StringComparison.InvariantCulture);
- for (int i = 0; i < v1.Length && i < v2.Length; i++)
- if (byte.Parse(v1[i]) > byte.Parse(v2[i]))
- return true;
-
- return false;
+ return short.Parse(versionOne, NumberStyles.Integer, CultureInfo.InvariantCulture) > short.Parse(versionTwo, NumberStyles.Integer, CultureInfo.InvariantCulture);
}
}
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/API/GUTScheduleController.cs b/MyWebsite/MyWebsite/Areas/API/GUTScheduleController.cs
new file mode 100644
index 0000000..0ff785b
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/API/GUTScheduleController.cs
@@ -0,0 +1,17 @@
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.Areas.API
+{
+ [ApiController]
+ [Route("API/[controller]")]
+ public class GUTScheduleController : ExtendedController
+ {
+ public GUTScheduleController(DatabaseContext context) : base(context) { }
+
+ [Route("SemesterOffsetDay")]
+ public string SemesterOffsetDay() =>
+ Database.CustomData.Find("gut.schedule.semester.offset")?.Value ?? "undefined";
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/API/Models/FoxTubeDatabaseContext.cs b/MyWebsite/MyWebsite/Areas/API/Models/FoxTubeDatabaseContext.cs
deleted file mode 100644
index b460f39..0000000
--- a/MyWebsite/MyWebsite/Areas/API/Models/FoxTubeDatabaseContext.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace MyWebsite.Areas.API.Models
-{
- public class FoxTubeDatabaseContext : DbContext
- {
- public DbSet Metrics { get; set; }
- public DbSet Messages { get; set; }
- public DbSet Changelogs { get; set; }
-
- public FoxTubeDatabaseContext(DbContextOptions options) : base(options)
- {
- Database.EnsureCreated();
- }
- }
-}
diff --git a/MyWebsite/MyWebsite/Areas/API/Models/InboxItem.cs b/MyWebsite/MyWebsite/Areas/API/Models/InboxItem.cs
deleted file mode 100644
index b0c86da..0000000
--- a/MyWebsite/MyWebsite/Areas/API/Models/InboxItem.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace MyWebsite.Areas.API.Models
-{
- public class InboxItem
- {
- // Metadata
- [Key]
- [Required]
- [Column(TypeName = "varchae(20)")]
- public string Id { get; set; }
-
- [Required]
- public DateTime PublishedAt { get; set; } = DateTime.Now;
-
-
- // Content
- [Required]
- [Column(TypeName = "varchar(255)")]
- public string Title { get; set; }
-
- [Column(TypeName = "varchar(255)")]
- public string Description { get; set; }
-
- [Required]
- [Column(TypeName = "text")]
- public string Content { get; set; }
-
-
- // Media
- [Column(TypeName = "varchar(255")]
- public string Icon { get; set; }
-
- [Column(TypeName = "varchar(255")]
- public string HeroImage { get; set; }
-
- [Column(TypeName = "varchar(255)")]
- public string HtmlEmbed { get; set; }
- }
-}
diff --git a/MyWebsite/MyWebsite/Areas/API/Models/Message.cs b/MyWebsite/MyWebsite/Areas/API/Models/Message.cs
index d6102ea..ac135a7 100644
--- a/MyWebsite/MyWebsite/Areas/API/Models/Message.cs
+++ b/MyWebsite/MyWebsite/Areas/API/Models/Message.cs
@@ -33,10 +33,10 @@ namespace MyWebsite.Areas.API.Models
// Media
- [Column(TypeName = "varchar(255")]
+ [Column(TypeName = "varchar(255)")]
public string Icon { get; set; } = "https://xfox111.net/projects-assets/FoxTube/DefaultIcon.png";
- [Column(TypeName = "varchar(255")]
+ [Column(TypeName = "varchar(255)")]
public string HeroImage { get; set; } = "https://xfox111.net/projects-assets/FoxTube/DefaultHero.png";
[Column(TypeName = "varchar(255)")]
diff --git a/MyWebsite/MyWebsite/Areas/API/Models/MetricsPackage.cs b/MyWebsite/MyWebsite/Areas/API/Models/MetricsPackage.cs
index 0041b65..cab53de 100644
--- a/MyWebsite/MyWebsite/Areas/API/Models/MetricsPackage.cs
+++ b/MyWebsite/MyWebsite/Areas/API/Models/MetricsPackage.cs
@@ -15,7 +15,7 @@ namespace MyWebsite.Areas.API.Models
public string Title { get; set; }
[Required]
- [Column(TypeName = "mediumtext")]
+ [Column(TypeName = "varchar(max)")]
public string Content { get; set; }
[Required]
@@ -23,6 +23,6 @@ namespace MyWebsite.Areas.API.Models
public string Version { get; set; }
[Required]
- public DateTime TimeStamp { get; set; }
+ public DateTime TimeStamp { get; set; } = DateTime.Now;
}
}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/BadgesController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/BadgesController.cs
index 3a6d099..30b33cd 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Controllers/BadgesController.cs
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/BadgesController.cs
@@ -1,57 +1,52 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System;
+using System.Globalization;
using System.IO;
namespace MyWebsite.Areas.Admin.Controllers
{
[Area("Admin")]
[Authorize]
- public class BadgesController : Controller
+ public class BadgesController : ExtendedController
{
- public BadgesController(DatabaseContext context) =>
- Startup.Database = context;
+ public BadgesController(DatabaseContext context) : base(context) { }
public IActionResult Index() =>
- View(Startup.Database.Badges);
+ View(Database.Badges);
[HttpGet]
public IActionResult Edit(string id) =>
- View(Startup.Database.Badges.Find(id));
+ View(Database.Badges.Find(id));
[HttpPost]
- public IActionResult Edit(Badge model, IFormFile file = null)
+ public IActionResult Edit(BadgeModel model, IFormFile file = null)
{
- if(file != null)
- {
- System.Drawing.Image image = System.Drawing.Image.FromStream(file.OpenReadStream());
- if (image.Width != 64 || image.Height != 64 || !file.FileName.ToLower().EndsWith(".png"))
- {
- ViewData["UploadException"] = "error";
- return View(Startup.Database.Badges.Find(model.Name));
- }
- using (var stream = System.IO.File.Create(Directory.GetCurrentDirectory() + "/wwwroot/images/Badges/" + file.FileName))
- file.CopyTo(stream);
+ if (model == null)
+ throw new ArgumentNullException(nameof(model));
- return Redirect(Request.Path.Value);
- }
+ if (file != null)
+ UploadFile(file, model);
- Startup.Database.Badges.Update(model);
- Startup.Database.SaveChanges();
+ Database.Badges.Update(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
[HttpGet]
public IActionResult Delete(string id) =>
- View(Startup.Database.Badges.Find(id));
+ View(Database.Badges.Find(id));
[HttpPost]
- public IActionResult Delete(Badge model)
+ public IActionResult Delete(BadgeModel model)
{
- Startup.Database.Badges.Remove(model);
- Startup.Database.SaveChanges();
+ Database.Badges.Remove(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
@@ -61,21 +56,13 @@ namespace MyWebsite.Areas.Admin.Controllers
View();
[HttpPost]
- public IActionResult Create(Badge model, IFormFile file = null)
+ public IActionResult Create(BadgeModel model, IFormFile file = null)
{
- if (file != null)
- {
- System.Drawing.Image image = System.Drawing.Image.FromStream(file.OpenReadStream());
- if (image.Width != 64 || image.Height != 64 || !file.FileName.ToLower().EndsWith(".png"))
- {
- ViewData["UploadException"] = "error";
- return View(Startup.Database.Badges.Find(model.Name));
- }
- using (var stream = System.IO.File.Create(Directory.GetCurrentDirectory() + "/wwwroot/images/Badges/" + file.FileName))
- file.CopyTo(stream);
+ if (model == null)
+ throw new ArgumentNullException(nameof(model));
- return Redirect(Request.Path.Value);
- }
+ if (file != null)
+ return UploadFile(file, model);
if (!ModelState.IsValid)
{
@@ -83,10 +70,24 @@ namespace MyWebsite.Areas.Admin.Controllers
return View(model);
}
- Startup.Database.Badges.Add(model);
- Startup.Database.SaveChanges();
+ Database.Badges.Add(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
+
+ private IActionResult UploadFile(IFormFile file, BadgeModel model)
+ {
+ System.Drawing.Image image = System.Drawing.Image.FromStream(file.OpenReadStream());
+ if (image.Width != 64 || image.Height != 64 || !file.FileName.EndsWith(".PNG", true, CultureInfo.InvariantCulture))
+ {
+ ViewData["UploadException"] = "error";
+ return View(model);
+ }
+ using (var stream = System.IO.File.Create(Directory.GetCurrentDirectory() + "/wwwroot/images/Badges/" + file.FileName))
+ file.CopyTo(stream);
+
+ return Redirect(Request.Path.Value);
+ }
}
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/ContactsController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ContactsController.cs
index a8e6bbb..93e12ff 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Controllers/ContactsController.cs
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ContactsController.cs
@@ -1,41 +1,42 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
using MyWebsite.Models;
+using MyWebsite.Models.Databases;
namespace MyWebsite.Areas.Admin.Controllers
{
[Area("Admin")]
[Authorize]
- public class ContactsController : Controller
+ public class ContactsController : ExtendedController
{
- public ContactsController(DatabaseContext context) =>
- Startup.Database = context;
+ public ContactsController(DatabaseContext context) : base(context) { }
public IActionResult Index() =>
- View(Startup.Database.Links);
+ View(Database.Links);
[HttpGet]
public IActionResult Edit(string id) =>
- View(Startup.Database.Links.Find(id));
+ View(Database.Links.Find(id));
[HttpPost]
- public IActionResult Edit(Link model)
+ public IActionResult Edit(LinkModel model)
{
- Startup.Database.Links.Update(model);
- Startup.Database.SaveChanges();
+ Database.Links.Update(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
[HttpGet]
public IActionResult Delete(string id) =>
- View(Startup.Database.Links.Find(id));
+ View(Database.Links.Find(id));
[HttpPost]
- public IActionResult Delete(Link link)
+ public IActionResult Delete(LinkModel model)
{
- Startup.Database.Links.Remove(link);
- Startup.Database.SaveChanges();
+ Database.Links.Remove(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
@@ -45,16 +46,16 @@ namespace MyWebsite.Areas.Admin.Controllers
View();
[HttpPost]
- public IActionResult Create(Link link)
+ public IActionResult Create(LinkModel model)
{
if (!ModelState.IsValid)
{
ModelState.AddModelError("Error", "Invalid data");
- return View(link);
+ return View(model);
}
- Startup.Database.Links.Add(link);
- Startup.Database.SaveChanges();
+ Database.Links.Add(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/CredentialController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/CredentialController.cs
new file mode 100644
index 0000000..f29d5a5
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/CredentialController.cs
@@ -0,0 +1,52 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
+using MyWebsite.Helpers;
+using MyWebsite.Models.Databases;
+using System.Linq;
+
+namespace MyWebsite.Areas.Admin.Controllers
+{
+ [Area("Admin")]
+ [Authorize]
+ public class CredentialController : ExtendedController
+ {
+ const string viewPath = "Areas/Admin/Views/Shared/Credential.cshtml";
+
+ public CredentialController(DatabaseContext context) : base(context) { }
+
+ [HttpGet]
+ public IActionResult Index() =>
+ View(viewPath);
+
+ [HttpPost]
+ public IActionResult Index(Models.CredentialModel model)
+ {
+ MyWebsite.Models.CredentialModel credential = Database.Users.FirstOrDefault();
+
+ if (model == null || model.Current.Email != credential.Email || !Encryptor.VerifyHash(model.Current.Password, credential.Password))
+ {
+ ModelState.AddModelError("Authorization error", "Invaild e-mail or password");
+ return View(viewPath, model);
+ }
+
+ if(string.IsNullOrWhiteSpace(model.Updated.Email) && string.IsNullOrWhiteSpace(model.Current.Password))
+ {
+ ModelState.AddModelError("Validation error", "No data to update");
+ return View(viewPath, model);
+ }
+
+ Database.Users.Remove(credential);
+ Database.SaveChanges();
+ if(!string.IsNullOrWhiteSpace(model.Current.Email))
+ credential.Email = model.Updated.Email;
+ if(!string.IsNullOrWhiteSpace(model.Current.Password))
+ credential.Password = Encryptor.ComputeHash(model.Updated.Password);
+ Database.Users.Add(credential);
+
+ Database.SaveChanges();
+
+ return Redirect("~/Admin/Logout");
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/GUTScheduleController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/GUTScheduleController.cs
new file mode 100644
index 0000000..f482489
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/GUTScheduleController.cs
@@ -0,0 +1,41 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System.Linq;
+
+namespace MyWebsite.Areas.Admin.Controllers
+{
+ [Authorize]
+ [Area("Admin")]
+ public class GUTScheduleController : ExtendedController
+ {
+ const string scheduleOffsetId = "gut.schedule.semester.offset";
+ const string viewPath = "Areas/Admin/Views/Shared/GUTSchedule.cshtml";
+
+ public GUTScheduleController(DatabaseContext context) : base(context) { }
+
+ [HttpGet]
+ public IActionResult Index() =>
+ View(viewPath, Database.CustomData.Find(scheduleOffsetId) ?? new CustomData { Key = scheduleOffsetId, Value = "undefined" });
+
+ [HttpPost]
+ public IActionResult Index(CustomData model)
+ {
+ if(!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Error", "Invalid data");
+ return View(model);
+ }
+
+ if(Database.CustomData.Any(i => i.Key == scheduleOffsetId))
+ Database.CustomData.Update(model);
+ else
+ Database.CustomData.Add(model);
+
+ Database.SaveChanges();
+ return View(viewPath, model);
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/GalleryController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/GalleryController.cs
index ebe1f9b..cf0540e 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Controllers/GalleryController.cs
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/GalleryController.cs
@@ -1,19 +1,98 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Areas.Admin.Models;
+using MyWebsite.Controllers;
using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System;
+using System.IO;
namespace MyWebsite.Areas.Admin.Controllers
{
[Area("Admin")]
[Authorize]
- public class GalleryController : Controller
+ public class GalleryController : ExtendedController
{
- public GalleryController(DatabaseContext context) =>
- Startup.Database = context;
+ public GalleryController(DatabaseContext context) : base(context) { }
public IActionResult Index() =>
- View(Startup.Database.Gallery);
+ View(Database.Gallery);
+ [HttpGet]
+ public IActionResult Edit(Guid id)
+ {
+ if (Database.Gallery.Find(id) is ImageModel model)
+ return View(model);
+ else
+ return NotFound();
+ }
+ [HttpPost]
+ public IActionResult Edit(ImageModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Error", "Invalid data");
+ return View(model);
+ }
+
+ Database.Gallery.Update(model);
+ Database.SaveChanges();
+
+ return RedirectToAction("Index");
+ }
+
+ [HttpGet]
+ public IActionResult Delete(Guid id)
+ {
+ if (Database.Gallery.Find(id) is ImageModel model)
+ return View(model);
+ else
+ return NotFound();
+ }
+
+ [HttpPost]
+ public IActionResult Delete(ImageModel model)
+ {
+ Database.Gallery.Remove(model);
+ Database.SaveChanges();
+
+ System.IO.File.SetAttributes(Directory.GetCurrentDirectory() + "/wwwroot/images/Gallery/" + model?.FileName, FileAttributes.Normal);
+ System.IO.File.Delete(Directory.GetCurrentDirectory() + "/wwwroot/images/Gallery/" + model?.FileName);
+
+ return RedirectToAction("Index");
+ }
+
+ [HttpGet]
+ public IActionResult Upload() =>
+ View();
+
+ [HttpPost]
+ public IActionResult Upload(ArtworkModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Error", "Invalid data");
+ return View(model);
+ }
+
+ using (var stream = System.IO.File.Create(Directory.GetCurrentDirectory() + "/wwwroot/images/Gallery/" + model?.File.FileName))
+ model.File.CopyTo(stream);
+
+ ImageModel image = new ImageModel
+ {
+ EnglishTitle = model.EnglishTitle,
+ RussianTitle = model.RussianTitle,
+ EnglishDescription = model.EnglishDescription,
+ RussianDescription = model.RussianDescription,
+ CreationDate = model.CreationDate,
+ FileName = model.File.FileName
+ };
+
+ Database.Gallery.Add(image);
+ Database.SaveChanges();
+
+ return RedirectToAction("Index");
+ }
}
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/ProjectsController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ProjectsController.cs
new file mode 100644
index 0000000..43c3b11
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ProjectsController.cs
@@ -0,0 +1,63 @@
+using System.Collections.Generic;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.Areas.Admin.Controllers
+{
+ [Area("Admin")]
+ [Authorize]
+ public class ProjectsController : ExtendedController
+ {
+ public ProjectsController(DatabaseContext context) : base(context) { }
+
+ public IActionResult Index() =>
+ View((Database.Projects as IEnumerable, Database.Badges as IEnumerable));
+
+ [HttpGet]
+ public IActionResult Delete(decimal id) =>
+ View(Database.Projects.Find(id));
+
+ [HttpPost]
+ public IActionResult Delete(ProjectModel model)
+ {
+ Database.Projects.Remove(model);
+ Database.SaveChanges();
+
+ return RedirectToAction("Index");
+ }
+
+ [HttpGet]
+ public IActionResult Create() =>
+ View();
+
+ [HttpPost]
+ public IActionResult Create(ProjectModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Error", "Invalid data");
+ return View(model);
+ }
+
+ Database.Projects.Add(model);
+ Database.SaveChanges();
+
+ return RedirectToAction("Index");
+ }
+ }
+
+ public class ProjectEditorModel
+ {
+ public double Id { get; set; }
+ public string EnglishTitle { get; set; }
+ public string RussianTitle { get; set; }
+ public string EnglishDescription { get; set; }
+ public string RussianDescription { get; set; }
+ public string Link { get; set; }
+ public string EnglishLinkCaption { get; set; }
+ public string RussianLinkCaption { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Controllers/ResumeController.cs b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ResumeController.cs
index f862112..5eaf949 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Controllers/ResumeController.cs
+++ b/MyWebsite/MyWebsite/Areas/Admin/Controllers/ResumeController.cs
@@ -1,43 +1,54 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
using MyWebsite.Models;
+using MyWebsite.Models.Databases;
using System;
namespace MyWebsite.Areas.Admin.Controllers
{
[Authorize]
[Area("Admin")]
- public class ResumeController : Controller
+ public class ResumeController : ExtendedController
{
- public ResumeController(DatabaseContext context) =>
- Startup.Database = context;
+ public ResumeController(DatabaseContext context) : base(context) { }
public IActionResult Index() =>
- View(Startup.Database.Resume);
+ View(Database.Resume);
[HttpGet]
public IActionResult Edit(string id) =>
- View(Startup.Database.Resume.Find(id));
+ View(Database.Resume.Find(id));
[HttpPost]
- public IActionResult Edit(Resume model)
+ public IActionResult Edit(ResumeModel model)
{
+ if (model == null)
+ throw new ArgumentNullException(nameof(model));
+
+ if (!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Error", "Invalid data");
+ return View(model);
+ }
+
model.LastUpdate = DateTime.Now;
- Startup.Database.Resume.Update(model);
- Startup.Database.SaveChanges();
+
+ Database.Resume.Update(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
[HttpGet]
public IActionResult Delete(string id) =>
- View(Startup.Database.Resume.Find(id));
+ View(Database.Resume.Find(id));
[HttpPost]
- public IActionResult Delete(Resume model)
+ public IActionResult Delete(ResumeModel model)
{
- Startup.Database.Resume.Remove(model);
- Startup.Database.SaveChanges();
+ Database.Resume.Remove(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
@@ -47,17 +58,21 @@ namespace MyWebsite.Areas.Admin.Controllers
View();
[HttpPost]
- public IActionResult Create(Resume model)
+ public IActionResult Create(ResumeModel model)
{
- model.LastUpdate = DateTime.Now;
+ if (model == null)
+ throw new ArgumentNullException(nameof(model));
+
if (!ModelState.IsValid)
{
ModelState.AddModelError("Error", "Invalid data");
return View(model);
}
- Startup.Database.Resume.Add(model);
- Startup.Database.SaveChanges();
+ model.LastUpdate = DateTime.Now;
+
+ Database.Resume.Add(model);
+ Database.SaveChanges();
return RedirectToAction("Index");
}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Models/ArtworkModel.cs b/MyWebsite/MyWebsite/Areas/Admin/Models/ArtworkModel.cs
new file mode 100644
index 0000000..e797671
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Models/ArtworkModel.cs
@@ -0,0 +1,29 @@
+using Microsoft.AspNetCore.Http;
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+
+namespace MyWebsite.Areas.Admin.Models
+{
+ public class ArtworkModel
+ {
+ [Required]
+ [DisplayName("Title (en)")]
+ public string EnglishTitle { get; set; }
+ [DisplayName("Title (ru)")]
+ public string RussianTitle { get; set; }
+
+ [Required]
+ [DisplayName("Description (en)")]
+ public string EnglishDescription { get; set; }
+ [DisplayName("Description (ru)")]
+ public string RussianDescription { get; set; }
+
+ [Required]
+ [DisplayName("Created")]
+ public DateTime CreationDate { get; set; }
+ [Required]
+ [DisplayName("File")]
+ public IFormFile File { get; set; }
+ }
+}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Models/CredentialModel.cs b/MyWebsite/MyWebsite/Areas/Admin/Models/CredentialModel.cs
new file mode 100644
index 0000000..1616de8
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Models/CredentialModel.cs
@@ -0,0 +1,14 @@
+using MyWebsite.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace MyWebsite.Areas.Admin.Models
+{
+ public class CredentialModel
+ {
+ public MyWebsite.Models.CredentialModel Current { get; set; } = new MyWebsite.Models.CredentialModel();
+ public MyWebsite.Models.CredentialModel Updated { get; set; } = new MyWebsite.Models.CredentialModel();
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Models/ReorderModel.cs b/MyWebsite/MyWebsite/Areas/Admin/Models/ReorderModel.cs
new file mode 100644
index 0000000..8af77d4
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Models/ReorderModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace MyWebsite.Areas.Admin.Models
+{
+ public enum ReorderDirection { Up, Down }
+ public class ReorderModel
+ {
+ public string ItemId { get; set; }
+ public ReorderDirection Direction { get; set; }
+ }
+}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Create.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Create.cshtml
index 68aa1bb..a71224d 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Create.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Create.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Badge
+@model MyWebsite.Models.BadgeModel
@using System.IO;
@{
ViewData["Title"] = "Create badge";
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Delete.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Delete.cshtml
index cac35ea..254b613 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Delete.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Delete.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Badge
+@model MyWebsite.Models.BadgeModel
@{
ViewData["Title"] = "Delete badge";
@@ -11,14 +11,14 @@
-
+
@Html.DisplayNameFor(model => model.Name): @Model.Name
@Html.DisplayNameFor(model => model.EnglishDescription): @Model.EnglishDescription
@Html.DisplayNameFor(model => model.RussianDescription): @Model.RussianDescription
@Html.DisplayNameFor(model => model.Image): @(Model.Image).png
Preview:
-
+
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Edit.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Edit.cshtml
index 2aa0103..b6925a8 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Edit.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Edit.cshtml
@@ -1,5 +1,5 @@
@using System.IO;
-@model MyWebsite.Models.Badge
+@model MyWebsite.Models.BadgeModel
@{
ViewData["Title"] = "Edit badge";
List files = new List();
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Index.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Index.cshtml
index 6df9836..e161387 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Index.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Index.cshtml
@@ -1,4 +1,4 @@
-@model IEnumerable
+@model IEnumerable
@{
ViewData["Title"] = "Badges list";
}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Create.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Create.cshtml
index c9cd439..2fdcc9e 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Create.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Create.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Link
+@model MyWebsite.Models.LinkModel
@{
ViewData["Title"] = "Create link";
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Delete.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Delete.cshtml
index 0b6fb31..a456c30 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Delete.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Delete.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Link
+@model MyWebsite.Models.LinkModel
@{
ViewData["Title"] = "Delete link";
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Edit.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Edit.cshtml
index 9b26e3d..df2189b 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Edit.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Edit.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Link
+@model MyWebsite.Models.LinkModel
@{
ViewData["Title"] = "Edit link";
}
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Index.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Index.cshtml
index 8fd2fdf..13deb2a 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Index.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Contacts/Index.cshtml
@@ -1,4 +1,4 @@
-@model IEnumerable
+@model IEnumerable
@{
ViewData["Title"] = "Links list";
}
@@ -15,9 +15,7 @@
-
- @Html.DisplayNameFor(model => model.Order)
-
+ Reorder
@Html.DisplayNameFor(model => model.Name)
@@ -45,8 +43,8 @@
@foreach (var item in Model.OrderBy(i => i.Order))
{
-
- @item.Order
+
+
@item.Name
@item.EnglishTitle
@item.RussianTitle
@@ -68,4 +66,10 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Delete.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Delete.cshtml
new file mode 100644
index 0000000..24bb4cc
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Delete.cshtml
@@ -0,0 +1,34 @@
+@model MyWebsite.Models.ImageModel
+@{
+ ViewData["Title"] = "Delete artwork";
+}
+
+
+
+
+
+
+
+
+ @Html.DisplayNameFor(model => model.Title): @Model.Title
+ @Html.DisplayNameFor(model => model.CreationDate): @Model.CreationDate
+ @Html.DisplayNameFor(model => model.FileName): @Model.FileName
+
+
+
+ @Html.DisplayNameFor(model => model.Description): @Html.Raw(Model.Description)
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Edit.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Edit.cshtml
new file mode 100644
index 0000000..2addcc2
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Edit.cshtml
@@ -0,0 +1,48 @@
+@model MyWebsite.Models.ImageModel
+@{
+ ViewData["Title"] = "Edit artwork";
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Index.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Index.cshtml
index dcdfa32..22b54d7 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Index.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Index.cshtml
@@ -1,4 +1,4 @@
-@model IEnumerable
+@model IEnumerable
@{
ViewData["Title"] = "Gallery";
}
@@ -13,25 +13,22 @@
- @foreach (Image item in Model)
+ @foreach (ImageModel item in Model)
{
-
+
@item.Title
-
ID: @item.Id |
-
File name: @item.FileName |
-
Language: @item.Language
+
File name: @item.FileName
Creation date: @item.CreationDate.ToShortDateString()
- @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
- @Html.ActionLink("Delete", "Delete", new { id = item.Id })
+ @Html.ActionLink("Edit", "Edit", new { id = item.FileName }) |
+ @Html.ActionLink("Delete", "Delete", new { id = item.FileName })
-
@Html.Raw(item.Description)
-
+
}
@@ -42,5 +39,9 @@
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Upload.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Upload.cshtml
new file mode 100644
index 0000000..72c9bfa
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Gallery/Upload.cshtml
@@ -0,0 +1,49 @@
+@model ArtworkModel
+@{
+ ViewData["Title"] = "Upload artwork";
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Create.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Create.cshtml
new file mode 100644
index 0000000..3ea0b3a
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Create.cshtml
@@ -0,0 +1,64 @@
+@model MyWebsite.Models.ProjectModel
+@{
+ ViewData["Title"] = "New Project";
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Delete.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Delete.cshtml
new file mode 100644
index 0000000..6005a6e
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Delete.cshtml
@@ -0,0 +1,31 @@
+@model MyWebsite.Models.ProjectModel
+@{
+ ViewData["Title"] = "Delete project";
+}
+
+
+ Back to the list
+ Delete project entry
+ Are you sure you want to delete this?
+
+
+
+
+ @Html.DisplayNameFor(model => model.Id): @Model.Id
+ @Html.DisplayNameFor(model => model.EnglishTitle): @Model.EnglishTitle
+ @Html.DisplayNameFor(model => model.RussianTitle): @Model.RussianTitle
+ @Html.DisplayNameFor(model => model.EnglishDescription): @Model.EnglishDescription
+ @Html.DisplayNameFor(model => model.RussianDescription): @Model.RussianDescription
+ @Html.DisplayNameFor(model => model.Link): @Model.Link
+ @Html.DisplayNameFor(model => model.EnglishLinkCaption): @Model.EnglishLinkCaption
+ @Html.DisplayNameFor(model => model.RussianLinkCaption): @Model.RussianLinkCaption
+ @Html.DisplayNameFor(model => model.Badges): @Model.Badges
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Index.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Index.cshtml
new file mode 100644
index 0000000..ed8264d
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Projects/Index.cshtml
@@ -0,0 +1,79 @@
+@model (IEnumerable projects, IEnumerable badges)
+@{
+ ViewData["Title"] = "Projects";
+}
+
+
+
+
+
+
+
+
+ @Html.DisplayNameFor(model => model.projects.First().Id)
+
+
+ @Html.DisplayNameFor(model => model.projects.First().EnglishTitle)
+
+
+ @Html.DisplayNameFor(model => model.projects.First().RussianTitle)
+
+
+ @Html.DisplayNameFor(model => model.projects.First().Link)
+
+
+ @Html.DisplayNameFor(model => model.projects.First().Badges)
+
+
+
+
+
+ @foreach (var item in Model.projects.OrderByDescending(i => i.Id))
+ {
+
+ @item.Id
+ @item.EnglishTitle
+ @item.RussianTitle
+ @item.Link
+
+
+ @foreach (string badge in item.Badges.Split(','))
+ {
+
i.Name == badge)?.Image + ".png")" title="@(Model.badges.FirstOrDefault(i => i.Name == badge)?.Description)">
+ }
+
+
+
+ Edit |
+ Delete
+
+
+ }
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Create.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Create.cshtml
index ffca78c..c5eb8a9 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Create.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Create.cshtml
@@ -1,5 +1,5 @@
-@model MyWebsite.Models.Resume
-
+@using System.Globalization
+@model MyWebsite.Models.ResumeModel
@{
ViewData["Title"] = "Create resume";
}
@@ -23,7 +23,7 @@
-
+
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Delete.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Delete.cshtml
index 0b12200..348db35 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Delete.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Delete.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Resume
+@model MyWebsite.Models.ResumeModel
@{
ViewData["Title"] = "Delete resume";
}
@@ -11,7 +11,7 @@
- @Html.DisplayNameFor(model => model.Language): @Model.Language
+ @Html.DisplayNameFor(model => model.Language): @(new System.Globalization.CultureInfo(Model.Language).DisplayName)
@Html.DisplayNameFor(model => model.LastUpdate): @Model.LastUpdate
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Edit.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Edit.cshtml
index 10c2f12..a4c23f5 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Edit.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Edit.cshtml
@@ -1,4 +1,4 @@
-@model MyWebsite.Models.Resume
+@model MyWebsite.Models.ResumeModel
@{
ViewData["Title"] = "Edit resume";
@@ -7,24 +7,24 @@
+
-
-
-
-
-
- Done
-
+
@@ -44,7 +44,7 @@
document.execCommand("copy");
window.getSelection().removeAllRanges();
document.getElementById("copied").style.display = "initial";
- await delay(3000);
+ await new Promise(res => setTimeout(res, 3000));
document.getElementById("copied").style.display = "none";
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Index.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Index.cshtml
index 14a70ad..cc19d2f 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Index.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Resume/Index.cshtml
@@ -1,4 +1,4 @@
-@model IEnumerable
+@model IEnumerable
@{
ViewData["Title"] = "Resumes";
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/Credential.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/Credential.cshtml
new file mode 100644
index 0000000..f34441e
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/Credential.cshtml
@@ -0,0 +1,69 @@
+@model MyWebsite.Areas.Admin.Models.CredentialModel
+@{
+ ViewData["Title"] = "Edit credential";
+}
+
+
+
+
+
+
+
+ New e-mail:
+
+
+ Confirm e-mail:
+
+
+
+ New password:
+
+
+ Confirm password:
+
+
+
+ Current e-mail:
+
+
+ Current password:
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/GUTSchedule.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/GUTSchedule.cshtml
new file mode 100644
index 0000000..2f9e041
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/Shared/GUTSchedule.cshtml
@@ -0,0 +1,22 @@
+@model CustomData
+@{
+ ViewData["Title"] = "GUTSchedule";
+}
+
+
+
+
+
+
+
+ First work day in the semester: (Current: @Model.Value)
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Admin/Views/_ViewImports.cshtml b/MyWebsite/MyWebsite/Areas/Admin/Views/_ViewImports.cshtml
index 5ecdfbb..76e750d 100644
--- a/MyWebsite/MyWebsite/Areas/Admin/Views/_ViewImports.cshtml
+++ b/MyWebsite/MyWebsite/Areas/Admin/Views/_ViewImports.cshtml
@@ -1,3 +1,5 @@
@using MyWebsite
@using MyWebsite.Models
+@using MyWebsite.ViewModels
+@using MyWebsite.Areas.Admin.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Controllers/FoxTubeController.cs b/MyWebsite/MyWebsite/Areas/Projects/Controllers/FoxTubeController.cs
index b4dbc29..cf34690 100644
--- a/MyWebsite/MyWebsite/Areas/Projects/Controllers/FoxTubeController.cs
+++ b/MyWebsite/MyWebsite/Areas/Projects/Controllers/FoxTubeController.cs
@@ -1,15 +1,58 @@
-using System;
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.Controllers;
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
+using System.IO;
+using System.Globalization;
+using MyWebsite.Areas.Projects.Models;
namespace MyWebsite.Areas.Projects.Controllers
{
[Area("Projects")]
- public class FoxTubeController : Controller
+ public class FoxTubeController : ExtendedController
{
+ readonly DatabaseContext db;
+ readonly List paths = new List();
+ readonly List files;
+ public FoxTubeController(DatabaseContext context) : base(context)
+ {
+ db = context;
+
+ Scan(Directory.GetCurrentDirectory() + "\\wwwroot\\assets\\FoxTube\\Screenshots\\" + CultureInfo.CurrentUICulture.ThreeLetterISOLanguageName, paths);
+
+ for (int i = 0; i < paths.Count; i++)
+ paths[i] = paths[i].Substring(paths[i].IndexOf("Screenshots", System.StringComparison.OrdinalIgnoreCase));
+
+ files = paths.Select(i => i.Substring(i.LastIndexOf('\\') + 1)).ToList();
+ }
+
public IActionResult Index() =>
- View("Areas/Projects/Views/FoxTube.cshtml");
+ View(new ScreenshotViewModel(db)
+ {
+ Paths = paths,
+ Names = files
+ });
+
+ public IActionResult Screenshot(string id) =>
+ View(new ScreenshotViewModel(db)
+ {
+ Paths = paths,
+ Names = files,
+ Current = id
+ });
+
+ public IActionResult Privacy() =>
+ View(new ResumeViewModel(db, CultureInfo.CurrentCulture));
+
+ void Scan(string path, List files)
+ {
+ foreach (string p in Directory.GetFiles(path))
+ files.Add(p);
+
+ foreach (string p in Directory.GetDirectories(path))
+ Scan(p, files);
+ }
}
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Models/ScreenshotViewModel.cs b/MyWebsite/MyWebsite/Areas/Projects/Models/ScreenshotViewModel.cs
new file mode 100644
index 0000000..6b9be80
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Models/ScreenshotViewModel.cs
@@ -0,0 +1,19 @@
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
+using System.Collections.Generic;
+
+namespace MyWebsite.Areas.Projects.Models
+{
+ public class ScreenshotViewModel : ViewModelBase
+ {
+ public List Paths { get; set; }
+ public List Names { get; set; }
+ public string Current { get; set; }
+
+ public int Position => Names.IndexOf(Current);
+ public string Next => Names.Count == Position + 1 ? null : Names[Position + 1];
+ public string Previous => Position > 0 ? Names[Position - 1] : null;
+
+ public ScreenshotViewModel(DatabaseContext context) : base(context) { }
+ }
+}
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube.cshtml
deleted file mode 100644
index 7723a39..0000000
--- a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube.cshtml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-@{
- ViewData["Title"] = "FoxTube";
-}
-
-FoxTube
-
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Index.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Index.cshtml
new file mode 100644
index 0000000..b3620c7
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Index.cshtml
@@ -0,0 +1,100 @@
+@model ScreenshotViewModel
+@{
+ ViewData["Title"] = "Meet FoxTube!";
+ Layout = "_Layout.cshtml";
+}
+
+
+
+
+
+
+
Back to other projects
+
+
Available on
+
Requires Windows 10 April 2018 Update or higher
+
+ PC
+ Surface Hub
+ HoloLens
+
+
+
Trailer
+
+ VIDEO
+
+
+
Description
+
+ YouTube client for Windows 10 family devices. It's fast and convenient. It also supports live streams and 8K videos! Frequent updates will make you sure that all problems will be purged as soon as possible
+
+
+
Features
+
+ New fresh view for YouTube
+ But so familiar...
+ Faster browsing: up to 40% faster than through You-know-who (Google Chrome)!
+ Nice dark theme for vampires
+ Picture-in-picture mode for hard workers
+ Download videos! Spread communism!*
+ 8K support for big ones
+ Fox on logo!
+
+
+
Screenshots
+
+ @for (int i = 0; i < Model.Paths.Count; i++)
+ {
+
+ }
+
+
+
+
+
Useufl links
+
+
+
Credits
+
Demo footage content
+
Trailer
+
+
Screenshots and live
+
+
+
+ © @(DateTime.Today.Year) Michael Gordeev
+ © @(DateTime.Today.Year) YouTube LLC
+
+
+
+
+@section Imports {
+
+
+
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Privacy.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Privacy.cshtml
new file mode 100644
index 0000000..b5ef455
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Privacy.cshtml
@@ -0,0 +1,30 @@
+@model ResumeViewModel
+@{
+ ViewData["Title"] = "Privacy policy";
+ Layout = "_Layout.cshtml";
+}
+
+
+
+
+ @Html.Raw(Model?.Resume.Content)
+
+
+@section Imports {
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Screenshot.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Screenshot.cshtml
new file mode 100644
index 0000000..e160358
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/Screenshot.cshtml
@@ -0,0 +1,60 @@
+@using System.IO
+@using System.Globalization
+@model ScreenshotViewModel
+@{
+ ViewData["Title"] = "Screenshot";
+ Layout = "_Layout.cshtml";
+}
+
+
+
+ Back to description
+ @if (Model.Previous != null)
+ {
+ @:|
+ Previous
+ }
+ @if (Model.Next != null)
+ {
+ @:|
+ Next
+ }
+
+
+
+ @Model.Current
+
+
+
+
+
+@section Imports {
+
+
+
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/_Layout.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/_Layout.cshtml
new file mode 100644
index 0000000..1fc0c39
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Views/FoxTube/_Layout.cshtml
@@ -0,0 +1,92 @@
+@model ViewModelBase
+
+
+
+ @ViewData["Title"] - FoxTube - XFox111.NET
+
+
+
+
+
+
+
+
+ @RenderSection("Imports", false)
+
+ @if (IsSectionDefined("OpenGraph"))
+ RenderSection("OpenGraph");
+ else
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+
+
+
+
+
+
+
+ FoxTube
+ YouTube client for Windows 10
+
+
+
+ Home();
+ MyResume();
+ Projects();
+ Arts();
+ Contacts();
+
+
+
+ XFox111.NET
+ РУС
+
+
+
+
+
+ @RenderBody()
+
+
+ @{
+ if (IsSectionDefined("Footer"))
+ RenderSection("Footer");
+ else
+ {
+
+ }
+ }
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Areas/Projects/Views/_ViewImports.cshtml b/MyWebsite/MyWebsite/Areas/Projects/Views/_ViewImports.cshtml
new file mode 100644
index 0000000..9b871bf
--- /dev/null
+++ b/MyWebsite/MyWebsite/Areas/Projects/Views/_ViewImports.cshtml
@@ -0,0 +1,6 @@
+@using MyWebsite
+@using MyWebsite.Areas.Projects
+@using MyWebsite.Areas.Projects.Models
+@using MyWebsite.Models
+@using MyWebsite.ViewModels
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
diff --git a/MyWebsite/MyWebsite/Controllers/AdminController.cs b/MyWebsite/MyWebsite/Controllers/AdminController.cs
index ee81c54..ceec05a 100644
--- a/MyWebsite/MyWebsite/Controllers/AdminController.cs
+++ b/MyWebsite/MyWebsite/Controllers/AdminController.cs
@@ -7,53 +7,65 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MyWebsite.Helpers;
using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
namespace MyWebsite.Controllers
{
- [Authorize]
- public class AdminController : Controller
- {
- public AdminController(DatabaseContext context) =>
- Startup.Database = context;
+ [Authorize]
+ public class AdminController : ExtendedController
+ {
+ public AdminController(DatabaseContext context) : base(context) { }
- public IActionResult Index() =>
- View();
+ public IActionResult Index() =>
+ View();
- [AllowAnonymous]
- [HttpGet]
- public IActionResult Login() =>
- View();
+ [AllowAnonymous]
+ [HttpGet]
+ public IActionResult Login() =>
+ View(new CredentialViewModel(Database));
- [AllowAnonymous]
- [HttpPost]
- [ValidateAntiForgeryToken]
- public async Task Login(LoginModel model)
- {
- if (!ModelState.IsValid)
- {
- ModelState.AddModelError("Authorization error", "Invalid data");
- return View(model);
- }
+ [AllowAnonymous]
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Login(CredentialViewModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ ModelState.AddModelError("Authorization error", "Invalid data");
+ return View(new CredentialViewModel(Database, model));
+ }
- LoginModel user = Startup.Database.Users.FirstOrDefault(i => i.Email == model.Email);
- if (user == null || !Cryptography.VerifyHash(model.Password, "SHA512", user.Password))
- {
- ModelState.AddModelError("Authorization error", "Invaild e-mail or password");
- return View(model);
- }
+ CredentialModel user = Database.Users.FirstOrDefault(i => i.Email == model.Credential.Email);
+ if (user == null || !Encryptor.VerifyHash(model?.Credential.Password, user.Password))
+ {
+ ModelState.AddModelError("Authorization error", "Invaild e-mail or password");
+ return View(new CredentialViewModel(Database, model));
+ }
- Claim claim = new Claim(ClaimsIdentity.DefaultNameClaimType, user.Email);
+ Claim claim = new Claim(ClaimsIdentity.DefaultNameClaimType, user.Email);
- ClaimsIdentity id = new ClaimsIdentity(new Claim[] { claim }, "ApplicationCookie", ClaimsIdentity.DefaultNameClaimType, ClaimsIdentity.DefaultRoleClaimType);
- await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(id));
+ ClaimsIdentity id = new ClaimsIdentity(new Claim[] { claim }, "ApplicationCookie", ClaimsIdentity.DefaultNameClaimType, ClaimsIdentity.DefaultRoleClaimType);
+ await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(id)).ConfigureAwait(false);
- return RedirectToAction("Index", "Admin");
- }
+ return RedirectToAction("Index", "Admin");
+ }
- public async Task Logout()
- {
- await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
- return RedirectToAction("Login", "Admin");
- }
- }
+ public async Task Logout()
+ {
+ await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme).ConfigureAwait(false);
+ return RedirectToAction("Login", "Admin");
+ }
+
+ [AllowAnonymous]
+ public bool ResetPassword(string id)
+ {
+ CredentialModel user = Database.Users.Find("michael.xfox@outlook.com");
+ user.Password = Encryptor.ComputeHash(id);
+ Database.Users.Update(user);
+ Database.SaveChanges();
+
+ return true;
+ }
+ }
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Controllers/GalleryController.cs b/MyWebsite/MyWebsite/Controllers/GalleryController.cs
index 8b4b554..4d171d3 100644
--- a/MyWebsite/MyWebsite/Controllers/GalleryController.cs
+++ b/MyWebsite/MyWebsite/Controllers/GalleryController.cs
@@ -1,18 +1,17 @@
using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
-using System.Linq;
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
namespace MyWebsite.Controllers
{
- public class GalleryController : Controller
- {
- public GalleryController(DatabaseContext context) =>
- Startup.Database = context;
+ public class GalleryController : ExtendedController
+ {
+ public GalleryController(DatabaseContext context) : base(context) { }
- public IActionResult Index() =>
- View(Startup.Database.Gallery);
+ public IActionResult Index() =>
+ View(new ArtworkViewModel(Database));
- public IActionResult Details(string id) =>
- View(Startup.Database.Gallery.FirstOrDefault(i => i.FileName == id));
- }
+ public IActionResult Details(string id) =>
+ View(new ArtworkViewModel(Database, id));
+ }
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Controllers/HomeController.cs b/MyWebsite/MyWebsite/Controllers/HomeController.cs
index 78762ab..eefde7a 100644
--- a/MyWebsite/MyWebsite/Controllers/HomeController.cs
+++ b/MyWebsite/MyWebsite/Controllers/HomeController.cs
@@ -1,29 +1,33 @@
using System.Diagnostics;
-using System.Linq;
using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
namespace MyWebsite.Controllers
{
- public class HomeController : Controller
- {
- public HomeController(DatabaseContext context) =>
- Startup.Database = context;
+ public class HomeController : ExtendedController
+ {
+ public HomeController(DatabaseContext context) : base(context) { }
- public IActionResult Index() =>
- View();
+ [Route("")]
+ public IActionResult Index() =>
+ View();
- [Route("Contacts")]
- public IActionResult Contacts() =>
- View(Startup.Database.Links.OrderBy(i => i.Order));
+ [Route("Contacts")]
+ public IActionResult Contacts() =>
+ View();
- [Route("Projects")]
- public IActionResult Projects() =>
- View(Startup.Database.Projects.OrderByDescending(i => i.Id));
+ [Route("Projects")]
+ public IActionResult Projects() =>
+ View(new ProjectsViewModel(Database));
- [Route("Error")]
- [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
- public IActionResult Error() =>
- View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
- }
+ [Route("Construction")]
+ public IActionResult Construction() =>
+ View();
+
+ [Route("Error")]
+ [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
+ public IActionResult Error() =>
+ View(new ErrorViewModel(Database) { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
+ }
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Controllers/ResumeController.cs b/MyWebsite/MyWebsite/Controllers/ResumeController.cs
index a547ed0..0d9d1e9 100644
--- a/MyWebsite/MyWebsite/Controllers/ResumeController.cs
+++ b/MyWebsite/MyWebsite/Controllers/ResumeController.cs
@@ -1,37 +1,41 @@
using Microsoft.AspNetCore.Mvc;
-using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using MyWebsite.ViewModels;
using SelectPdf;
using System.Globalization;
namespace MyWebsite.Controllers
{
- public class ResumeController : Controller
- {
- public ResumeController(DatabaseContext context) =>
- Startup.Database = context;
+ public class ResumeController : ExtendedController
+ {
+ public ResumeController(DatabaseContext context) : base(context) { }
- public IActionResult Index() =>
- View(Startup.Database.Resume.Find(CultureInfo.CurrentUICulture.Name) ?? Startup.Database.Resume.Find("en-US"));
+ public IActionResult Index()
+ {
+ ResumeViewModel model = new ResumeViewModel(Database, CultureInfo.CurrentUICulture);
+ model.Resume.Content = model.Resume.Content
+ .Replace("%WEBSITE%", $"{Request.Scheme}://{Request.Host}/", true, CultureInfo.InvariantCulture)
+ .Replace("%PHONE_NUMBER%", "+7 (996) 929-19-69", true, CultureInfo.InvariantCulture)
+ .Replace("%EMAIL%", Database.Links.Find("outlook").Username, true, CultureInfo.InvariantCulture);
+ return View(model);
+ }
- public IActionResult Print() =>
- View(Startup.Database.Resume.Find(CultureInfo.CurrentUICulture.Name) ?? Startup.Database.Resume.Find("en-US"));
+ public IActionResult Print() =>
+ Index();
- public IActionResult Download()
- {
- HtmlToPdf converter = new HtmlToPdf();
- converter.Options.MarginTop = 25;
- converter.Options.MarginBottom = 25;
- converter.Options.MarginLeft = 25;
- converter.Options.MarginRight = 25;
- PdfDocument doc = converter.ConvertHtmlString(
- $@"
- {(Startup.Database.Resume.Find(CultureInfo.CurrentUICulture.Name) ?? Startup.Database.Resume.Find("en-US")).Content}
+ public IActionResult Download()
+ {
+ HtmlToPdf converter = new HtmlToPdf();
+ converter.Options.MarginTop = 25;
+ converter.Options.MarginBottom = 25;
+ converter.Options.MarginLeft = 25;
+ converter.Options.MarginRight = 25;
-
- ");
- byte[] data = doc.Save();
- doc.Close();
- return File(data, "application/pdf", "[Michael Gordeev] CV.pdf");
- }
- }
+ PdfDocument doc = converter.ConvertUrl($"{Request.Scheme}://{Request.Host}/Resume/Print#preview");
+ byte[] data = doc.Save();
+ doc.Close();
+
+ return File(data, "application/pdf", "[Michael Gordeev] CV.pdf");
+ }
+ }
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Helpers/Cryptography.cs b/MyWebsite/MyWebsite/Helpers/Cryptography.cs
deleted file mode 100644
index f4f2c55..0000000
--- a/MyWebsite/MyWebsite/Helpers/Cryptography.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace MyWebsite.Helpers
-{
- public class Cryptography
- {
- public static string ComputeHash(string plainText, string hashAlgorithm, byte[] saltBytes)
- {
- // If salt is not specified, generate it.
- if (saltBytes == null)
- {
- // Define min and max salt sizes.
- int minSaltSize = 4;
- int maxSaltSize = 8;
-
- // Generate a random number for the size of the salt.
- Random random = new Random();
- int saltSize = random.Next(minSaltSize, maxSaltSize);
-
- // Allocate a byte array, which will hold the salt.
- saltBytes = new byte[saltSize];
-
- // Initialize a random number generator.
- RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
-
- // Fill the salt with cryptographically strong byte values.
- rng.GetNonZeroBytes(saltBytes);
- }
-
- // Convert plain text into a byte array.
- byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
-
- // Allocate array, which will hold plain text and salt.
- byte[] plainTextWithSaltBytes =
- new byte[plainTextBytes.Length + saltBytes.Length];
-
- // Copy plain text bytes into resulting array.
- for (int i = 0; i < plainTextBytes.Length; i++)
- plainTextWithSaltBytes[i] = plainTextBytes[i];
-
- // Append salt bytes to the resulting array.
- for (int i = 0; i < saltBytes.Length; i++)
- plainTextWithSaltBytes[plainTextBytes.Length + i] = saltBytes[i];
-
- HashAlgorithm hash;
-
- // Make sure hashing algorithm name is specified.
- if (hashAlgorithm == null)
- hashAlgorithm = "";
-
- // Initialize appropriate hashing algorithm class.
- switch (hashAlgorithm.ToUpper())
- {
-
- case "SHA384":
- hash = new SHA384Managed();
- break;
-
- case "SHA512":
- hash = new SHA512Managed();
- break;
-
- default:
- hash = new MD5CryptoServiceProvider();
- break;
- }
-
- // Compute hash value of our plain text with appended salt.
- byte[] hashBytes = hash.ComputeHash(plainTextWithSaltBytes);
-
- // Create array which will hold hash and original salt bytes.
- byte[] hashWithSaltBytes = new byte[hashBytes.Length +
- saltBytes.Length];
-
- // Copy hash bytes into resulting array.
- for (int i = 0; i < hashBytes.Length; i++)
- hashWithSaltBytes[i] = hashBytes[i];
-
- // Append salt bytes to the result.
- for (int i = 0; i < saltBytes.Length; i++)
- hashWithSaltBytes[hashBytes.Length + i] = saltBytes[i];
-
- // Convert result into a base64-encoded string.
- string hashValue = Convert.ToBase64String(hashWithSaltBytes);
-
- // Return the result.
- return hashValue;
- }
-
- public static bool VerifyHash(string plainText, string hashAlgorithm, string hashValue)
- {
-
- // Convert base64-encoded hash value into a byte array.
- byte[] hashWithSaltBytes = Convert.FromBase64String(hashValue);
-
- // We must know size of hash (without salt).
- int hashSizeInBits, hashSizeInBytes;
-
- // Make sure that hashing algorithm name is specified.
- if (hashAlgorithm == null)
- hashAlgorithm = "";
-
- // Size of hash is based on the specified algorithm.
- switch (hashAlgorithm.ToUpper())
- {
-
- case "SHA384":
- hashSizeInBits = 384;
- break;
-
- case "SHA512":
- hashSizeInBits = 512;
- break;
-
- default: // Must be MD5
- hashSizeInBits = 128;
- break;
- }
-
- // Convert size of hash from bits to bytes.
- hashSizeInBytes = hashSizeInBits / 8;
-
- // Make sure that the specified hash value is long enough.
- if (hashWithSaltBytes.Length < hashSizeInBytes)
- return false;
-
- // Allocate array to hold original salt bytes retrieved from hash.
- byte[] saltBytes = new byte[hashWithSaltBytes.Length - hashSizeInBytes];
-
- // Copy salt from the end of the hash to the new array.
- for (int i = 0; i < saltBytes.Length; i++)
- saltBytes[i] = hashWithSaltBytes[hashSizeInBytes + i];
-
- // Compute a new hash string.
- string expectedHashString = ComputeHash(plainText, hashAlgorithm, saltBytes);
-
- // If the computed hash matches the specified hash,
- // the plain text value must be correct.
- return (hashValue == expectedHashString);
- }
- }
-}
diff --git a/MyWebsite/MyWebsite/Helpers/Encryptor.cs b/MyWebsite/MyWebsite/Helpers/Encryptor.cs
new file mode 100644
index 0000000..ea1456c
--- /dev/null
+++ b/MyWebsite/MyWebsite/Helpers/Encryptor.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace MyWebsite.Helpers
+{
+ ///
+ /// SHA512 Encryption algorithm
+ ///
+ public static class Encryptor
+ {
+ ///
+ /// Computes string hash string using SHA512 encryption
+ ///
+ /// String which hash is to be computed
+ /// Salt bytes array (for hash verification)
+ /// Encrypted hash string
+ public static string ComputeHash(string plainText, byte[] saltBytes = null)
+ {
+ // Generate salt in it's not provided.
+ if (saltBytes == null)
+ {
+ saltBytes = new byte[new Random().Next(4, 8)];
+
+ // Initialize a random number generator.
+ using RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
+
+ // Fill the salt with cryptographically strong byte values.
+ rng.GetNonZeroBytes(saltBytes);
+ }
+
+ // Initializing array, which will hold plain text and salt.
+ List plainBytes = new List();
+
+ plainBytes.AddRange(Encoding.UTF8.GetBytes(plainText));
+ plainBytes.AddRange(saltBytes);
+
+ // Initialize hashing algorithm class.
+ using HashAlgorithm encryptor = new SHA512Managed();
+
+ // Create array which will hold hash and original salt bytes.
+ List hash = new List();
+
+ // Compute hash value of our plain text with appended salt.
+ hash.AddRange(encryptor.ComputeHash(plainBytes.ToArray()));
+ hash.AddRange(saltBytes);
+
+ // Convert result into a base64-encoded string.
+ return Convert.ToBase64String(hash.ToArray());
+ }
+
+ ///
+ /// Verifies that belongs to string
+ ///
+ /// Oringinal text string
+ /// SHA512 encrypted hash string
+ /// if hash belong to otherwise returns
+ public static bool VerifyHash(string plainText, string hash)
+ {
+ // Convert base64-encoded hash value into a byte array.
+ byte[] hashBytes = Convert.FromBase64String(hash);
+
+ // Make sure that the specified hash value is long enough.
+ if (hashBytes.Length < 64)
+ return false;
+
+ // Allocate array to hold original salt bytes retrieved from hash.
+ byte[] saltBytes = new byte[hashBytes.Length - 64];
+
+ // Copy salt from the end of the hash to the new array.
+ for (int i = 0; i < saltBytes.Length; i++)
+ saltBytes[i] = hashBytes[64 + i];
+
+ // Compute a new hash string.
+ string expectedHashString = ComputeHash(plainText, saltBytes);
+
+ // If the computed hash matches the specified hash,
+ // the plain text value must be correct.
+ return hash == expectedHashString;
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Helpers/ExtendedController.cs b/MyWebsite/MyWebsite/Helpers/ExtendedController.cs
new file mode 100644
index 0000000..547e5a2
--- /dev/null
+++ b/MyWebsite/MyWebsite/Helpers/ExtendedController.cs
@@ -0,0 +1,17 @@
+using Microsoft.AspNetCore.Mvc;
+using MyWebsite.ViewModels;
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.Controllers
+{
+ public class ExtendedController : Controller
+ {
+ public DatabaseContext Database { get; }
+
+ public ExtendedController(DatabaseContext context) =>
+ Database = context;
+
+ new public IActionResult View() =>
+ base.View(new ViewModelBase(Database));
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Helpers/Extensions.cs b/MyWebsite/MyWebsite/Helpers/Extensions.cs
new file mode 100644
index 0000000..852d78e
--- /dev/null
+++ b/MyWebsite/MyWebsite/Helpers/Extensions.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Linq;
+
+namespace MyWebsite
+{
+ public static class Extensions
+ {
+ public static bool Belongs(this T item, params T[] array) =>
+ array?.Contains(item) ?? false;
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/Badge.cs b/MyWebsite/MyWebsite/Models/Badge.cs
deleted file mode 100644
index 4f1b120..0000000
--- a/MyWebsite/MyWebsite/Models/Badge.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Globalization;
-
-namespace MyWebsite.Models
-{
- public class Badge
- {
- [Key]
- [Column(TypeName = "varchar(10)")]
- [DisplayName("ID")]
- public string Name { get; set; }
-
- [DisplayName("Caption")]
- public string Description => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianDescription) ? RussianDescription : EnglishDescription;
-
- [Required]
- [Column(TypeName = "varchar(50)")]
- [DisplayName("Caption (en)")]
- public string EnglishDescription { get; set; }
- [Column(TypeName = "varchar(50)")]
- [DisplayName("Caption (ru)")]
- public string RussianDescription { get; set; }
-
- [Column(TypeName = "varchar(20)")]
- [Required]
- [DisplayName("Image name")]
- public string Image { get; set; }
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/BadgeModel.cs b/MyWebsite/MyWebsite/Models/BadgeModel.cs
new file mode 100644
index 0000000..e8e9932
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/BadgeModel.cs
@@ -0,0 +1,31 @@
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Globalization;
+
+namespace MyWebsite.Models
+{
+ public class BadgeModel
+ {
+ [Key]
+ [Column(TypeName = "varchar(10)")]
+ [DisplayName("ID")]
+ public string Name { get; set; }
+
+ [DisplayName("Caption")]
+ public string Description => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianDescription) ? RussianDescription : EnglishDescription;
+
+ [Required]
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Caption (en)")]
+ public string EnglishDescription { get; set; }
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Caption (ru)")]
+ public string RussianDescription { get; set; }
+
+ [Column(TypeName = "varchar(20)")]
+ [Required]
+ [DisplayName("Image")]
+ public string Image { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/CredentialModel.cs b/MyWebsite/MyWebsite/Models/CredentialModel.cs
new file mode 100644
index 0000000..c37afa1
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/CredentialModel.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace MyWebsite.Models
+{
+ public class CredentialModel
+ {
+ [Key]
+ [Required(ErrorMessage = "This field is required")]
+ [DataType(DataType.EmailAddress)]
+ public string Email { get; set; }
+
+ [Required(ErrorMessage = "This field is required")]
+ [DataType(DataType.Password)]
+ public string Password { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/CustomData.cs b/MyWebsite/MyWebsite/Models/CustomData.cs
new file mode 100644
index 0000000..0b1f4d2
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/CustomData.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace MyWebsite.Models
+{
+ public class CustomData
+ {
+ [Key]
+ [Required]
+ [Column(TypeName = "varchar(255)")]
+ public string Key { get; set; }
+ [Required]
+ [Column(TypeName = "varchar(255)")]
+ public string Value { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/DatabaseContext.cs b/MyWebsite/MyWebsite/Models/DatabaseContext.cs
deleted file mode 100644
index 87b5dbd..0000000
--- a/MyWebsite/MyWebsite/Models/DatabaseContext.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace MyWebsite.Models
-{
- public class DatabaseContext : DbContext
- {
- public DbSet Links { get; set; }
- public DbSet Gallery { get; set; }
- public DbSet Projects { get; set; }
- public DbSet Users { get; set; }
- public DbSet Badges { get; set; }
- public DbSet Resume { get; set; }
-
- public DatabaseContext(DbContextOptions options) : base(options)
- {
- Database.EnsureCreated();
- }
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/Databases/DatabaseContext.cs b/MyWebsite/MyWebsite/Models/Databases/DatabaseContext.cs
new file mode 100644
index 0000000..e223c1a
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/Databases/DatabaseContext.cs
@@ -0,0 +1,18 @@
+using Microsoft.EntityFrameworkCore;
+
+namespace MyWebsite.Models.Databases
+{
+ public class DatabaseContext : DbContext
+ {
+ public DbSet Links { get; set; }
+ public DbSet Gallery { get; set; }
+ public DbSet Projects { get; set; }
+ public DbSet Users { get; set; }
+ public DbSet Badges { get; set; }
+ public DbSet Resume { get; set; }
+ public DbSet CustomData { get; set; }
+
+ public DatabaseContext(DbContextOptions options) : base(options) =>
+ Database.EnsureCreated();
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/Databases/FoxTubeDatabaseContext.cs b/MyWebsite/MyWebsite/Models/Databases/FoxTubeDatabaseContext.cs
new file mode 100644
index 0000000..c094a50
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/Databases/FoxTubeDatabaseContext.cs
@@ -0,0 +1,15 @@
+using Microsoft.EntityFrameworkCore;
+using MyWebsite.Areas.API.Models;
+
+namespace MyWebsite.Models.Databases
+{
+ public class FoxTubeDatabaseContext : DbContext
+ {
+ public DbSet Metrics { get; set; }
+ public DbSet Messages { get; set; }
+ public DbSet Changelogs { get; set; }
+
+ public FoxTubeDatabaseContext(DbContextOptions options) : base(options) =>
+ Database.EnsureCreated();
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/ErrorViewModel.cs b/MyWebsite/MyWebsite/Models/ErrorViewModel.cs
deleted file mode 100644
index 30e6359..0000000
--- a/MyWebsite/MyWebsite/Models/ErrorViewModel.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace MyWebsite.Models
-{
- public class ErrorViewModel
- {
- public string RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/Image.cs b/MyWebsite/MyWebsite/Models/Image.cs
deleted file mode 100644
index 5590a11..0000000
--- a/MyWebsite/MyWebsite/Models/Image.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace MyWebsite.Models
-{
- public class Image
- {
- [Key]
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- [DisplayName("ID")]
- public Guid Id { get; set; }
- [Required]
- [Column(TypeName = "varchar(100)")]
- [DisplayName("Title")]
- public string Title { get; set; }
- [Required]
- [Column(TypeName = "varchar(255)")]
- [DisplayName("Description")]
- public string Description { get; set; }
- [Required]
- [DisplayName("Created")]
- public DateTime CreationDate { get; set; }
- [Required]
- [Column(TypeName = "varchar(20)")]
- [DisplayName("File name")]
- public string FileName { get; set; }
- [Required]
- [Column(TypeName = "varchar(10)")]
- [DisplayName("Language")]
- public string Language { get; set; }
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/ImageModel.cs b/MyWebsite/MyWebsite/Models/ImageModel.cs
new file mode 100644
index 0000000..2b509c6
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/ImageModel.cs
@@ -0,0 +1,42 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Globalization;
+
+namespace MyWebsite.Models
+{
+ public class ImageModel
+ {
+ [Key]
+ [Column(TypeName = "varchar(20)")]
+ [DisplayName("File name")]
+ public string FileName { get; set; }
+
+ [DisplayName("Title")]
+ public string Title => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianTitle) ? RussianTitle : EnglishTitle;
+
+ [Required]
+ [Column(TypeName = "varchar(100)")]
+ [DisplayName("Title (en)")]
+ public string EnglishTitle { get; set; }
+ [Column(TypeName = "varchar(100)")]
+ [DisplayName("Title (ru)")]
+ public string RussianTitle { get; set; }
+
+ [DisplayName("Description")]
+ public string Description => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianDescription) ? RussianDescription : EnglishDescription;
+
+ [Required]
+ [Column(TypeName = "text")]
+ [DisplayName("Description (en)")]
+ public string EnglishDescription { get; set; }
+ [Column(TypeName = "text")]
+ [DisplayName("Description (ru)")]
+ public string RussianDescription { get; set; }
+
+ [Required]
+ [DisplayName("Created")]
+ public DateTime CreationDate { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/Link.cs b/MyWebsite/MyWebsite/Models/Link.cs
deleted file mode 100644
index f13630c..0000000
--- a/MyWebsite/MyWebsite/Models/Link.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Globalization;
-
-namespace MyWebsite.Models
-{
- public class Link
- {
- [Key]
- [Required]
- [Column(TypeName = "varchar(20)")]
- [DisplayName("Name")]
- public string Name { get; set; }
- [Required]
- [DisplayName("Order")]
- public int Order { get; set; }
-
- [DisplayName("Title")]
- public string Title => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianTitle) ? RussianTitle : EnglishTitle;
-
- [Required]
- [Column(TypeName = "varchar(20)")]
- [DisplayName("Title (en)")]
- public string EnglishTitle { get; set; }
- [Column(TypeName = "varchar(20)")]
- [DisplayName("Title (ru)")]
- public string RussianTitle { get; set; }
-
- [Required]
- [Column(TypeName = "varchar(50)")]
- [DisplayName("Username")]
- public string Username { get; set; }
- [Required]
- [Column(TypeName = "varchar(255)")]
- [DisplayName("URL")]
- public string Url { get; set; }
- [Required]
- [DisplayName("May contact")]
- public bool CanContactMe { get; set; } = false;
- [Required]
- [DisplayName("Footer")]
- public bool DisplayInFooter { get; set; } = false;
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/LinkModel.cs b/MyWebsite/MyWebsite/Models/LinkModel.cs
new file mode 100644
index 0000000..2cdc3b0
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/LinkModel.cs
@@ -0,0 +1,46 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Globalization;
+
+namespace MyWebsite.Models
+{
+ public class LinkModel
+ {
+ [Key]
+ [Required]
+ [Column(TypeName = "varchar(20)")]
+ [DisplayName("Name")]
+ public string Name { get; set; }
+ [Required]
+ [DisplayName("Order")]
+ public int Order { get; set; }
+
+ [DisplayName("Title")]
+ public string Title => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianTitle) ? RussianTitle : EnglishTitle;
+
+ [Required]
+ [Column(TypeName = "varchar(20)")]
+ [DisplayName("Title (en)")]
+ public string EnglishTitle { get; set; }
+ [Column(TypeName = "varchar(20)")]
+ [DisplayName("Title (ru)")]
+ public string RussianTitle { get; set; }
+
+ [Required]
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Username")]
+ public string Username { get; set; }
+ [Required]
+ [Column(TypeName = "varchar(255)")]
+ [DisplayName("URL")]
+ public Uri Url { get; set; }
+ [Required]
+ [DisplayName("May contact")]
+ public bool CanContactMe { get; set; } = false;
+ [Required]
+ [DisplayName("Footer")]
+ public bool DisplayInFooter { get; set; } = false;
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/LoginModel.cs b/MyWebsite/MyWebsite/Models/LoginModel.cs
deleted file mode 100644
index 967aa5e..0000000
--- a/MyWebsite/MyWebsite/Models/LoginModel.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace MyWebsite.Models
-{
- public class LoginModel
- {
- [Key]
- [Required(ErrorMessage = "This field is required")]
- [DataType(DataType.EmailAddress)]
- public string Email { get; set; }
-
- [Required(ErrorMessage = "This field is required")]
- [DataType(DataType.Password)]
- public string Password { get; set; }
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/Project.cs b/MyWebsite/MyWebsite/Models/Project.cs
deleted file mode 100644
index 45dcc02..0000000
--- a/MyWebsite/MyWebsite/Models/Project.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace MyWebsite.Models
-{
- public class Project
- {
- [Key]
- public decimal Id { get; set; }
-
- [Required]
- [Column(TypeName = "varchar(100)")]
- public string Title { get; set; }
-
- [Column(TypeName = "text")]
- public string Description { get; set; }
-
- [Column(TypeName = "varchar(50)")]
- public string Link { get; set; }
- [Column(TypeName = "varchar(50)")]
- public string LinkCaption { get; set; }
- [Column(TypeName = "varchar(100)")]
- public string Badges { get; set; }
- }
-}
diff --git a/MyWebsite/MyWebsite/Models/ProjectModel.cs b/MyWebsite/MyWebsite/Models/ProjectModel.cs
new file mode 100644
index 0000000..1bc1a64
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/ProjectModel.cs
@@ -0,0 +1,57 @@
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Globalization;
+
+#pragma warning disable CA1724
+namespace MyWebsite.Models
+{
+ public class ProjectModel
+ {
+ [Key]
+ [Required]
+ [DisplayName("ID (Order)")]
+ public decimal Id { get; set; }
+
+ [DisplayName("Title")]
+ public string Title => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianTitle) ? RussianTitle : EnglishTitle;
+
+ [Required]
+ [Column(TypeName = "varchar(100)")]
+ [DisplayName("Title (en)")]
+ public string EnglishTitle { get; set; }
+ [Column(TypeName = "varchar(100)")]
+ [DisplayName("Title (ru)")]
+ public string RussianTitle { get; set; }
+
+ [DisplayName("Caption")]
+ public string Description => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianDescription) ? RussianDescription : EnglishDescription;
+
+ [Required]
+ [Column(TypeName = "text")]
+ [DisplayName("Description (en)")]
+ public string EnglishDescription { get; set; }
+ [Column(TypeName = "text")]
+ [DisplayName("Description (ru)")]
+ public string RussianDescription { get; set; }
+
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Link")]
+ public string Link { get; set; }
+
+ [DisplayName("Link text caption")]
+ public string LinkCaption => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "ru" && !string.IsNullOrWhiteSpace(RussianTitle) ? RussianLinkCaption : EnglishLinkCaption;
+
+ [Required]
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Link text caption (en)")]
+ public string EnglishLinkCaption { get; set; }
+ [Column(TypeName = "varchar(50)")]
+ [DisplayName("Link text caption (ru)")]
+ public string RussianLinkCaption { get; set; }
+
+ [Column(TypeName = "varchar(100)")]
+ [DisplayName("Badges")]
+ public string Badges { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/Resume.cs b/MyWebsite/MyWebsite/Models/Resume.cs
deleted file mode 100644
index 39fabfc..0000000
--- a/MyWebsite/MyWebsite/Models/Resume.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace MyWebsite.Models
-{
- public class Resume
- {
- [Key]
- [Required]
- [Column(TypeName = "varchar(10)")]
- [DisplayName("Language")]
- public string Language { get; set; }
- [Required]
- [Column(TypeName = "text")]
- [DisplayName("Content")]
- public string Content { get; set; }
- [DisplayName("Last chagnge")]
- public DateTime LastUpdate { get; set; }
-
- }
-}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Models/ResumeModel.cs b/MyWebsite/MyWebsite/Models/ResumeModel.cs
new file mode 100644
index 0000000..f4426a8
--- /dev/null
+++ b/MyWebsite/MyWebsite/Models/ResumeModel.cs
@@ -0,0 +1,23 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace MyWebsite.Models
+{
+ public class ResumeModel
+ {
+ [Key]
+ [Required]
+ [Column(TypeName = "varchar(10)")]
+ [DisplayName("Language")]
+ public string Language { get; set; }
+ [Required]
+ [Column(TypeName = "text")]
+ [DisplayName("Content")]
+ public string Content { get; set; }
+ [DisplayName("Last chagnge")]
+ public DateTime LastUpdate { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/MyWebsite.csproj b/MyWebsite/MyWebsite/MyWebsite.csproj
index 65bebe1..a753c5b 100644
--- a/MyWebsite/MyWebsite/MyWebsite.csproj
+++ b/MyWebsite/MyWebsite/MyWebsite.csproj
@@ -16,6 +16,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
@@ -24,7 +28,7 @@
-
+
diff --git a/MyWebsite/MyWebsite/MyWebsite.csproj.user b/MyWebsite/MyWebsite/MyWebsite.csproj.user
index 21d96d1..2f80bbc 100644
--- a/MyWebsite/MyWebsite/MyWebsite.csproj.user
+++ b/MyWebsite/MyWebsite/MyWebsite.csproj.user
@@ -4,11 +4,9 @@
MvcControllerEmptyScaffolder
root/Controller
600
- True
- True
+ False
+ False
False
-
-
False
600
diff --git a/MyWebsite/MyWebsite/Program.cs b/MyWebsite/MyWebsite/Program.cs
index 71fb392..6d2e300 100644
--- a/MyWebsite/MyWebsite/Program.cs
+++ b/MyWebsite/MyWebsite/Program.cs
@@ -3,18 +3,16 @@ using Microsoft.Extensions.Hosting;
namespace MyWebsite
{
- public class Program
- {
- public static void Main(string[] args)
- {
- CreateHostBuilder(args).Build().Run();
- }
+ public static class Program
+ {
+ public static void Main(string[] args) =>
+ CreateHostBuilder(args).Build().Run();
- public static IHostBuilder CreateHostBuilder(string[] args) =>
- Host.CreateDefaultBuilder(args)
- .ConfigureWebHostDefaults(webBuilder =>
- {
- webBuilder.UseStartup();
- });
- }
-}
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Startup.cs b/MyWebsite/MyWebsite/Startup.cs
index 89c0d9d..781b639 100644
--- a/MyWebsite/MyWebsite/Startup.cs
+++ b/MyWebsite/MyWebsite/Startup.cs
@@ -4,76 +4,81 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.EntityFrameworkCore;
-using MyWebsite.Models;
-using MyWebsite.Areas.API.Models;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Http;
+using MyWebsite.Models.Databases;
namespace MyWebsite
{
- public class Startup
- {
- public static DatabaseContext Database { get; set; }
+ // TODO: Add reordering for contact links
+ // TODO: Complete project admin page
+ // TODO: Complete artworks admin page
+ // TODO: FoxTube API admin page
+ // TODO: Complete homepage
+ // TODO: Complete FoxTube page
+ // TODO: Add localization system
+ // TODO: Rid of JavaScript (use Blazor)
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
+ public IConfiguration Configuration { get; }
- public IConfiguration Configuration { get; }
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddDbContext(options =>
+ options.UseSqlServer(Configuration.GetConnectionString("MainDB")));
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddDbContext(options =>
- options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
+ services.AddDbContext(options =>
+ options.UseSqlServer(Configuration.GetConnectionString("FoxTubeDB")));
- services.AddDbContext(options =>
- options.UseSqlServer(Configuration.GetConnectionString("FoxTubeAPI")));
+ services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
+ options.LoginPath = new PathString("/Admin/Login"));
- services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
- options.LoginPath = new PathString("/Admin/Login"));
+ services.AddControllersWithViews();
+ }
- services.AddControllersWithViews();
- }
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public static void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ if (env.IsDevelopment())
+ app.UseDeveloperExceptionPage();
+ else
+ {
+ 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.UseHttpsRedirection();
+ app.UseStaticFiles();
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public static void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
- if (env.IsDevelopment())
- app.UseDeveloperExceptionPage();
- else
- {
- 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.UseHttpsRedirection();
- app.UseStaticFiles();
+ app.UseRouting();
- app.UseRouting();
+ app.UseAuthentication();
+ app.UseAuthorization();
- app.UseAuthentication();
- app.UseAuthorization();
-
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapAreaControllerRoute(
- name: "projects",
- areaName: "Projects",
- pattern: "Projects/{controller=Projects}/{action=Index}/{id?}");
- endpoints.MapAreaControllerRoute(
- name: "admin",
- areaName: "Admin",
- pattern: "Admin/{controller}/{action=Index}/{id?}");
- endpoints.MapAreaControllerRoute(
- name: "api",
- areaName: "API",
- pattern: "API/{controller}/{action}");
- endpoints.MapControllerRoute(
- name: "default",
- pattern: "{controller=Home}/{action=Index}/{id?}");
- });
- }
- }
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapAreaControllerRoute(
+ name: "projects",
+ areaName: "Projects",
+ pattern: "Projects/{controller=Projects}/{action=Index}/{id?}");
+ endpoints.MapAreaControllerRoute(
+ name: "admin",
+ areaName: "Admin",
+ pattern: "Admin/{controller}/{action=Index}/{id?}");
+ endpoints.MapAreaControllerRoute(
+ name: "api",
+ areaName: "API",
+ pattern: "API/{controller}/{action}");
+ endpoints.MapControllerRoute(
+ name: "default",
+ pattern: "{controller=Home}/{action=Index}/{id?}");
+ });
+ }
+ }
}
diff --git a/MyWebsite/MyWebsite/ViewModels/ArtworkViewModel.cs b/MyWebsite/MyWebsite/ViewModels/ArtworkViewModel.cs
new file mode 100644
index 0000000..0517db4
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/ArtworkViewModel.cs
@@ -0,0 +1,32 @@
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MyWebsite.ViewModels
+{
+ public class ArtworkViewModel : ViewModelBase
+ {
+ public List Images { get; }
+
+ public string CurrentId { get; set; }
+ public ImageModel Current => Images.FirstOrDefault(i => i.FileName == CurrentId);
+
+ public string Next { get; }
+ public string Previous { get; }
+
+ public ArtworkViewModel(DatabaseContext context) : base(context) =>
+ Images = context.Gallery.OrderByDescending(i => i.CreationDate).ToList();
+
+ public ArtworkViewModel(DatabaseContext context, string id) : base(context)
+ {
+ Images = context.Gallery.OrderByDescending(i => i.CreationDate).ToList();
+ CurrentId = id;
+
+ if (Images.IndexOf(Current) != Images.Count - 1)
+ Previous = Images[Images.IndexOf(Current) + 1].FileName;
+ if (Images.IndexOf(Current) != 0)
+ Next = Images[Images.IndexOf(Current) - 1].FileName;
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/ViewModels/CredentialViewModel.cs b/MyWebsite/MyWebsite/ViewModels/CredentialViewModel.cs
new file mode 100644
index 0000000..cc27a30
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/CredentialViewModel.cs
@@ -0,0 +1,15 @@
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.ViewModels
+{
+ public class CredentialViewModel : ViewModelBase
+ {
+ public CredentialModel Credential { get; set; }
+ public CredentialViewModel(DatabaseContext context) : base(context) { }
+
+ public CredentialViewModel() : base(null) { }
+ public CredentialViewModel(DatabaseContext context, CredentialViewModel model) : base(context) =>
+ Credential = model?.Credential;
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/ViewModels/ErrorViewModel.cs b/MyWebsite/MyWebsite/ViewModels/ErrorViewModel.cs
new file mode 100644
index 0000000..182ebf1
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/ErrorViewModel.cs
@@ -0,0 +1,12 @@
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.ViewModels
+{
+ public class ErrorViewModel : ViewModelBase
+ {
+ public ErrorViewModel(DatabaseContext context) : base(context) { }
+
+ public string RequestId { get; set; }
+ public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/ViewModels/ProjectsViewModel.cs b/MyWebsite/MyWebsite/ViewModels/ProjectsViewModel.cs
new file mode 100644
index 0000000..510d513
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/ProjectsViewModel.cs
@@ -0,0 +1,18 @@
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace MyWebsite.ViewModels
+{
+ public class ProjectsViewModel : ViewModelBase
+ {
+ public IEnumerable Projects { get; }
+ public IEnumerable Badges { get; }
+ public ProjectsViewModel(DatabaseContext context) : base(context)
+ {
+ Projects = context.Projects.OrderByDescending(i => i.Id).ToList();
+ Badges = context.Badges.ToList();
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/ViewModels/ResumeViewModel.cs b/MyWebsite/MyWebsite/ViewModels/ResumeViewModel.cs
new file mode 100644
index 0000000..45d4d1a
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/ResumeViewModel.cs
@@ -0,0 +1,13 @@
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+using System.Globalization;
+
+namespace MyWebsite.ViewModels
+{
+ public class ResumeViewModel : ViewModelBase
+ {
+ public ResumeModel Resume { get; }
+ public ResumeViewModel(DatabaseContext context, CultureInfo language) : base(context) =>
+ Resume = context.Resume.Find(language?.Name) ?? context.Resume.Find("en-US");
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/ViewModels/ViewModelBase.cs b/MyWebsite/MyWebsite/ViewModels/ViewModelBase.cs
new file mode 100644
index 0000000..57aa291
--- /dev/null
+++ b/MyWebsite/MyWebsite/ViewModels/ViewModelBase.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+using System.Linq;
+using MyWebsite.Models;
+using MyWebsite.Models.Databases;
+
+namespace MyWebsite.ViewModels
+{
+ public class ViewModelBase
+ {
+ public IEnumerable Links { get; }
+
+ public ViewModelBase(DatabaseContext context) =>
+ Links = context?.Links.ToList();
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Admin/Index.cshtml b/MyWebsite/MyWebsite/Views/Admin/Index.cshtml
index 23ad50f..c107b14 100644
--- a/MyWebsite/MyWebsite/Views/Admin/Index.cshtml
+++ b/MyWebsite/MyWebsite/Views/Admin/Index.cshtml
@@ -1,24 +1,32 @@
-
-@{
- ViewData["Title"] = "Admin panel";
+@{
+ ViewData["Title"] = "Admin panel";
}
- Administration
+ Administration
-
-
- Logout
-
+
+
+
+ // Change credential information
+
+
+ Logout
+
-
\ No newline at end of file
+@section Imports
+{
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Admin/Login.cshtml b/MyWebsite/MyWebsite/Views/Admin/Login.cshtml
index fd4ced3..6510e9b 100644
--- a/MyWebsite/MyWebsite/Views/Admin/Login.cshtml
+++ b/MyWebsite/MyWebsite/Views/Admin/Login.cshtml
@@ -1,27 +1,30 @@
-@model LoginModel;
+@model CredentialViewModel
@{
- ViewData["Title"] = "Login";
+ ViewData["Title"] = "Login";
}
- Administration panel - Login
+ Administration panel - Login
-
-
-
- E-mail
-
-
-
-
- Password
-
-
-
-
-
+
+
+
+ E-mail
+
+
+
+
+ Password
+
+
+
+
+
-
\ No newline at end of file
+@section Imports
+{
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml
index ab7ee1e..de604cf 100644
--- a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml
+++ b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml
@@ -1,40 +1,53 @@
-@model Image
+@model ArtworkViewModel
@{
- ViewData["Title"] = Model.Title;
+ ViewData["Title"] = Model.Current?.Title;
}
-
+
-
-
@Model.Title
-
Creation date: @Model.CreationDate.ToShortDateString()
-
- @Html.Raw(Model.Description)
-
-
+
+
@Model.Current?.Title
+
Creation date: @Model.Current?.CreationDate.ToShortDateString()
+
+ @Html.Raw(Model.Current?.Description)
+
+
-
+@section Imports {
+
-
\ No newline at end of file
+ if (image.style.cursor == "zoom-out")
+ image.style = "";
+ else
+ {
+ image.style.maxHeight = "none";
+ image.style.maxWidth = "none";
+ image.style.cursor = "zoom-out";
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Gallery/Index.cshtml b/MyWebsite/MyWebsite/Views/Gallery/Index.cshtml
index a8e2713..0d913c2 100644
--- a/MyWebsite/MyWebsite/Views/Gallery/Index.cshtml
+++ b/MyWebsite/MyWebsite/Views/Gallery/Index.cshtml
@@ -1,22 +1,25 @@
-@model IEnumerable
+@model ArtworkViewModel
@{
- ViewData["Title"] = "My artworks";
+ ViewData["Title"] = "My artworks";
}
- @if (Model.Count() > 0)
- foreach (Image image in Model.OrderByDescending(i => i.CreationDate))
- {
-
- }
- else
- {
-
- }
+ @if (Model.Images.Count > 0)
+ foreach (ImageModel image in Model.Images)
+ {
+
+ }
+ else
+ {
+
+ }
-
\ No newline at end of file
+@section Imports
+{
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Resume/Index.cshtml b/MyWebsite/MyWebsite/Views/Resume/Index.cshtml
index 8936581..6b79cbe 100644
--- a/MyWebsite/MyWebsite/Views/Resume/Index.cshtml
+++ b/MyWebsite/MyWebsite/Views/Resume/Index.cshtml
@@ -1,18 +1,21 @@
-@model Resume
+@model ResumeViewModel
@{
- ViewData["Title"] = "My resume";
+ ViewData["Title"] = "My resume";
}
- @Html.Raw(Model?.Content)
+ @Html.Raw(Model?.Resume.Content)
-
\ No newline at end of file
+@section Footer
+{
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Resume/Print.cshtml b/MyWebsite/MyWebsite/Views/Resume/Print.cshtml
index 6decee9..0741e80 100644
--- a/MyWebsite/MyWebsite/Views/Resume/Print.cshtml
+++ b/MyWebsite/MyWebsite/Views/Resume/Print.cshtml
@@ -1,28 +1,40 @@
-@model Resume
+@model ResumeViewModel
@{
- Layout = null;
- ViewData["Title"] = "Print";
+ Layout = null;
}
-@Html.Raw(Model.Content)
+
+
+
+ Michael (Mikhail) Gordeev - Resume
+
-
+
-
+
+
+
+
+
+ @Html.Raw(Model.Resume.Content)
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/Construction.cshtml b/MyWebsite/MyWebsite/Views/Shared/Construction.cshtml
new file mode 100644
index 0000000..e8c6612
--- /dev/null
+++ b/MyWebsite/MyWebsite/Views/Shared/Construction.cshtml
@@ -0,0 +1,118 @@
+@model ViewModelBase
+@using Microsoft.AspNetCore.Http
+@{
+ Layout = null;
+ HttpRequest request = ViewContext.HttpContext.Request;
+}
+
+
+
+
+ Ready - XFox111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Show output from:
+
+ Build
+
+
+
+
+
+
+ 1>------ Build started: Project: xfox111.net, Configuration: Any CPU ------
+ 1> xfox111.net -> @request.Scheme://@request.Host/MyWebsite.dll
+ 2>------ Deploy started: Project: xfox111.net, Configuration: Any CPU ------
+ Updating the layout...
+ Copying files: Total <1 mb to layout...
+ Checking whether required frameworks are installed...
+ Registering the website to run from layout...
+
+
+ ========== Deployment failed ==========
+ Error message:
+ ========== Site is under construction ==========
+
+
+
+ /‾\
+ / \
+ / _ \
+ / / \ \
+ / / \ \
+ / / \ \
+ / / ╭-╮\ \
+ / / ----╰-╯ \ \
+ / / /// | \ \
+ / / /// /|| \ \
+ / / > / || ___\ \
+ / / / ^ \՟||_/ \\ \
+ / / / / | \ -/ \\ \
+ / / / / | | / \\ \
+ / / /_/ |_|/_________\\ \
+ / /_________________________\ \
+ | |
+ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+
+
+
+ It will be done soon
+ For now you can check my other links:
+
+
+ @foreach (LinkModel item in Model.Links.Where(i => i.Name.Belongs("outlook", "linkedin", "vkontakte", "twitter", "github")))
+ {
+ @item.Title: @((item.Url.ToString().StartsWith("mailto:") ? "" : "https:") + item.Url)
+ }
+
+
+ ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
+ ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
+
+
+
+
+ Ready
+
+ 4
+
+
+ 11
+
+
+ xfox111
+
+
+ master
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/Contacts.cshtml b/MyWebsite/MyWebsite/Views/Shared/Contacts.cshtml
index 123c0d6..9378699 100644
--- a/MyWebsite/MyWebsite/Views/Shared/Contacts.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/Contacts.cshtml
@@ -1,23 +1,23 @@
-@model IEnumerable
+@model ViewModelBase
@{
- ViewData["Title"] = "Contact info";
+ ViewData["Title"] = "Contact info";
}
- Contact information
+ Contact information
-
- @foreach (Link link in Model.Where(i => i.CanContactMe))
- {
- @(link.Title) @(link.Username)
- }
-
-
- @foreach (Link link in Model.Where(i => !i.CanContactMe))
- {
- @(link.Title) @(link.Username)
- }
-
+
+ @foreach (LinkModel link in Model.Links.Where(i => i.CanContactMe))
+ {
+ @(link.Title) @(link.Username)
+ }
+
+
+ @foreach (LinkModel link in Model.Links.Where(i => !i.CanContactMe))
+ {
+ @(link.Title) @(link.Username)
+ }
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml b/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml
index 4e9bc78..c5fe536 100644
--- a/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml
@@ -1,35 +1,36 @@
-@{
- Link email = Startup.Database.Links.FirstOrDefault(i => i.Name == "outlook");
- List links = Startup.Database.Links.Where(i => new string[] { "linkedin", "github", "twitter", "vkontakte" }.Contains(i.Name)).OrderBy(i => i.Order).ToList();
+@model ViewModelBase
+@{
+ LinkModel email = Model.Links.FirstOrDefault(i => i.Name == "outlook" || i.Name == "email");
+ List links = Model.Links.Where(i => new string[] { "linkedin", "github", "twitter", "vkontakte" }.Contains(i.Name)).OrderBy(i => i.Order).ToList();
}
-
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/Error.cshtml b/MyWebsite/MyWebsite/Views/Shared/Error.cshtml
index 8d86770..bad7dd5 100644
--- a/MyWebsite/MyWebsite/Views/Shared/Error.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/Error.cshtml
@@ -1,19 +1,19 @@
@model ErrorViewModel
@{
- ViewData["Title"] = "Error";
+ ViewData["Title"] = "Error";
}
- Error.
- An error occurred while processing your request.
+ Error.
+ An error occurred while processing your request.
- @if (Model.ShowRequestId)
- {
-
- Request ID: @Model.RequestId
-
- }
+ @if (Model.ShowRequestId)
+ {
+
+ Request ID: @Model.RequestId
+
+ }
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/Index.cshtml b/MyWebsite/MyWebsite/Views/Shared/Index.cshtml
index b3b1ec2..c1da115 100644
--- a/MyWebsite/MyWebsite/Views/Shared/Index.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/Index.cshtml
@@ -1,13 +1,13 @@
@{
- ViewData["Title"] = "Home Page";
+ ViewData["Title"] = "Home Page";
}
- Hello, World!
+ Hello, World!
-
- Homepage
-
+
+ Homepage
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml b/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml
index 461eb59..277a0ea 100644
--- a/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml
@@ -1,36 +1,45 @@
-@model IEnumerable
+@model ProjectsViewModel
@{
- ViewData["Title"] = "My projects";
- List badges = Startup.Database.Badges.ToList();
+ ViewData["Title"] = "My projects";
}
-
-
My projects
- Here is presented the most of projects I worked on
-
-
+
+
My projects
+ Here is presented the most of projects I worked on
+
+
- @foreach (Project project in Model)
- {
-
-
-
- @foreach (string badge in project.Badges.Split(','))
- {
-
- }
-
-
- }
+ @if (Model.Projects.Count() > 0)
+ {
+ @foreach (ProjectModel project in Model.Projects)
+ {
+
+
+
+ @foreach (string b in project.Badges.Split(','))
+ {
+ BadgeModel badge = Model.Badges.FirstOrDefault(i => i.Name == b);
+
+ }
+
+
+ }
+ }
+ else
+ {
+
+ }
-
\ No newline at end of file
+@section Imports {
+
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml b/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml
index 7ab4220..66c685c 100644
--- a/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml
+++ b/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml
@@ -1,70 +1,86 @@
-
+@model ViewModelBase
+
-
- @ViewData["Title"] - XFox111.NET
-
+
+ @ViewData["Title"] - XFox111.NET
+
-
-
+
+
-
-
+ if (menu.style.display == "none")
+ menu.style.display = "initial";
+ else
+ menu.style.display = "none";
+ }
+
-
-
-
+ @RenderSection("Imports", false)
-
-
-
-
-
-
-
+ @{
+ if (IsSectionDefined("OpenGraph"))
+ RenderSection("OpenGraph");
+ else
+ {
+
+
-
-
-
-
-
- XFox111.NET
+
+
+
+
+
+
+
+ }
+ }
-
- AboutMe();
- Resume();
- Projects();
- Arts();
- Contacts();
-
+
+
+
+
+
+ XFox111.NET
-
-
+
+ AboutMe();
+ Resume();
+ Projects();
+ Arts();
+ Contacts();
+
-
- @RenderBody()
-
+
+
-
-
+ @{
+ if (IsSectionDefined("Footer"))
+ RenderSection("Footer");
+ else
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/_ViewImports.cshtml b/MyWebsite/MyWebsite/Views/_ViewImports.cshtml
index 5ecdfbb..b886a4c 100644
--- a/MyWebsite/MyWebsite/Views/_ViewImports.cshtml
+++ b/MyWebsite/MyWebsite/Views/_ViewImports.cshtml
@@ -1,3 +1,4 @@
@using MyWebsite
@using MyWebsite.Models
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@using MyWebsite.ViewModels
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/Views/_ViewStart.cshtml b/MyWebsite/MyWebsite/Views/_ViewStart.cshtml
index a5f1004..817a913 100644
--- a/MyWebsite/MyWebsite/Views/_ViewStart.cshtml
+++ b/MyWebsite/MyWebsite/Views/_ViewStart.cshtml
@@ -1,3 +1,3 @@
@{
- Layout = "_Layout";
-}
+ Layout = "_Layout";
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/appsettings.Development.json b/MyWebsite/MyWebsite/appsettings.Development.json
index 8983e0f..71cfa98 100644
--- a/MyWebsite/MyWebsite/appsettings.Development.json
+++ b/MyWebsite/MyWebsite/appsettings.Development.json
@@ -1,9 +1,9 @@
{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- }
-}
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/appsettings.json b/MyWebsite/MyWebsite/appsettings.json
index 8265b50..08aaec2 100644
--- a/MyWebsite/MyWebsite/appsettings.json
+++ b/MyWebsite/MyWebsite/appsettings.json
@@ -1,14 +1,14 @@
{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*",
- "ConnectionStrings": {
- "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=xfox111;Trusted_Connection=True;",
- "FoxTubeAPI": "Server=(localdb)\\mssqllocaldb;Database=foxtube;Trusted_Connection=True;"
- }
-}
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
+ "ConnectionStrings": {
+ "MainDB": "Server=(localdb)\\mssqllocaldb;Database=xfox111;Trusted_Connection=True;",
+ "FoxTubeDB": "Server=(localdb)\\mssqllocaldb;Database=foxtube;Trusted_Connection=True;"
+ }
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.css b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.css
new file mode 100644
index 0000000..e386967
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.css
@@ -0,0 +1,225 @@
+/* Declaring fonts */
+@font-face
+{
+ font-family: 'Consolas';
+ src: url("/fonts/Consolas/consolas.eot");
+ src: url("/fonts/Consolas/consolas.eot?#iefix") format("embedded-opentype"), url("/fonts/Consolas/consolas.otf") format("opentype"), url("/fonts/Consolas/consolas.svg") format("svg"), url("/fonts/Consolas/consolas.ttf") format("truetype"), url("/fonts/Consolas/consolas.woff") format("woff"), url("/fonts/Consolas/consolas.woff2") format("woff2");
+}
+
+@font-face
+{
+ font-family: 'Segoe MDL2 Assets';
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot");
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot?#iefix") format("embedded-opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.otf") format("opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.svg") format("svg"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.ttf") format("truetype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff") format("woff"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff2") format("woff2");
+}
+
+/* Header */
+nav
+{
+ user-select: none;
+ position: fixed;
+ right: 0px;
+ left: 0px;
+}
+
+ nav > div:first-child
+ {
+ display: grid;
+ grid-template-columns: auto 1fr auto;
+ background-color: #007acc;
+ height: 22px;
+ background-image: url('Images/strip.png');
+ }
+
+ nav > div:first-child span
+ {
+ background-color: inherit;
+ padding: 2px 5px;
+ }
+
+ nav > div:first-child > div:last-child
+ {
+ background-color: inherit;
+ padding: 0px 2px;
+ }
+
+ nav > div:first-child > div div
+ {
+ display: inline-block;
+ margin: 2px 0px;
+ height: 17px;
+ width: 17px;
+ text-align: center;
+ line-height: 17px;
+ font-size: 11pt;
+ }
+
+ nav > div:last-child
+ {
+ display: grid;
+ grid-template-columns: auto auto 1fr;
+ background-color: #2d2d30;
+ height: 26px;
+ }
+
+ nav > div:last-child span
+ {
+ margin: 0px 6px;
+ line-height: 26px;
+ text-align: center;
+ }
+ nav > div:last-child select
+ {
+ background-color: #333337;
+ color: white;
+ border: 1px solid #434346;
+ border-radius: 0px;
+ width: 300px;
+ height: 21px;
+ margin: 2px 0px;
+ }
+ nav > div:last-child img
+ {
+ height: 100%;
+ }
+
+/* Body */
+html
+{
+ overflow: hidden;
+}
+
+body
+{
+ background-color: #252526;
+ color: white;
+ font-size: 9pt;
+ margin: 0px;
+ font-family: 'Segoe UI Symbol';
+ overflow: auto;
+ display: grid;
+ height: 100vh;
+}
+
+main
+{
+ font-family: Consolas;
+ margin: 50px 0px 50px 12px;
+}
+
+ main p
+ {
+ margin: 0px;
+ display: none;
+ }
+
+a
+{
+ color: #569cd6;
+}
+
+ a:visited
+ {
+ color: #569cd6;
+ }
+
+.err
+{
+ color: #e51400;
+}
+
+/* Footer */
+footer
+{
+ background-color: #007acc;
+ color: white;
+ height: 26px;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding-right: 12px;
+ display: grid;
+ grid-template-columns: auto 1fr auto auto auto auto auto;
+ user-select: none;
+}
+
+.status-bar-btn
+{
+ width: 26px;
+ height: 26px;
+ display: inline-block;
+ text-align: center;
+ font-size: 12pt;
+}
+
+.git-btn
+{
+ padding: 0px 5px;
+ margin: 4px;
+ height: 17px;
+ min-width: 26px;
+}
+
+.btn
+{
+ cursor: pointer;
+}
+
+ .btn:hover
+ {
+ background-color: #ffffff33;
+ }
+
+#status
+{
+ margin: 0px 5px;
+ vertical-align: central;
+ line-height: 26px;
+}
+
+/* Button icons */
+.push:before
+{
+ content: '\e1fe';
+}
+
+.commit:before
+{
+ content: '\e104';
+}
+
+.branch:before
+{
+ content: '\E14B';
+}
+
+.git:before
+{
+ content: '\1F4D3';
+}
+
+.notification:before
+{
+ content: '\E1FA';
+}
+
+.task:before
+{
+ content: '\23E5';
+}
+
+.hide:before
+{
+ content: '\23F7';
+}
+
+.maximize:before
+{
+ content: '\1F5D7';
+}
+
+.close:before
+{
+ content: '\1F7A8';
+}
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.js b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.js
new file mode 100644
index 0000000..55ba32a
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Construction.js
@@ -0,0 +1,58 @@
+async function Load()
+{
+ var output = document.getElementById("output");
+
+ await delay(500);
+ output.children[0].style.display = 'block';
+ document.getElementById('status').innerText = "Build started...";
+ document.title = "Build started... - XFox111";
+
+ await delay(3000);
+ output.children[1].style.display = 'block';
+
+ await delay(1000);
+ document.getElementById('status').innerText = "Deploy started...";
+ document.title = "Deploy started... - XFox111";
+ output.children[2].style.display = 'block';
+
+ await delay(3000);
+ output.children[3].style.display = 'block';
+ await delay(5);
+ output.children[4].style.display = 'block';
+ await delay(5);
+ output.children[5].style.display = 'block';
+ await delay(5);
+ output.children[6].style.display = 'block';
+
+ await delay(2000);
+ document.getElementById('status').innerText = "Deploy failed.";
+ document.title = "Deploy failed... - XFox111";
+ output.children[8].style.display = 'block';
+ await delay(5);
+ output.children[9].style.display = 'block';
+ await delay(5);
+ output.children[10].style.display = 'block';
+ await delay(5);
+ output.children[12].style.display = 'block';
+ await delay(5);
+ output.children[14].style.display = 'block';
+ await delay(5);
+ output.children[15].style.display = 'block';
+
+ await delay(200);
+ var k = 17;
+ for (; k < output.children.length - 3; k++)
+ {
+ output.children[k].style.display = 'block';
+ await delay(5);
+ }
+
+ await delay(2000);
+ output.children[++k].style.display = 'block';
+ await delay(5);
+ output.children[++k].style.display = 'block';
+ document.title = "Site is under construction - XFox111";
+ document.getElementById('status').innerText = "Site is under construction";
+}
+
+const delay = ms => new Promise(res => setTimeout(res, ms));
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/strip.png b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/strip.png
new file mode 100644
index 0000000..f356924
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/strip.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/tools.png b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/tools.png
new file mode 100644
index 0000000..a20f8df
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/Construction/Images/tools.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/FoxTube.css b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/FoxTube.css
new file mode 100644
index 0000000..cf781c9
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/FoxTube.css
@@ -0,0 +1,174 @@
+/* Declaring fonts */
+@font-face
+{
+ font-family: 'Consolas';
+ src: url("/fonts/Consolas/consolas.eot");
+ src: url("/fonts/Consolas/consolas.eot?#iefix") format("embedded-opentype"), url("/fonts/Consolas/consolas.otf") format("opentype"), url("/fonts/Consolas/consolas.svg") format("svg"), url("/fonts/Consolas/consolas.ttf") format("truetype"), url("/fonts/Consolas/consolas.woff") format("woff"), url("/fonts/Consolas/consolas.woff2") format("woff2");
+}
+
+@font-face
+{
+ font-family: 'Segoe MDL2 Assets';
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot");
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot?#iefix") format("embedded-opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.otf") format("opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.svg") format("svg"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.ttf") format("truetype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff") format("woff"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff2") format("woff2");
+}
+
+/* Header styles */
+nav
+{
+ display: grid;
+ grid-template-columns: auto auto 1fr auto;
+ grid-column-gap: 10px;
+ background-color: #343434;
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 10;
+ font-size: 26px;
+ padding: 10px;
+ min-height: 64px;
+}
+
+ nav img
+ {
+ height: 64px;
+ }
+
+ nav a
+ {
+ text-decoration: none;
+ color: white;
+ }
+
+ nav a:hover
+ {
+ color: gray;
+ }
+
+ nav p
+ {
+ grid-column: 4;
+ user-select: none;
+ cursor: pointer;
+ text-align: right;
+ margin: 0px;
+ }
+
+menu
+{
+ margin: 26px 0px;
+ grid-row: 2;
+ grid-column: 1/5;
+ list-style: none;
+}
+
+ menu li
+ {
+ font-size: 20px;
+ margin-top: 10px;
+ display: block;
+ }
+
+/* Adaptive code */
+@media only screen and (min-width: 1150px)
+{
+ menu
+ {
+ display: initial !important;
+ grid-row: 1;
+ grid-column: 3;
+ margin: 0px;
+ align-self: end;
+ margin-bottom: 3px;
+ }
+
+ menu li
+ {
+ display: inline-block;
+ margin-right: 10px;
+ margin-top: 0px;
+ }
+
+ #menu-toggle
+ {
+ display: none;
+ }
+}
+
+@media only screen and (max-width: 700px) {
+ body
+ {
+ margin-top: 112px !important;
+ height: calc(100vh - 112px) !important;
+ }
+}
+
+/* Body styles */
+html
+{
+ overflow: hidden;
+}
+
+body
+{
+ font-family: 'Consolas', 'Segoe MDL2 Assets';
+ overflow: auto;
+ margin: 0px;
+ margin-top: 84px;
+ display: grid;
+ grid-template-rows: 1fr auto;
+ height: calc(100vh - 84px);
+}
+
+main
+{
+ font-family: 'Calibri', 'Segoe MDL2 Assets';
+}
+
+.back
+{
+ text-decoration: none;
+ color: black !important;
+}
+
+ .back:hover
+ {
+ text-decoration: underline;
+ }
+
+article
+{
+ margin: 0px 20px;
+}
+
+ article a:visited, article a:link
+ {
+ color: blue;
+ }
+
+.comment, .comment:visited
+{
+ color: #57a64a !important;
+}
+
+/* Footer styles */
+footer
+{
+ padding: 10px;
+ display: grid;
+ align-items: center;
+ grid-template-columns: 1fr auto;
+ grid-column-gap: 10px;
+}
+
+ footer a
+ {
+ text-decoration: none;
+ color: black;
+ }
+
+ footer a:hover
+ {
+ color: orangered;
+ }
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Logo.svg b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Logo.svg
new file mode 100644
index 0000000..46d4e6e
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Logo.svg
@@ -0,0 +1,3267 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Channel_dark_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Channel_dark_eng.png
new file mode 100644
index 0000000..80c382a
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Channel_dark_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Main_dark_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Main_dark_eng.png
new file mode 100644
index 0000000..67c3563
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Main_dark_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Playlist_dark_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Playlist_dark_eng.png
new file mode 100644
index 0000000..813d69a
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Playlist_dark_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Stream_dark_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Stream_dark_eng.png
new file mode 100644
index 0000000..dac5eba
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Stream_dark_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Video_dark_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Video_dark_eng.png
new file mode 100644
index 0000000..f0be7b3
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Dark/Video_dark_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Channel_light_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Channel_light_eng.png
new file mode 100644
index 0000000..9671340
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Channel_light_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Home_light_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Home_light_eng.png
new file mode 100644
index 0000000..a271117
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Home_light_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Playlist_light_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Playlist_light_eng.png
new file mode 100644
index 0000000..afd01cd
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Playlist_light_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Stream_light_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Stream_light_eng.png
new file mode 100644
index 0000000..74306c1
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Stream_light_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Video_light_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Video_light_eng.png
new file mode 100644
index 0000000..26c3af4
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Light/Video_light_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Pip_eng.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Pip_eng.png
new file mode 100644
index 0000000..6b3f4a6
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Eng/Pip_eng.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Channel_dark_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Channel_dark_rus.png
new file mode 100644
index 0000000..29028c4
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Channel_dark_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Home_dark_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Home_dark_rus.png
new file mode 100644
index 0000000..761359c
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Home_dark_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Playlist_dark_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Playlist_dark_rus.png
new file mode 100644
index 0000000..4abc12c
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Playlist_dark_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Stream_dark_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Stream_dark_rus.png
new file mode 100644
index 0000000..2eaa262
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Stream_dark_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Video_dark_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Video_dark_rus.png
new file mode 100644
index 0000000..36ab600
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Dark/Video_dark_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Channel_light_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Channel_light_rus.png
new file mode 100644
index 0000000..75b03fe
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Channel_light_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Home_light_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Home_light_rus.png
new file mode 100644
index 0000000..1b0c61c
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Home_light_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Playlist_light_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Playlist_light_rus.png
new file mode 100644
index 0000000..98d97db
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Playlist_light_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Stream_light_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Stream_light_rus.png
new file mode 100644
index 0000000..86cf3c4
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Stream_light_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Video_light_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Video_light_rus.png
new file mode 100644
index 0000000..dfda59d
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Light/Video_light_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Pip_rus.png b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Pip_rus.png
new file mode 100644
index 0000000..e74e2cc
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/Screenshots/Rus/Pip_rus.png differ
diff --git a/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/favicon.ico b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/favicon.ico
new file mode 100644
index 0000000..c5b56f6
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/assets/FoxTube/favicon.ico differ
diff --git a/MyWebsite/MyWebsite/wwwroot/css/Admin.css b/MyWebsite/MyWebsite/wwwroot/css/Admin.css
index 2e274d5..edd5d14 100644
--- a/MyWebsite/MyWebsite/wwwroot/css/Admin.css
+++ b/MyWebsite/MyWebsite/wwwroot/css/Admin.css
@@ -1,110 +1,141 @@
-input {
- padding: 10px;
- border-radius: 10px;
- border: 1px solid black;
- width: 100%;
- box-sizing: border-box;
- margin-bottom: 10px;
+input
+{
+ padding: 10px;
+ border-radius: 10px;
+ border: 1px solid black;
+ width: 100%;
+ box-sizing: border-box;
+ margin-bottom: 10px;
}
-select {
- padding: 10px;
- border: 1px solid black;
- border-radius: 10px;
- width: 100%;
- -moz-appearance: none; /* Firefox */
- -webkit-appearance: none; /* Safari and Chrome */
+select
+{
+ padding: 10px;
+ border: 1px solid black;
+ border-radius: 10px;
+ width: 100%;
+ -moz-appearance: none; /* Firefox */
+ -webkit-appearance: none; /* Safari and Chrome */
}
-button {
- margin: 10px;
- border-radius: 10px;
- border: 0px;
- padding: 10px 20px;
- background-color: #343434;
- color: white;
+button
+{
+ margin: 10px;
+ border-radius: 10px;
+ border: 0px;
+ padding: 10px 20px;
+ background-color: #343434;
+ color: white;
}
-textarea {
- resize: none;
- width: 100%;
- border-radius: 10px;
- border: 1px solid black;
- padding: 10px;
- box-sizing: border-box;
- height: 200px;
- font-family: Consolas;
+textarea
+{
+ resize: none;
+ width: 100%;
+ border-radius: 10px;
+ border: 1px solid black;
+ padding: 10px;
+ box-sizing: border-box;
+ height: 200px;
+ font-family: Consolas;
}
-.select-container::after {
- content: '>';
- transform: rotate(90deg);
- -webkit-transform: rotate(90deg);
- -moz-transform: rotate(90deg);
- -ms-transform: rotate(90deg);
- right: 11px;
- top: 11px;
- position: absolute;
- pointer-events: none;
+.select-container::after
+{
+ content: '>';
+ transform: rotate(90deg);
+ -webkit-transform: rotate(90deg);
+ -moz-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ right: 11px;
+ top: 11px;
+ position: absolute;
+ pointer-events: none;
}
-.select-container {
- position: relative;
+.select-container
+{
+ position: relative;
}
-form {
- max-width: 50%;
+form
+{
+ max-width: 50%;
}
-.admin-menu a {
- font-size: 16pt;
+.admin-menu a
+{
+ font-size: 16pt;
}
-.logout, .logout:link, .logout:link:visited {
- font-size: 16pt;
- color: red !important;
+.logout, .logout:link, .logout:link:visited
+{
+ font-size: 16pt;
+ color: red !important;
}
-.validation-summary-errors {
- color: red;
+.validation-summary-errors
+{
+ color: red;
}
-th {
- text-align: left;
-}
-table {
- width: 100%;
+th
+{
+ text-align: left;
}
-.form-group input {
- width: auto;
+td
+{
+ text-align: start;
}
-.text-danger {
- text-decoration: solid;
- color: red;
+table
+{
+ width: 100%;
}
-.btn {
- background-color: #343434;
- color: white;
+.form-group input
+{
+ width: auto;
}
-.btn-danger {
- background-color: red;
- color: white;
+.text-danger
+{
+ text-decoration: solid;
+ color: red;
}
-.checkbox {
- width: auto;
+.btn
+{
+ background-color: #343434;
+ color: white;
}
-.readonly {
- background-color: lightgray;
+.btn-danger
+{
+ background-color: red;
+ color: white;
}
-@media only screen and (max-width: 700px) {
- form {
- max-width: initial;
- }
+.checkbox
+{
+ width: auto;
+}
+
+.readonly
+{
+ background-color: lightgray;
+}
+
+.reorder-arrow:link
+{
+ text-decoration: none;
+}
+
+@media only screen and (max-width: 700px)
+{
+ form
+ {
+ max-width: initial;
+ }
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/css/ContactsBlock.css b/MyWebsite/MyWebsite/wwwroot/css/ContactsBlock.css
index 89768e3..5b4895a 100644
--- a/MyWebsite/MyWebsite/wwwroot/css/ContactsBlock.css
+++ b/MyWebsite/MyWebsite/wwwroot/css/ContactsBlock.css
@@ -1,51 +1,53 @@
footer
{
- display: none;
-}
-
-#contact-me
-{
+ display: initial;
padding: 30px 50px;
margin: 0px;
background-color: #1e1e1e;
color: white;
}
- #contact-me var
+ footer var
{
color: #569cd6;
font: inherit;
}
- #contact-me .class
+ footer .class
{
color: #4ec9b0;
}
- #contact-me .method
+ footer .method
{
color: #dcdcaa;
}
- #contact-me div
+ footer div
{
margin-left: 25px;
}
- #contact-me span a,
- #contact-me span a:visited
+ footer span a,
+ footer span a:link,
+ footer span a:visited
{
color: #d69d85;
text-decoration: none;
}
- #contact-me span a:before,
- #contact-me span a:after
+ footer span a:before,
+ footer span a:after
{
content: "\"";
}
- #contact-me span a:link:hover
+ footer span a:link:hover
{
text-decoration: underline;
+ }
+
+ footer span a:hover
+ {
+ color: #d69d85;
}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/css/Gallery.css b/MyWebsite/MyWebsite/wwwroot/css/Gallery.css
index 68071cb..230af33 100644
--- a/MyWebsite/MyWebsite/wwwroot/css/Gallery.css
+++ b/MyWebsite/MyWebsite/wwwroot/css/Gallery.css
@@ -15,7 +15,7 @@
}
/* Adaptive code */
-@media only screen and (max-width: 600px)
+@media only screen and (max-width: 700px)
{
.gallery img
{
@@ -46,4 +46,4 @@
.image-overview-block h1
{
margin-bottom: 0px;
-}
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/css/Projects.css b/MyWebsite/MyWebsite/wwwroot/css/Projects.css
index 2be5b25..b63e24b 100644
--- a/MyWebsite/MyWebsite/wwwroot/css/Projects.css
+++ b/MyWebsite/MyWebsite/wwwroot/css/Projects.css
@@ -56,4 +56,4 @@ article
width: 25px;
display: inline-block;
background-size: contain;
- }
+ }
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/css/Socicon.css b/MyWebsite/MyWebsite/wwwroot/css/Socicon.css
new file mode 100644
index 0000000..3f47ac7
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/css/Socicon.css
@@ -0,0 +1,1508 @@
+@font-face
+{
+ font-family: 'Socicon';
+ src: url('/fonts/Socicon/Socicon.eot?87visu');
+ src: url('/fonts/Socicon/Socicon.eot?87visu#iefix') format('embedded-opentype'), url('/fonts/Socicon/Socicon.woff2?87visu') format('woff2'), url('/fonts/Socicon/Socicon.ttf?87visu') format('truetype'), url('/fonts/Socicon/Socicon.woff?87visu') format('woff'), url('/fonts/Socicon/Socicon.svg?87visu#Socicon') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+
+[class^="socicon-"], [class*=" socicon-"]
+{
+ /* use !important to prevent issues with browser extensions that change fonts */
+ font-family: 'Socicon' !important;
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ /* Better Font Rendering =========== */
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.socicon-eitaa:before
+{
+ content: "\e97c";
+}
+
+.socicon-soroush:before
+{
+ content: "\e97d";
+}
+
+.socicon-bale:before
+{
+ content: "\e97e";
+}
+
+.socicon-zazzle:before
+{
+ content: "\e97b";
+}
+
+.socicon-society6:before
+{
+ content: "\e97a";
+}
+
+.socicon-redbubble:before
+{
+ content: "\e979";
+}
+
+.socicon-avvo:before
+{
+ content: "\e978";
+}
+
+.socicon-stitcher:before
+{
+ content: "\e977";
+}
+
+.socicon-googlehangouts:before
+{
+ content: "\e974";
+}
+
+.socicon-dlive:before
+{
+ content: "\e975";
+}
+
+.socicon-vsco:before
+{
+ content: "\e976";
+}
+
+.socicon-flipboard:before
+{
+ content: "\e973";
+}
+
+.socicon-ubuntu:before
+{
+ content: "\e958";
+}
+
+.socicon-artstation:before
+{
+ content: "\e959";
+}
+
+.socicon-invision:before
+{
+ content: "\e95a";
+}
+
+.socicon-torial:before
+{
+ content: "\e95b";
+}
+
+.socicon-collectorz:before
+{
+ content: "\e95c";
+}
+
+.socicon-seenthis:before
+{
+ content: "\e95d";
+}
+
+.socicon-googleplaymusic:before
+{
+ content: "\e95e";
+}
+
+.socicon-debian:before
+{
+ content: "\e95f";
+}
+
+.socicon-filmfreeway:before
+{
+ content: "\e960";
+}
+
+.socicon-gnome:before
+{
+ content: "\e961";
+}
+
+.socicon-itchio:before
+{
+ content: "\e962";
+}
+
+.socicon-jamendo:before
+{
+ content: "\e963";
+}
+
+.socicon-mix:before
+{
+ content: "\e964";
+}
+
+.socicon-sharepoint:before
+{
+ content: "\e965";
+}
+
+.socicon-tinder:before
+{
+ content: "\e966";
+}
+
+.socicon-windguru:before
+{
+ content: "\e967";
+}
+
+.socicon-cdbaby:before
+{
+ content: "\e968";
+}
+
+.socicon-elementaryos:before
+{
+ content: "\e969";
+}
+
+.socicon-stage32:before
+{
+ content: "\e96a";
+}
+
+.socicon-tiktok:before
+{
+ content: "\e96b";
+}
+
+.socicon-gitter:before
+{
+ content: "\e96c";
+}
+
+.socicon-letterboxd:before
+{
+ content: "\e96d";
+}
+
+.socicon-threema:before
+{
+ content: "\e96e";
+}
+
+.socicon-splice:before
+{
+ content: "\e96f";
+}
+
+.socicon-metapop:before
+{
+ content: "\e970";
+}
+
+.socicon-naver:before
+{
+ content: "\e971";
+}
+
+.socicon-remote:before
+{
+ content: "\e972";
+}
+
+.socicon-internet:before
+{
+ content: "\e957";
+}
+
+.socicon-moddb:before
+{
+ content: "\e94b";
+}
+
+.socicon-indiedb:before
+{
+ content: "\e94c";
+}
+
+.socicon-traxsource:before
+{
+ content: "\e94d";
+}
+
+.socicon-gamefor:before
+{
+ content: "\e94e";
+}
+
+.socicon-pixiv:before
+{
+ content: "\e94f";
+}
+
+.socicon-myanimelist:before
+{
+ content: "\e950";
+}
+
+.socicon-blackberry:before
+{
+ content: "\e951";
+}
+
+.socicon-wickr:before
+{
+ content: "\e952";
+}
+
+.socicon-spip:before
+{
+ content: "\e953";
+}
+
+.socicon-napster:before
+{
+ content: "\e954";
+}
+
+.socicon-beatport:before
+{
+ content: "\e955";
+}
+
+.socicon-hackerone:before
+{
+ content: "\e956";
+}
+
+.socicon-hackernews:before
+{
+ content: "\e946";
+}
+
+.socicon-smashwords:before
+{
+ content: "\e947";
+}
+
+.socicon-kobo:before
+{
+ content: "\e948";
+}
+
+.socicon-bookbub:before
+{
+ content: "\e949";
+}
+
+.socicon-mailru:before
+{
+ content: "\e94a";
+}
+
+.socicon-gitlab:before
+{
+ content: "\e945";
+}
+
+.socicon-instructables:before
+{
+ content: "\e944";
+}
+
+.socicon-portfolio:before
+{
+ content: "\e943";
+}
+
+.socicon-codered:before
+{
+ content: "\e940";
+}
+
+.socicon-origin:before
+{
+ content: "\e941";
+}
+
+.socicon-nextdoor:before
+{
+ content: "\e942";
+}
+
+.socicon-udemy:before
+{
+ content: "\e93f";
+}
+
+.socicon-livemaster:before
+{
+ content: "\e93e";
+}
+
+.socicon-crunchbase:before
+{
+ content: "\e93b";
+}
+
+.socicon-homefy:before
+{
+ content: "\e93c";
+}
+
+.socicon-calendly:before
+{
+ content: "\e93d";
+}
+
+.socicon-realtor:before
+{
+ content: "\e90f";
+}
+
+.socicon-tidal:before
+{
+ content: "\e910";
+}
+
+.socicon-qobuz:before
+{
+ content: "\e911";
+}
+
+.socicon-natgeo:before
+{
+ content: "\e912";
+}
+
+.socicon-mastodon:before
+{
+ content: "\e913";
+}
+
+.socicon-unsplash:before
+{
+ content: "\e914";
+}
+
+.socicon-homeadvisor:before
+{
+ content: "\e915";
+}
+
+.socicon-angieslist:before
+{
+ content: "\e916";
+}
+
+.socicon-codepen:before
+{
+ content: "\e917";
+}
+
+.socicon-slack:before
+{
+ content: "\e918";
+}
+
+.socicon-openaigym:before
+{
+ content: "\e919";
+}
+
+.socicon-logmein:before
+{
+ content: "\e91a";
+}
+
+.socicon-fiverr:before
+{
+ content: "\e91b";
+}
+
+.socicon-gotomeeting:before
+{
+ content: "\e91c";
+}
+
+.socicon-aliexpress:before
+{
+ content: "\e91d";
+}
+
+.socicon-guru:before
+{
+ content: "\e91e";
+}
+
+.socicon-appstore:before
+{
+ content: "\e91f";
+}
+
+.socicon-homes:before
+{
+ content: "\e920";
+}
+
+.socicon-zoom:before
+{
+ content: "\e921";
+}
+
+.socicon-alibaba:before
+{
+ content: "\e922";
+}
+
+.socicon-craigslist:before
+{
+ content: "\e923";
+}
+
+.socicon-wix:before
+{
+ content: "\e924";
+}
+
+.socicon-redfin:before
+{
+ content: "\e925";
+}
+
+.socicon-googlecalendar:before
+{
+ content: "\e926";
+}
+
+.socicon-shopify:before
+{
+ content: "\e927";
+}
+
+.socicon-freelancer:before
+{
+ content: "\e928";
+}
+
+.socicon-seedrs:before
+{
+ content: "\e929";
+}
+
+.socicon-bing:before
+{
+ content: "\e92a";
+}
+
+.socicon-doodle:before
+{
+ content: "\e92b";
+}
+
+.socicon-bonanza:before
+{
+ content: "\e92c";
+}
+
+.socicon-squarespace:before
+{
+ content: "\e92d";
+}
+
+.socicon-toptal:before
+{
+ content: "\e92e";
+}
+
+.socicon-gust:before
+{
+ content: "\e92f";
+}
+
+.socicon-ask:before
+{
+ content: "\e930";
+}
+
+.socicon-trulia:before
+{
+ content: "\e931";
+}
+
+.socicon-loomly:before
+{
+ content: "\e932";
+}
+
+.socicon-ghost:before
+{
+ content: "\e933";
+}
+
+.socicon-upwork:before
+{
+ content: "\e934";
+}
+
+.socicon-fundable:before
+{
+ content: "\e935";
+}
+
+.socicon-booking:before
+{
+ content: "\e936";
+}
+
+.socicon-googlemaps:before
+{
+ content: "\e937";
+}
+
+.socicon-zillow:before
+{
+ content: "\e938";
+}
+
+.socicon-niconico:before
+{
+ content: "\e939";
+}
+
+.socicon-toneden:before
+{
+ content: "\e93a";
+}
+
+.socicon-augment:before
+{
+ content: "\e908";
+}
+
+.socicon-bitbucket:before
+{
+ content: "\e909";
+}
+
+.socicon-fyuse:before
+{
+ content: "\e90a";
+}
+
+.socicon-yt-gaming:before
+{
+ content: "\e90b";
+}
+
+.socicon-sketchfab:before
+{
+ content: "\e90c";
+}
+
+.socicon-mobcrush:before
+{
+ content: "\e90d";
+}
+
+.socicon-microsoft:before
+{
+ content: "\e90e";
+}
+
+.socicon-pandora:before
+{
+ content: "\e907";
+}
+
+.socicon-messenger:before
+{
+ content: "\e906";
+}
+
+.socicon-gamewisp:before
+{
+ content: "\e905";
+}
+
+.socicon-bloglovin:before
+{
+ content: "\e904";
+}
+
+.socicon-tunein:before
+{
+ content: "\e903";
+}
+
+.socicon-gamejolt:before
+{
+ content: "\e901";
+}
+
+.socicon-trello:before
+{
+ content: "\e902";
+}
+
+.socicon-spreadshirt:before
+{
+ content: "\e900";
+}
+
+.socicon-500px:before
+{
+ content: "\e000";
+}
+
+.socicon-8tracks:before
+{
+ content: "\e001";
+}
+
+.socicon-airbnb:before
+{
+ content: "\e002";
+}
+
+.socicon-alliance:before
+{
+ content: "\e003";
+}
+
+.socicon-amazon:before
+{
+ content: "\e004";
+}
+
+.socicon-amplement:before
+{
+ content: "\e005";
+}
+
+.socicon-android:before
+{
+ content: "\e006";
+}
+
+.socicon-angellist:before
+{
+ content: "\e007";
+}
+
+.socicon-apple:before
+{
+ content: "\e008";
+}
+
+.socicon-appnet:before
+{
+ content: "\e009";
+}
+
+.socicon-baidu:before
+{
+ content: "\e00a";
+}
+
+.socicon-bandcamp:before
+{
+ content: "\e00b";
+}
+
+.socicon-battlenet:before
+{
+ content: "\e00c";
+}
+
+.socicon-mixer:before
+{
+ content: "\e00d";
+}
+
+.socicon-bebee:before
+{
+ content: "\e00e";
+}
+
+.socicon-bebo:before
+{
+ content: "\e00f";
+}
+
+.socicon-behance:before
+{
+ content: "\e010";
+}
+
+.socicon-blizzard:before
+{
+ content: "\e011";
+}
+
+.socicon-blogger:before
+{
+ content: "\e012";
+}
+
+.socicon-buffer:before
+{
+ content: "\e013";
+}
+
+.socicon-chrome:before
+{
+ content: "\e014";
+}
+
+.socicon-coderwall:before
+{
+ content: "\e015";
+}
+
+.socicon-curse:before
+{
+ content: "\e016";
+}
+
+.socicon-dailymotion:before
+{
+ content: "\e017";
+}
+
+.socicon-deezer:before
+{
+ content: "\e018";
+}
+
+.socicon-delicious:before
+{
+ content: "\e019";
+}
+
+.socicon-deviantart:before
+{
+ content: "\e01a";
+}
+
+.socicon-diablo:before
+{
+ content: "\e01b";
+}
+
+.socicon-digg:before
+{
+ content: "\e01c";
+}
+
+.socicon-discord:before
+{
+ content: "\e01d";
+}
+
+.socicon-disqus:before
+{
+ content: "\e01e";
+}
+
+.socicon-douban:before
+{
+ content: "\e01f";
+}
+
+.socicon-draugiem:before
+{
+ content: "\e020";
+}
+
+.socicon-dribbble:before
+{
+ content: "\e021";
+}
+
+.socicon-drupal:before
+{
+ content: "\e022";
+}
+
+.socicon-ebay:before
+{
+ content: "\e023";
+}
+
+.socicon-ello:before
+{
+ content: "\e024";
+}
+
+.socicon-endomodo:before
+{
+ content: "\e025";
+}
+
+.socicon-envato:before
+{
+ content: "\e026";
+}
+
+.socicon-etsy:before
+{
+ content: "\e027";
+}
+
+.socicon-facebook:before
+{
+ content: "\e028";
+}
+
+.socicon-feedburner:before
+{
+ content: "\e029";
+}
+
+.socicon-filmweb:before
+{
+ content: "\e02a";
+}
+
+.socicon-firefox:before
+{
+ content: "\e02b";
+}
+
+.socicon-flattr:before
+{
+ content: "\e02c";
+}
+
+.socicon-flickr:before
+{
+ content: "\e02d";
+}
+
+.socicon-formulr:before
+{
+ content: "\e02e";
+}
+
+.socicon-forrst:before
+{
+ content: "\e02f";
+}
+
+.socicon-foursquare:before
+{
+ content: "\e030";
+}
+
+.socicon-friendfeed:before
+{
+ content: "\e031";
+}
+
+.socicon-github:before
+{
+ content: "\e032";
+}
+
+.socicon-goodreads:before
+{
+ content: "\e033";
+}
+
+.socicon-google:before
+{
+ content: "\e034";
+}
+
+.socicon-googlescholar:before
+{
+ content: "\e035";
+}
+
+.socicon-googlegroups:before
+{
+ content: "\e036";
+}
+
+.socicon-googlephotos:before
+{
+ content: "\e037";
+}
+
+.socicon-googleplus:before
+{
+ content: "\e038";
+}
+
+.socicon-grooveshark:before
+{
+ content: "\e039";
+}
+
+.socicon-hackerrank:before
+{
+ content: "\e03a";
+}
+
+.socicon-hearthstone:before
+{
+ content: "\e03b";
+}
+
+.socicon-hellocoton:before
+{
+ content: "\e03c";
+}
+
+.socicon-heroes:before
+{
+ content: "\e03d";
+}
+
+.socicon-smashcast:before
+{
+ content: "\e03e";
+}
+
+.socicon-horde:before
+{
+ content: "\e03f";
+}
+
+.socicon-houzz:before
+{
+ content: "\e040";
+}
+
+.socicon-icq:before
+{
+ content: "\e041";
+}
+
+.socicon-identica:before
+{
+ content: "\e042";
+}
+
+.socicon-imdb:before
+{
+ content: "\e043";
+}
+
+.socicon-instagram:before
+{
+ content: "\e044";
+}
+
+.socicon-issuu:before
+{
+ content: "\e045";
+}
+
+.socicon-istock:before
+{
+ content: "\e046";
+}
+
+.socicon-itunes:before
+{
+ content: "\e047";
+}
+
+.socicon-keybase:before
+{
+ content: "\e048";
+}
+
+.socicon-lanyrd:before
+{
+ content: "\e049";
+}
+
+.socicon-lastfm:before
+{
+ content: "\e04a";
+}
+
+.socicon-line:before
+{
+ content: "\e04b";
+}
+
+.socicon-linkedin:before
+{
+ content: "\e04c";
+}
+
+.socicon-livejournal:before
+{
+ content: "\e04d";
+}
+
+.socicon-lyft:before
+{
+ content: "\e04e";
+}
+
+.socicon-macos:before
+{
+ content: "\e04f";
+}
+
+.socicon-mail:before
+{
+ content: "\e050";
+}
+
+.socicon-medium:before
+{
+ content: "\e051";
+}
+
+.socicon-meetup:before
+{
+ content: "\e052";
+}
+
+.socicon-mixcloud:before
+{
+ content: "\e053";
+}
+
+.socicon-modelmayhem:before
+{
+ content: "\e054";
+}
+
+.socicon-mumble:before
+{
+ content: "\e055";
+}
+
+.socicon-myspace:before
+{
+ content: "\e056";
+}
+
+.socicon-newsvine:before
+{
+ content: "\e057";
+}
+
+.socicon-nintendo:before
+{
+ content: "\e058";
+}
+
+.socicon-npm:before
+{
+ content: "\e059";
+}
+
+.socicon-odnoklassniki:before
+{
+ content: "\e05a";
+}
+
+.socicon-openid:before
+{
+ content: "\e05b";
+}
+
+.socicon-opera:before
+{
+ content: "\e05c";
+}
+
+.socicon-outlook:before
+{
+ content: "\e05d";
+}
+
+.socicon-overwatch:before
+{
+ content: "\e05e";
+}
+
+.socicon-patreon:before
+{
+ content: "\e05f";
+}
+
+.socicon-paypal:before
+{
+ content: "\e060";
+}
+
+.socicon-periscope:before
+{
+ content: "\e061";
+}
+
+.socicon-persona:before
+{
+ content: "\e062";
+}
+
+.socicon-pinterest:before
+{
+ content: "\e063";
+}
+
+.socicon-play:before
+{
+ content: "\e064";
+}
+
+.socicon-player:before
+{
+ content: "\e065";
+}
+
+.socicon-playstation:before
+{
+ content: "\e066";
+}
+
+.socicon-pocket:before
+{
+ content: "\e067";
+}
+
+.socicon-qq:before
+{
+ content: "\e068";
+}
+
+.socicon-quora:before
+{
+ content: "\e069";
+}
+
+.socicon-raidcall:before
+{
+ content: "\e06a";
+}
+
+.socicon-ravelry:before
+{
+ content: "\e06b";
+}
+
+.socicon-reddit:before
+{
+ content: "\e06c";
+}
+
+.socicon-renren:before
+{
+ content: "\e06d";
+}
+
+.socicon-researchgate:before
+{
+ content: "\e06e";
+}
+
+.socicon-residentadvisor:before
+{
+ content: "\e06f";
+}
+
+.socicon-reverbnation:before
+{
+ content: "\e070";
+}
+
+.socicon-rss:before
+{
+ content: "\e071";
+}
+
+.socicon-sharethis:before
+{
+ content: "\e072";
+}
+
+.socicon-skype:before
+{
+ content: "\e073";
+}
+
+.socicon-slideshare:before
+{
+ content: "\e074";
+}
+
+.socicon-smugmug:before
+{
+ content: "\e075";
+}
+
+.socicon-snapchat:before
+{
+ content: "\e076";
+}
+
+.socicon-songkick:before
+{
+ content: "\e077";
+}
+
+.socicon-soundcloud:before
+{
+ content: "\e078";
+}
+
+.socicon-spotify:before
+{
+ content: "\e079";
+}
+
+.socicon-stackexchange:before
+{
+ content: "\e07a";
+}
+
+.socicon-stackoverflow:before
+{
+ content: "\e07b";
+}
+
+.socicon-starcraft:before
+{
+ content: "\e07c";
+}
+
+.socicon-stayfriends:before
+{
+ content: "\e07d";
+}
+
+.socicon-steam:before
+{
+ content: "\e07e";
+}
+
+.socicon-storehouse:before
+{
+ content: "\e07f";
+}
+
+.socicon-strava:before
+{
+ content: "\e080";
+}
+
+.socicon-streamjar:before
+{
+ content: "\e081";
+}
+
+.socicon-stumbleupon:before
+{
+ content: "\e082";
+}
+
+.socicon-swarm:before
+{
+ content: "\e083";
+}
+
+.socicon-teamspeak:before
+{
+ content: "\e084";
+}
+
+.socicon-teamviewer:before
+{
+ content: "\e085";
+}
+
+.socicon-technorati:before
+{
+ content: "\e086";
+}
+
+.socicon-telegram:before
+{
+ content: "\e087";
+}
+
+.socicon-tripadvisor:before
+{
+ content: "\e088";
+}
+
+.socicon-tripit:before
+{
+ content: "\e089";
+}
+
+.socicon-triplej:before
+{
+ content: "\e08a";
+}
+
+.socicon-tumblr:before
+{
+ content: "\e08b";
+}
+
+.socicon-twitch:before
+{
+ content: "\e08c";
+}
+
+.socicon-twitter:before
+{
+ content: "\e08d";
+}
+
+.socicon-uber:before
+{
+ content: "\e08e";
+}
+
+.socicon-ventrilo:before
+{
+ content: "\e08f";
+}
+
+.socicon-viadeo:before
+{
+ content: "\e090";
+}
+
+.socicon-viber:before
+{
+ content: "\e091";
+}
+
+.socicon-viewbug:before
+{
+ content: "\e092";
+}
+
+.socicon-vimeo:before
+{
+ content: "\e093";
+}
+
+.socicon-vine:before
+{
+ content: "\e094";
+}
+
+.socicon-vkontakte:before
+{
+ content: "\e095";
+}
+
+.socicon-warcraft:before
+{
+ content: "\e096";
+}
+
+.socicon-wechat:before
+{
+ content: "\e097";
+}
+
+.socicon-weibo:before
+{
+ content: "\e098";
+}
+
+.socicon-whatsapp:before
+{
+ content: "\e099";
+}
+
+.socicon-wikipedia:before
+{
+ content: "\e09a";
+}
+
+.socicon-windows:before
+{
+ content: "\e09b";
+}
+
+.socicon-wordpress:before
+{
+ content: "\e09c";
+}
+
+.socicon-wykop:before
+{
+ content: "\e09d";
+}
+
+.socicon-xbox:before
+{
+ content: "\e09e";
+}
+
+.socicon-xing:before
+{
+ content: "\e09f";
+}
+
+.socicon-yahoo:before
+{
+ content: "\e0a0";
+}
+
+.socicon-yammer:before
+{
+ content: "\e0a1";
+}
+
+.socicon-yandex:before
+{
+ content: "\e0a2";
+}
+
+.socicon-yelp:before
+{
+ content: "\e0a3";
+}
+
+.socicon-younow:before
+{
+ content: "\e0a4";
+}
+
+.socicon-youtube:before
+{
+ content: "\e0a5";
+}
+
+.socicon-zapier:before
+{
+ content: "\e0a6";
+}
+
+.socicon-zerply:before
+{
+ content: "\e0a7";
+}
+
+.socicon-zomato:before
+{
+ content: "\e0a8";
+}
+
+.socicon-zynga:before
+{
+ content: "\e0a9";
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/css/Style.css b/MyWebsite/MyWebsite/wwwroot/css/Style.css
index ac4441c..af26389 100644
--- a/MyWebsite/MyWebsite/wwwroot/css/Style.css
+++ b/MyWebsite/MyWebsite/wwwroot/css/Style.css
@@ -6,15 +6,15 @@
@font-face
{
font-family: 'Consolas';
- src: url("/fonts/consolas.eot");
- src: url("/fonts/consolas.eot?#iefix") format("embedded-opentype"), url("/fonts/consolas.otf") format("opentype"), url("/fonts/consolas.svg") format("svg"), url("/fonts/consolas.ttf") format("truetype"), url("/fonts/consolas.woff") format("woff"), url("/fonts/consolas.woff2") format("woff2");
+ src: url("/fonts/Consolas/consolas.eot");
+ src: url("/fonts/Consolas/consolas.eot?#iefix") format("embedded-opentype"), url("/fonts/Consolas/consolas.otf") format("opentype"), url("/fonts/Consolas/consolas.svg") format("svg"), url("/fonts/Consolas/consolas.ttf") format("truetype"), url("/fonts/Consolas/consolas.woff") format("woff"), url("/fonts/Consolas/consolas.woff2") format("woff2");
}
@font-face
{
font-family: 'Segoe MDL2 Assets';
- src: url("/fonts/segoeMLD2assets.eot");
- src: url("/fonts/segoeMLD2assets.eot?#iefix") format("embedded-opentype"), url("/fonts/segoeMLD2assets.otf") format("opentype"), url("/fonts/segoeMLD2assets.svg") format("svg"), url("/fonts/segoeMLD2assets.ttf") format("truetype"), url("/fonts/segoeMLD2assets.woff") format("woff"), url("/fonts/segoeMLD2assets.woff2") format("woff2");
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot");
+ src: url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot?#iefix") format("embedded-opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.otf") format("opentype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.svg") format("svg"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.ttf") format("truetype"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff") format("woff"), url("/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff2") format("woff2");
}
/* Header styles */
@@ -98,6 +98,7 @@ footer
align-items: center;
grid-template-columns: 1fr auto;
grid-column-gap: 10px;
+ user-select: none;
}
footer a
@@ -153,4 +154,4 @@ article, header
.comment, .comment:visited
{
color: #57a64a !important;
-}
+}
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.eot b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.eot
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.eot
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.eot
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.otf b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.otf
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.otf
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.otf
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.svg b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.svg
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.svg
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.svg
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.ttf b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.ttf
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.ttf
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.ttf
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.woff b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.woff
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.woff
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.woff
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/consolas.woff2 b/MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.woff2
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/consolas.woff2
rename to MyWebsite/MyWebsite/wwwroot/fonts/Consolas/consolas.woff2
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.eot b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.eot
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.eot
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.otf b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.otf
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.otf
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.otf
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.svg b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.svg
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.svg
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.svg
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.ttf b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.ttf
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.ttf
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.ttf
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.woff b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.woff
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.woff2 b/MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff2
similarity index 100%
rename from MyWebsite/MyWebsite/wwwroot/fonts/segoeMLD2assets.woff2
rename to MyWebsite/MyWebsite/wwwroot/fonts/Segoe MDL2 Assets/segoeMLD2assets.woff2
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.eot b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.eot
new file mode 100644
index 0000000..ac878ff
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.eot differ
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.svg b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.svg
new file mode 100644
index 0000000..1329c9b
--- /dev/null
+++ b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.svg
@@ -0,0 +1,307 @@
+
+
+
+Generated by IcoMoon
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.ttf b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.ttf
new file mode 100644
index 0000000..f5cceed
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.ttf differ
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff
new file mode 100644
index 0000000..99bf863
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff differ
diff --git a/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff2 b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff2
new file mode 100644
index 0000000..7e81286
Binary files /dev/null and b/MyWebsite/MyWebsite/wwwroot/fonts/Socicon/Socicon.woff2 differ
diff --git a/MyWebsite/MyWebsite/wwwroot/js/site.js b/MyWebsite/MyWebsite/wwwroot/js/site.js
deleted file mode 100644
index 9a1002a..0000000
--- a/MyWebsite/MyWebsite/wwwroot/js/site.js
+++ /dev/null
@@ -1 +0,0 @@
-const delay = ms => new Promise(res => setTimeout(res, ms));
\ No newline at end of file