diff --git a/OliverBooth/Controllers/ContactController.cs b/OliverBooth/Controllers/ContactController.cs index 4d50ec7..415f7dd 100644 --- a/OliverBooth/Controllers/ContactController.cs +++ b/OliverBooth/Controllers/ContactController.cs @@ -31,35 +31,8 @@ public class ContactController : Controller return RedirectToPage("/Contact/Index"); } - [HttpPost("privacy-policy")] - public async Task HandlePrivacyPolicy() - { - if (!Request.HasFormContentType) - { - return RedirectToPage("/Contact/Privacy"); - } - - IFormCollection form = Request.Form; - StringValues name = form["name"]; - StringValues email = form["email"]; - StringValues subject = form["subject"]; - StringValues message = form["message"]; - StringValues privacyPolicy = form["privacy-policy"]; - - await using SmtpSender sender = CreateSender(); - await sender.WriteEmail - .To("Oliver Booth", _destination.GetValue("PrivacyPolicy")) - .From(name, email) - .Subject($"[{privacyPolicy}] {subject}") - .BodyHtml(message) - .SendAsync(); - - TempData["Success"] = true; - return RedirectToPage("/Contact/Result"); - } - [HttpPost("other")] - public async Task HandleMiscellaneous() + public async Task HandleForm() { if (!Request.HasFormContentType) { @@ -74,10 +47,10 @@ public class ContactController : Controller await using SmtpSender sender = CreateSender(); await sender.WriteEmail - .To("Oliver Booth", _destination.GetValue("Other")) + .To("Oliver Booth", _destination.Get()) .From(name, email) - .Subject(subject) - .BodyHtml(message) + .Subject($"[Contact via Website] {subject}") + .BodyText(message) .SendAsync(); TempData["Success"] = true; diff --git a/OliverBooth/Pages/Contact/Index.cshtml b/OliverBooth/Pages/Contact/Index.cshtml index a97b331..02706e1 100644 --- a/OliverBooth/Pages/Contact/Index.cshtml +++ b/OliverBooth/Pages/Contact/Index.cshtml @@ -4,13 +4,34 @@ }

Contact

-

What would you like to talk about?

- \ No newline at end of file +

+ Thanks for getting in touch! While I do my best to read to all inquiries, I cannot guarantee that I will be able to + respond to your message. Nevertheless, I appreciate you taking the time to reach out to me and I will respond if I + can. +

+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
\ No newline at end of file diff --git a/OliverBooth/Pages/Contact/JobOpportunity.cshtml b/OliverBooth/Pages/Contact/JobOpportunity.cshtml deleted file mode 100644 index 34fd6f5..0000000 --- a/OliverBooth/Pages/Contact/JobOpportunity.cshtml +++ /dev/null @@ -1,56 +0,0 @@ -@page "/contact/job-opportunity" -@{ - ViewData["Title"] = "Contact"; -} - - - -

- I am always open to hearing about future opportunities. If you have a position you think I could be a good fit for, - please feel free to contact me using the form below. At this time, I am only open to positions based in South East - Wales or that are 100% remote. -

-

I look forward to hearing from you!

- -
- - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
\ No newline at end of file diff --git a/OliverBooth/Pages/Contact/OpenSource.cshtml b/OliverBooth/Pages/Contact/OpenSource.cshtml deleted file mode 100644 index 3b02868..0000000 --- a/OliverBooth/Pages/Contact/OpenSource.cshtml +++ /dev/null @@ -1,35 +0,0 @@ -@page "/contact/open-source" -@{ - ViewData["Title"] = "Contact"; -} - - - -

- Thank you for taking the time to consider contributing to one of my open source projects. I appreciate any and all - contributions that I receive. You do not need to contact me to do so, just submit a pull request on GitHub and I - will review it as soon as I can! -

-

- Below is a non-exhaustive list of the repositories that are currently active. This list is subject - to change at any time, but may not be up-to-date. For a better gauge of what I am currently working on, please - visit my GitHub profile. If you would like to contribute to a project - that is not in active development, I would recommend that you fork the repository and continue development on your - own as unfortunately I have no timeline as to when I will start such projects back up again. -

- \ No newline at end of file diff --git a/OliverBooth/Pages/Contact/Other.cshtml b/OliverBooth/Pages/Contact/Other.cshtml deleted file mode 100644 index ad08cc7..0000000 --- a/OliverBooth/Pages/Contact/Other.cshtml +++ /dev/null @@ -1,45 +0,0 @@ -@page -@{ - ViewData["Title"] = "Contact"; -} - - - -

- Thanks for getting in touch! While I do my best to read to all inquiries, I cannot guarantee that I will be able to - respond to your message. Nevertheless, I appreciate you taking the time to reach out to me and I will respond if I - can. -

- -
- - -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
\ No newline at end of file diff --git a/OliverBooth/Pages/Contact/Privacy.cshtml b/OliverBooth/Pages/Contact/Privacy.cshtml deleted file mode 100644 index 3db3d31..0000000 --- a/OliverBooth/Pages/Contact/Privacy.cshtml +++ /dev/null @@ -1,54 +0,0 @@ -@page "/contact/privacy/{which?}" -@model OliverBooth.Pages.Contact.Privacy -@{ - ViewData["Title"] = "Contact"; -} - - - -

- Thank you for getting in touch. I take your privacy very seriously and will do my best to address any concerns you may have. - Please outline your concerns in the form below, and I will get back to you as soon as possible. -

- -
- - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
diff --git a/OliverBooth/Pages/Contact/Privacy.cshtml.cs b/OliverBooth/Pages/Contact/Privacy.cshtml.cs deleted file mode 100644 index 9327497..0000000 --- a/OliverBooth/Pages/Contact/Privacy.cshtml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore.Mvc.RazorPages; - -namespace OliverBooth.Pages.Contact; - -public class Privacy : PageModel -{ - public string Which { get; private set; } = "website"; - - public void OnGet(string? which = "website") - { - Which = which ?? "website"; - } - - public void SubmitForm() - { - } -} diff --git a/OliverBooth/Pages/Contact/ProjectIdea.cshtml b/OliverBooth/Pages/Contact/ProjectIdea.cshtml deleted file mode 100644 index f0d8659..0000000 --- a/OliverBooth/Pages/Contact/ProjectIdea.cshtml +++ /dev/null @@ -1,70 +0,0 @@ -@page "/contact/project-idea" -@{ - ViewData["Title"] = "Contact"; -} - - - -

- If you have any ideas for a project that you'd like to see me work on, please feel free to contact me using the - form below. I'm always looking for something new to work on, and I'm open to suggestions! -

-
-

- Please note that by submitting an idea through the form on this page, you acknowledge and agree that any - intellectual property rights associated with the idea, including but not limited to copyright, patent, or any - other proprietary rights, shall be immediately and irrevocably transferred to me. You understand that this - transfer of intellectual property rights grants me the unrestricted and exclusive right to use, modify, - reproduce, distribute, disclose, or otherwise exploit the idea for any purpose, without the obligation to - provide credit or compensation to you. This includes the right to file for intellectual property protection or - pursue commercial opportunities derived from the idea. By submitting the idea, you further confirm that it is - your original work and does not infringe upon the rights of any third party. -

-

- - If this is not something you want, and you'd like to collaborate, please - do not use this form, instead, please use - this one. - -

-
- -
- - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
\ No newline at end of file diff --git a/OliverBooth/Pages/Contact/TechnicalHelp.cshtml b/OliverBooth/Pages/Contact/TechnicalHelp.cshtml deleted file mode 100644 index 1310e7a..0000000 --- a/OliverBooth/Pages/Contact/TechnicalHelp.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@page "/contact/technical-help" -@{ - ViewData["Title"] = "Contact"; -} - - - -

- I'm sorry, but do I not offer help or advice regarding development of any kind outside of my website, and Discord - servers of which I'm a member. I'm most active in the Brackeys Community - Discord server, where I'm an Admin, but this does not give you permission to demand help from me on your schedule. - If you have a question, please ask in the appropriate channel in that server. If you ping or DM me, I will ignore - you. -

-

- I do not offer services to build or repair desktops, laptops, mobiles, or tablets, outside of my family and close - friends. -

\ No newline at end of file