1
0

Refactoring 1

This commit is contained in:
Michael Gordeev
2019-12-09 21:14:09 +03:00
parent 7f57d9cc95
commit 53e95afa2d
115 changed files with 934 additions and 0 deletions
@@ -0,0 +1,10 @@
using Microsoft.AspNetCore.Mvc;
namespace MyWebsite.Controllers
{
public class AboutController : Controller
{
public IActionResult Index() =>
View();
}
}
@@ -0,0 +1,45 @@
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<IActionResult> Projects(int? id)
{
if (id == null)
return View();
else
{
Project[] projects = JsonConvert.DeserializeObject<Project[]>(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Projects.json"));
ViewData["Project"] = projects[id.Value];
ViewData["Badges"] = new Dictionary<string, string>
{
{ "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");
}
}
}
}
+28
View File
@@ -0,0 +1,28 @@
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();
}
}
}
@@ -0,0 +1,21 @@
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<string, Link> links = JsonConvert.DeserializeObject<Dictionary<string, Link>>(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();
}
}
}
@@ -0,0 +1,25 @@
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<IActionResult> Index()
{
return View(JsonConvert.DeserializeObject<Image[]>(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Gallery.json")));
}
[HttpGet("Image")]
public async Task<IActionResult> Details(string id)
{
return View(JsonConvert.DeserializeObject<Image[]>(await new HttpClient().GetStringAsync($"https://{Request.Host}/Gallery.json")).First(i => i.FileName == id));
}
}
}
@@ -0,0 +1,25 @@
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 });
}
}
@@ -0,0 +1,33 @@
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<IActionResult> Index()
{
Project[] projects = JsonConvert.DeserializeObject<Project[]>(await new HttpClient().GetStringAsync($"{Request.Scheme}://{Request.Host}/Projects.json"));
ViewData["Projects"] = projects;
ViewData["Badges"] = new Dictionary<string, string>
{
{ "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();
}
}
}
+11
View File
@@ -0,0 +1,11 @@
using System;
namespace MyWebsite.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}
+13
View File
@@ -0,0 +1,13 @@
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; }
}
}
+16
View File
@@ -0,0 +1,16 @@
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; }
}
}
+17
View File
@@ -0,0 +1,17 @@
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; }
}
}
+17
View File
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.10" />
<PackageReference Include="Select.HtmlToPdf.NetCore" Version="19.2.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\fonts\" />
</ItemGroup>
</Project>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>False</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<WebStackScaffolding_LayoutPageFile />
</PropertyGroup>
</Project>
+15
View File
@@ -0,0 +1,15 @@
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<Startup>();
}
}
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>11629863-00fc-468b-b82a-78bfeb3c676e</ProjectGuid>
<publishUrl>bin\Release\netcoreapp2.1\publish\</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
</PropertyGroup>
</Project>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>C:\Users\micha\Repositories\CVWebsite\MyWebsite\MyWebsite\bin\Release\netcoreapp2.1\publish\</_PublishTargetUrl>
</PropertyGroup>
</Project>
@@ -0,0 +1,27 @@
{
"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"
}
}
}
}
+58
View File
@@ -0,0 +1,58 @@
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<CookiePolicyOptions>(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?}");
});
}
}
}
+27
View File
@@ -0,0 +1,27 @@
@{
ViewData["Title"] = "Admin panel";
}
<header>
<h1>Administration</h1>
<h3><b style="color: red">Note:</b> Any write/read operations in this section will require an admin password</h3>
</header>
<article>
<form>
<input type="password" placeholder="Password" /><br />
<label for="area">Go to section:</label><br />
<div class="select-container">
<select id="area">
<option>Contact links</option>
<option>Artworks</option>
<option>Projects</option>
<option>Resume</option>
</select>
</div>
<button>Proceed</button>
</form>
</article>
<link rel="stylesheet" type="text/css" href="~/css/Admin.css" />
@@ -0,0 +1,35 @@
@{
ViewData["Title"] = "Project editor";
Project project = ViewData["Project"] as Project;
}
<header>
<h1>Project editor</h1>
<h2>@project.Title</h2>
</header>
<article>
<form>
<label for="langSelector">Language:</label>
<div class="select-container">
<select id="langSelector">
<option>English</option>
<option>Russian</option>
</select>
</div>
<label for="title">Title:</label>
<input id="title" placeholder="Title" type="text" value="@project.Title"/>
<label for="description">Description:</label>
<textarea id="description" placeholder="Description" type="text">@project.Description</textarea>
<label for="thumbnail">Thumbnail:</label>
<input id="thumbnail" placeholder="Thumbnail" type="file" />
<button>Submit</button>
</form>
</article>
<link rel="stylesheet" type="text/css" href="~/css/Admin.css" />
@@ -0,0 +1,7 @@
@{
ViewData["Title"] = "Projects list";
}
<h2>Projects</h2>
+157
View File
@@ -0,0 +1,157 @@
<article id="cv">
<h3>Michael (Mikhail) A. Gordeev</h3>
<hr>
<p>
Saint Petersburg,<br>
Russia<br>
Phone (Russia): +7 (996) 929-19-69<br>
Email: <a href="mailto:michael.xfox@outlook.com">michael.xfox@outlook.com</a><br>
Personal Website: <a href="//xfox111.net/" target="_blank">https://www.xfox111.net/</a>
</p>
<h4>Overall Summary:</h4>
<p>
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.
</p>
<h4>Summary of Skills:</h4>
<ul>
<li>
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
</li>
<li>
Proficient in Object oriented programming such as C#, C++, Java as well as experience with .NET, ASP.NET Core, MVC, Xamarin and Unity frameworks
</li>
<li>
Strong understanding of HTML, CSS, JavaScript, Visual Studio, design and architectural patterns
</li>
<li>
Have a medium knowledge of Computer Vision and Machine learning
</li>
<li>
Ability to analyze and understand complex problems, and generate appropriate technical solutions independently
</li>
<li>
Effective communication and interpersonal skills with the ability to maintain good relations and share technical ideas with users or clients, technical and management staff
</li>
<li>
Ability to work independently and within teams
</li>
<li>
Strong organizational skills along with the ability to accomplish multiple tasks under extreme pressure, and meet specific deadlines
</li>
<li>
Ability to grasp and apply new concepts quickly and stay updated with latest trends and technical advancements
</li>
</ul>
<h4>TECHNICAL SKILLS:</h4>
<ul>
<li>
Knowledge of Microsoft Windows Operating System
</li>
<li>
Technologies stack: .NET, ASP.NET MVC, Unity, Xamarin, Azure DevOps
</li>
<li>
Languages: C#, JavaScript, Java, C++, Pascal, XAML, HTML, XML, CSS, SQL
</li>
<li>
Platforms: UWP, Win32, Web, Android, iOS
</li>
<li>
Software: Visual Studio, Adobe Photoshop, Illustrator, DaVinci Resolve, Sony Vegas Pro, FL Studio, Microsoft Office, 3Ds Max, Kompass 3D
</li>
<li>
Database: MySQL, Microsoft Access
</li>
<li>
English knowledge: C1 (Advanced)
</li>
<li>
Very energetic and ready to take new challenges
</li>
<li>
Ready to learn anything new
</li>
<li>
Excellent communication and presentation skills
</li>
</ul>
<h4>Work Experience:</h4>
<p>
C# Software Developer<br />
Technologies of Informational and Educational Systems Research Facility, <a title="Saint Petersburg State University of Telecommunications">SPbSUT</a>, St. Petersburg, Russia<br />
September 2019 Present
</p>
<ul>
<li>
Developing a <a asp-controller="Projects" asp-action="Index">cross-platform application</a> for University's students and professors
</li>
<li>
Supporting and maintaining existing .NET solutions
</li>
<li>
Providing UI and processing solutions for internal research projects
</li>
<li>
Consulting in Software development projects
</li>
</ul>
<p>
C# Software Developer<br />
Self-Employed, Lipetsk, Russia<br />
2015 - September 2019
</p>
<ul>
<li>
Developing a <a asp-controller="Projects" asp-action="Index">YouTube client</a> application for Universal Windows Platform
</li>
<li>
Comming out as a head of research group which was developing a <a asp-controller="Projects" asp-action="Index">Computer Vision based software</a>
</li>
<li>
Doing small freelance tasks for Unity projects
</li>
</ul>
<p>
Phone salesman<br />
DOM.RU, Lipetsk, Russia<br />
2014 - 2015
</p>
<ul>
<li>
Promoting and selling company's infocommunication services to end-users
</li>
</ul>
<h4>Education:</h4>
<ul>
<li>
<p>
Bachelor's Degree in Computer Science (11.03.02 Infocommunication Systems)<br>
State University of Telecommunications, Saint Petersburg, Russia<br>
2019 (Present) 2023
</p>
</li>
<li>
<p>
High School 3.5/4.0 GPA<br />
Lyceum №66, Lipetsk, Russia<br />
2017-2019
</p>
</li>
<li>
<p>
Secondary specialized education in Fortepiano<br />
Regional College of Arts, Lipetsk, Russia<br />
2007-2015
</p>
</li>
</ul>
<!--<hr>
<h4>Reference:</h4>
<p>On request.</p>-->
</article>
+14
View File
@@ -0,0 +1,14 @@
@{
ViewData["Title"] = "Curriculum vitae";
}
<header>
<h1>My resume</h1>
<a class="comment" asp-action="Download">// Download CV (.pdf) &#xE118;</a><br />
<a class="comment" asp-action="PrintCV" target="_blank">// Print CV &#xE749;</a>
</header>
<partial name="~/Views/CV/CVContent.cshtml" />
<partial name="~/Views/Shared/ContactsBlock.cshtml" />
+33
View File
@@ -0,0 +1,33 @@
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>CV print preview page - XFox111.NET</title>
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<link rel="stylesheet" type="text/css" href="~/css/Style.css" />
<style type="text/css">
body { margin: 0px; }
</style>
<meta name="viewport" content="width=device-width" />
</head>
<body>
<partial name="~/Views/CV/CVContent.cshtml" />
@if (!(bool)ViewData["pdfPreview"])
{
<style type="text/css">
article {
margin: 0px;
}
</style>
<script type="text/javascript">
print();
close();
</script>
}
</body>
</html>
+24
View File
@@ -0,0 +1,24 @@
@{
ViewData["Title"] = "Contact info";
}
<header>
<h1>Contact information</h1>
</header>
<article>
<p>
@foreach(Link link in ViewData["contactLinks"] as List<Link>)
{
<a class="socicon-@(link.Socicon)"></a> @(link.Title) <a href="@(link.Url)" target="_blank">@(link.Username)</a><br />
}
</p>
<p>
@foreach (Link link in ViewData["otherLinks"] as List<Link>)
{
<a class="socicon-@(link.Socicon)"></a> @(link.Title) <a href="@(link.Url)" target="_blank">@(link.Username)</a><br />
}
</p>
</article>
@@ -0,0 +1,26 @@
@{
ViewData["Title"] = Model.Title;
Image image = Model;
}
<header>
<p>&#xE760; <a asp-action="Index" asp-controller="Gallery">Back to gallery</a></p>
</header>
<article class="image-overview-block">
<img src="~/images/Gallery/@image.FileName" onclick="ToggleImageSize();" id="image" />
<div>
<h1>@image.Title</h1>
<span>Creation date: @image.CreationDate.ToShortDateString()</span>
<p>
@foreach(string line in image.Description.Split("\n"))
{
@line<br />
}
</p>
</div>
</article>
<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
+17
View File
@@ -0,0 +1,17 @@
@{
ViewData["Title"] = "My artworks";
}
<header>
<h1>My arts</h1>
</header>
<article class="info-block gallery">
@foreach (Image image in Model)
{
<a asp-action="Details" asp-route-id="@image.FileName"><img title="@image.Title" src="~/images/Gallery/@image.FileName"/></a>
}
</article>
<link rel="stylesheet" type="text/css" href="~/css/Gallery.css" />
+37
View File
@@ -0,0 +1,37 @@
@{
ViewData["Title"] = "My projects";
}
<header>
<div>
<h1>My projects</h1>
<h3>Here is presented the most of projects I worked on</h3>
</div>
<iframe src="//githubbadge.appspot.com/xfox111" class="github-stats" frameborder="0"></iframe>
</header>
<article>
@foreach (Project p in ViewData["Projects"] as Project[])
{
<div class="project-item">
<div>
<h1>@p.Title</h1>
<p class="description">
@foreach(string line in p.Description.Split("\n"))
{
@line<br />
}
</p>
<a href="@(p.Link)" target="_blank">@p.LinkCaption</a>
</div>
<div>
@foreach (string i in p.Badges)
{
<div class="badge @i" title="@((ViewData["Badges"] as dynamic)[i])"></div>
}
</div>
</div>
}
</article>
<link rel="stylesheet" type="text/css" href="~/css/Projects.css" />
@@ -0,0 +1,29 @@
@using Newtonsoft.Json
@using System.Net
@{
Dictionary<string, Link> links = JsonConvert.DeserializeObject<Dictionary<string, Link>>(new WebClient().DownloadString($"{Context.Request.Scheme}://{Context.Request.Host}/Links.json"));
}
<div class="contact-me">
<code>
<var>if</var> (<var class="class">You</var>.InsterestedInMe)<br />
<span class="t1"></span><var class="method">ContactMe</var>();<br />
<br />
<a class="comment">// All links are clickable</a><br />
<var>public void</var> <var class="method">ConatactMe</var>()<br />
{<br />
<span class="t1"></span><var>string</var> email = <a class="string" href="mailto:michael.xfox@outlook.com">"mihcael.xfox@outlook.com"</a>;<br />
<span class="t1"></span><var class="class">Link</var>[] socialNetworks = <var>new</var> <var class="class">Link</var>[]<br />
<span class="t1"></span>{<br />
<span class="t2"></span><var>new</var> <var class="class">Link</var>(<a class="string">"LinkedIn"</a>, <a class="string" target="_blank" href="@(links["linkedin"].Url)">"https:@(links["linkedin"].Url)"</a>),<br />
<span class="t2"></span><var>new</var> <var class="class">Link</var>(<a class="string">"GitHub"</a>, <a class="string" target="_blank" href="@(links["github"].Url)">"https:@(links["github"].Url)"</a>),<br />
<span class="t2"></span><var>new</var> <var class="class">Link</var>(<a class="string">"Twitter"</a>, <a class="string" target="_blank" href="@(links["twitter"].Url)">"https:@(links["twitter"].Url)"</a>),<br />
<span class="t2"></span><var>new</var> <var class="class">Link</var>(<a class="string">"Vkontakte"</a>, <a class="string" target="_blank" href="@(links["vk"].Url)">"https:@(links["vk"].Url)"</a>)<br />
<span class="t1"></span>}<br />
}<br />
<br />
<a class="comment">// Copyright &copy;@(DateTime.Today.Year) Michael "XFox" Gordeev</a>
</code>
<link rel="stylesheet" type="text/css" href="~/css/ContactsBlock.css" />
</div>
+27
View File
@@ -0,0 +1,27 @@
@model ErrorViewModel
@{
ViewData["Title"] = "Error";
}
<header>
<h1>Error.</h1>
<h2>An error occurred while processing your request.</h2>
</header>
<article class="info-block">
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>Development environment should not be enabled in deployed applications</strong>, 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 <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
</p>
</article>
+27
View File
@@ -0,0 +1,27 @@
@{
ViewData["Title"] = "Hello, World!";
}
<article>
<div class="block intro">
<div class="content">
<p style="font-family: 'Press Start 2P'">Hello, World!</p>
<p>My name is Michael<br/>
I'm a C# developer<br />
and this is my website.</p>
</div>
<img class="background" src="~/images/cvbg.png"/>
</div>
<div class="block sut">
<div class="content">
<p>Now I'm studying at The Bonch-Bruevich Saint-Petersburg State University of Telecommunications on Infocommunication Systems bachelor's degree</p>
</div>
<img class="background" src="~/images/sut.jpg"/>
</div>
</article>
<link rel="stylesheet" type="text/css" href="~/css/AboutMe.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap&subset=cyrillic">
<partial name="~/Views/Shared/ContactsBlock.cshtml"/>
+63
View File
@@ -0,0 +1,63 @@
@using Newtonsoft.Json
@using System.Net
@{
Dictionary<string, Link> links = JsonConvert.DeserializeObject<Dictionary<string, Link>>(new WebClient().DownloadString($"{Context.Request.Scheme}://{Context.Request.Host}/Links.json"));
}
<!DOCTYPE html>
<html>
<head>
<title>@ViewData["Title"] - XFox111.NET</title>
<link rel="shortcut icon" href="~/images/favicon.png" type="image/png" />
<link rel="stylesheet" type="text/css" href="~/css/style.css" />
<link rel="stylesheet" href="https://d1azc1qln24ryf.cloudfront.net/114779/Socicon/style-cf.css?9ukd8d">
<script src="~/js/site.js" type="text/javascript"></script>
<meta name="author" content="Michael 'XFox' Gordeev" />
<meta name="description" content="Hi, my name is Michael. I'm C# Developer and this is my personal website. Here you can find info about me, my projects and more. Check it out!" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="XFox111.NET" />
<meta property="og:url" content="//XFox111.NET/" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="~/images/me.png" />
<meta property="og:description" content="Hi, my name is Michael. I'm C# Developer and this is my personal website. Here you can find info about me, my projects and more. Check it out!" />
<meta property="og:title" content="Michael 'XFox' Gordeev - Personal website" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<nav class="navbar">
<a asp-controller="Home" asp-action="Index">XFox111.NET</a>
<menu type="toolbar" class="main-menu" style="display:none">
<li><a asp-controller="About" asp-action="Index">AboutMe();</a></li>
<li><a asp-controller="CV" asp-action="Index">CV();</a></li>
<li><a asp-controller="Projects" asp-action="Index">Projects();</a></li>
<li><a asp-controller="Gallery" asp-action="Index">Arts();</a></li>
<li><a asp-controller="Contacts" asp-action="Index">Contacts();</a></li>
</menu>
<a class="language-switch" asp-controller="Home" asp-action="SwitchLanguage" lang="ru">РУС &#xE12B;</a>
<a class="menu-toggle" onclick="ToggleMenu();">&#xE700;</a>
</nav>
<main>
@RenderBody()
</main>
<footer>
<span class="comment">// Copyright &copy;@(DateTime.Today.Year) <b>Michael "XFox" Gordeev</b></span>
@{
foreach (Link link in new List<Link> { links["email"], links["linkedin"], links["github"] })
{
<a class="socicon-@(link.Socicon)" href="@(link.Url)" target="_blank" title="@(link.Title)"></a>
}
}
</footer>
</body>
</html>
+3
View File
@@ -0,0 +1,3 @@
@using MyWebsite
@using MyWebsite.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+3
View File
@@ -0,0 +1,3 @@
@{
Layout = "_Layout";
}
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}
+37
View File
@@ -0,0 +1,37 @@
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;
}
+62
View File
@@ -0,0 +1,62 @@
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;
}
}
@@ -0,0 +1,37 @@
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; }
+35
View File
@@ -0,0 +1,35 @@
.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;
}
}
+51
View File
@@ -0,0 +1,51 @@
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;
}
}
+122
View File
@@ -0,0 +1,122 @@
@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;
}
}