From f02c8fc25ee1448e27ae448c52f83e1d6ef4d3dc Mon Sep 17 00:00:00 2001 From: Victor Frye Date: Thu, 1 Feb 2024 09:03:35 -0500 Subject: [PATCH] chore: major overhaul w/seo stuff and managed build --- .editorconfig | 55 +++++++++---------- .gitattributes | 5 ++ .github/dependabot.yml | 24 ++++++++ .github/workflows/azure-swa.yml | 47 ++++++++++++---- README.md | 33 ++++++++++- src/Client/App.razor | 3 +- src/Client/Client.csproj | 6 +- src/Client/Components/Content/About.razor | 8 +-- src/Client/Components/Content/Connect.razor | 43 ++++++++++----- .../Components/Content/SocialButtons.razor | 16 ++++++ ...nect.razor.css => SocialButtons.razor.css} | 6 +- .../Components/Layouts/FooterLayout.razor | 3 + .../HeaderLayout.razor} | 6 +- .../{Layout => Layouts}/MainLayout.razor | 6 +- src/Client/Components/Pages/Home.razor | 1 - src/Client/Models/Social.cs | 8 +++ src/Client/_Imports.razor | 6 +- src/Client/wwwroot/images/envelope.svg | 7 +-- src/Client/wwwroot/images/github.svg | 2 +- src/Client/wwwroot/images/linkedin.svg | 2 +- src/Client/wwwroot/images/threads.svg | 2 +- src/Client/wwwroot/index.html | 12 +++- .../{ => wwwroot}/staticwebapp.config.json | 0 src/Client/wwwroot/styles/app.css | 10 +++- 24 files changed, 221 insertions(+), 90 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 src/Client/Components/Content/SocialButtons.razor rename src/Client/Components/Content/{Connect.razor.css => SocialButtons.razor.css} (96%) create mode 100644 src/Client/Components/Layouts/FooterLayout.razor rename src/Client/Components/{Content/Banner.razor => Layouts/HeaderLayout.razor} (74%) rename src/Client/Components/{Layout => Layouts}/MainLayout.razor (70%) create mode 100644 src/Client/Models/Social.cs rename src/Client/{ => wwwroot}/staticwebapp.config.json (100%) diff --git a/.editorconfig b/.editorconfig index b32068d..fb57614 100644 --- a/.editorconfig +++ b/.editorconfig @@ -257,31 +257,31 @@ dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase dotnet_naming_symbols.interfaces.applicable_kinds = interface dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.interfaces.required_modifiers = +dotnet_naming_symbols.interfaces.required_modifiers = dotnet_naming_symbols.enums.applicable_kinds = enum dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.enums.required_modifiers = +dotnet_naming_symbols.enums.required_modifiers = dotnet_naming_symbols.events.applicable_kinds = event dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.events.required_modifiers = +dotnet_naming_symbols.events.required_modifiers = dotnet_naming_symbols.methods.applicable_kinds = method dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.methods.required_modifiers = +dotnet_naming_symbols.methods.required_modifiers = dotnet_naming_symbols.properties.applicable_kinds = property dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.properties.required_modifiers = +dotnet_naming_symbols.properties.required_modifiers = dotnet_naming_symbols.public_fields.applicable_kinds = field dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal -dotnet_naming_symbols.public_fields.required_modifiers = +dotnet_naming_symbols.public_fields.required_modifiers = dotnet_naming_symbols.private_fields.applicable_kinds = field dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected -dotnet_naming_symbols.private_fields.required_modifiers = +dotnet_naming_symbols.private_fields.required_modifiers = dotnet_naming_symbols.private_static_fields.applicable_kinds = field dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected @@ -289,15 +289,15 @@ dotnet_naming_symbols.private_static_fields.required_modifiers = static dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.types_and_namespaces.required_modifiers = +dotnet_naming_symbols.types_and_namespaces.required_modifiers = dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected -dotnet_naming_symbols.non_field_members.required_modifiers = +dotnet_naming_symbols.non_field_members.required_modifiers = dotnet_naming_symbols.type_parameters.applicable_kinds = namespace dotnet_naming_symbols.type_parameters.applicable_accessibilities = * -dotnet_naming_symbols.type_parameters.required_modifiers = +dotnet_naming_symbols.type_parameters.required_modifiers = dotnet_naming_symbols.private_constant_fields.applicable_kinds = field dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected @@ -305,7 +305,7 @@ dotnet_naming_symbols.private_constant_fields.required_modifiers = const dotnet_naming_symbols.local_variables.applicable_kinds = local dotnet_naming_symbols.local_variables.applicable_accessibilities = local -dotnet_naming_symbols.local_variables.required_modifiers = +dotnet_naming_symbols.local_variables.required_modifiers = dotnet_naming_symbols.local_constants.applicable_kinds = local dotnet_naming_symbols.local_constants.applicable_accessibilities = local @@ -313,7 +313,7 @@ dotnet_naming_symbols.local_constants.required_modifiers = const dotnet_naming_symbols.parameters.applicable_kinds = parameter dotnet_naming_symbols.parameters.applicable_accessibilities = * -dotnet_naming_symbols.parameters.required_modifiers = +dotnet_naming_symbols.parameters.required_modifiers = dotnet_naming_symbols.public_constant_fields.applicable_kinds = field dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal @@ -329,37 +329,36 @@ dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readon dotnet_naming_symbols.local_functions.applicable_kinds = local_function dotnet_naming_symbols.local_functions.applicable_accessibilities = * -dotnet_naming_symbols.local_functions.required_modifiers = +dotnet_naming_symbols.local_functions.required_modifiers = # Naming styles -dotnet_naming_style.pascalcase.required_prefix = -dotnet_naming_style.pascalcase.required_suffix = -dotnet_naming_style.pascalcase.word_separator = +dotnet_naming_style.pascalcase.required_prefix = +dotnet_naming_style.pascalcase.required_suffix = +dotnet_naming_style.pascalcase.word_separator = dotnet_naming_style.pascalcase.capitalization = pascal_case dotnet_naming_style.ipascalcase.required_prefix = I -dotnet_naming_style.ipascalcase.required_suffix = -dotnet_naming_style.ipascalcase.word_separator = +dotnet_naming_style.ipascalcase.required_suffix = +dotnet_naming_style.ipascalcase.word_separator = dotnet_naming_style.ipascalcase.capitalization = pascal_case dotnet_naming_style.tpascalcase.required_prefix = T -dotnet_naming_style.tpascalcase.required_suffix = -dotnet_naming_style.tpascalcase.word_separator = +dotnet_naming_style.tpascalcase.required_suffix = +dotnet_naming_style.tpascalcase.word_separator = dotnet_naming_style.tpascalcase.capitalization = pascal_case dotnet_naming_style._camelcase.required_prefix = _ -dotnet_naming_style._camelcase.required_suffix = -dotnet_naming_style._camelcase.word_separator = +dotnet_naming_style._camelcase.required_suffix = +dotnet_naming_style._camelcase.word_separator = dotnet_naming_style._camelcase.capitalization = camel_case -dotnet_naming_style.camelcase.required_prefix = -dotnet_naming_style.camelcase.required_suffix = -dotnet_naming_style.camelcase.word_separator = +dotnet_naming_style.camelcase.required_prefix = +dotnet_naming_style.camelcase.required_suffix = +dotnet_naming_style.camelcase.word_separator = dotnet_naming_style.camelcase.capitalization = camel_case dotnet_naming_style.s_camelcase.required_prefix = s_ -dotnet_naming_style.s_camelcase.required_suffix = -dotnet_naming_style.s_camelcase.word_separator = +dotnet_naming_style.s_camelcase.required_suffix = +dotnet_naming_style.s_camelcase.word_separator = dotnet_naming_style.s_camelcase.capitalization = camel_case - diff --git a/.gitattributes b/.gitattributes index 7132f87..be25bc7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -84,8 +84,13 @@ # CSharp *.cs text diff=csharp +*.cs text eol=crlf *.cshtml text diff=html +*.cshtml text eol=crlf *.csx text diff=csharp +*.csx text eol=crlf +*.razor text diff=html +*.razor text eol=crlf *.sln text eol=crlf *.csproj text eol=crlf diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..0692ab3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Maintain dependencies for Nuget + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "weekly" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + # Maintain dependencies for Dev Containers + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/azure-swa.yml b/.github/workflows/azure-swa.yml index 7f380bc..ac11ae4 100644 --- a/.github/workflows/azure-swa.yml +++ b/.github/workflows/azure-swa.yml @@ -2,41 +2,64 @@ name: Azure Static Web Apps CI/CD on: push: - branches: - - main + branches: ["main"] pull_request: types: [opened, synchronize, reopened, closed] - branches: - - main + branches: ["main"] + +env: + DOTNET_VERSION: '8.x' + APP_PROJECT_FILE: 'src/Client/Client.csproj' + APP_OUTPUT_LOCATION: 'artifacts/client' jobs: build_and_deploy_job: if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') runs-on: ubuntu-latest name: Build and Deploy Job + environment: ${{ github.event_name == 'push' && 'Production' || 'Staging' }} steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: submodules: true lfs: false - - name: Build And Deploy - id: builddeploy + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Install WASM build tools + run: dotnet workload install wasm-tools + - name: Restore dependencies + run: dotnet restore + - name: Verify formatting + run: dotnet format --verify-no-changes --no-restore + - name: Build solution + run: dotnet build -c Release --no-restore + - name: Publish app project + run: dotnet publish ${{ env.APP_PROJECT_FILE }} -c Release -o ${{ env.APP_OUTPUT_LOCATION }} --no-restore --no-build + - name: Deploy static web app + id: deploy uses: Azure/static-web-apps-deploy@v1 + env: + SKIP_DEPLOY_ON_MISSING_SECRETS: ${{ github.event_name == 'pull_request' }} with: azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "src/Client" - output_location: "wwwroot" + action: 'upload' + app_location: '${{ env.APP_OUTPUT_LOCATION }}/wwwroot' + skip_app_build: true + skip_api_build: true close_pull_request_job: if: github.event_name == 'pull_request' && github.event.action == 'closed' runs-on: ubuntu-latest name: Close Pull Request Job steps: - - name: Close Pull Request + - name: Close pull request id: closepullrequest uses: Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }} - action: "close" + action: 'close' + app_location: '' diff --git a/README.md b/README.md index 17fed22..d29257b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ -# DotCom +
+ profile of Victor Frye +

VictorFrye.COM

+

A personal portfolio site for your friendly neighborhood technologist, Victor Frye

+
-🎨 My personal about me website +
+ +[![Azure Static Web Apps CI/CD](https://github.com/victorfrye/dotcom/actions/workflows/azure-swa.yml/badge.svg)](https://github.com/victorfrye/dotcom/actions/workflows/azure-swa.yml) +[![GitHub Issues](https://img.shields.io/github/issues/victorfrye/dotcom)](https://github.com/victorfrye/dotcom/issues) +[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](/LICENSE) + +
+ +## Technology Stack + +

+ + C# + + + .NET + + + Bootstrap + + + Azure + +

+ +VictorFrye.COM is a static web application built utilizing .NET Blazor WASM and Bootstrap. The application is hosted on Azure as a Static Web App. diff --git a/src/Client/App.razor b/src/Client/App.razor index 5212a2b..d414dad 100644 --- a/src/Client/App.razor +++ b/src/Client/App.razor @@ -1,7 +1,6 @@  - Not found @@ -9,4 +8,4 @@

Sorry, there's nothing at this address.

-
\ No newline at end of file + diff --git a/src/Client/Client.csproj b/src/Client/Client.csproj index d2289b7..fe6d314 100644 --- a/src/Client/Client.csproj +++ b/src/Client/Client.csproj @@ -6,7 +6,7 @@ enable VictorFrye.com - 🎨 My personal about me website + 🎨 A personal portfolio site for your friendly neighborhood technologist, Victor Frye VictorFrye https://github.com/victorfrye/dotcom @@ -29,8 +29,8 @@ - - + + diff --git a/src/Client/Components/Content/About.razor b/src/Client/Components/Content/About.razor index 7fb0148..5f884ff 100644 --- a/src/Client/Components/Content/About.razor +++ b/src/Client/Components/Content/About.razor @@ -1,9 +1,9 @@
-
_About
+

_About

- Hello from Grand Rapids! I'm Victor, a software engineer powered by coffee. + Hello from Grand Rapids! I'm Victor, a software engineer powered by coffee. With @GetYearsOfExperience() years of professional experience, I've worked with a variety of technologies and platforms. My current focuses are the .NET ecosystem, Azure cloud services, and DevOps automation.

@@ -14,8 +14,8 @@

I'm currently working as a Senior Software Engineer at Leading EDJE, a software consultancy based in Columbus, Ohio. - In my downtime, I enjoy gaming, reading, and quality time with my - wife and our two dogs. + In my downtime, I enjoy gaming, reading, and quality time with my + wife and our two dogs.

diff --git a/src/Client/Components/Content/Connect.razor b/src/Client/Components/Content/Connect.razor index fdf3f94..318c99c 100644 --- a/src/Client/Components/Content/Connect.razor +++ b/src/Client/Components/Content/Connect.razor @@ -1,20 +1,33 @@
-
_Connect
+

_Connect

- +
+ +@code { + private List _socials = + [ + new( + name: "Threads", + userUrl: "https://threads.net/@thevictorfryeadventure", + iconUrl: "/images/threads.svg" + ), + new( + name: "LinkedIn", + userUrl: "https://linkedin.com/in/victorfrye", + iconUrl: "/images/linkedin.svg" + ), + new( + name: "GitHub", + userUrl: "https://github.com/victorfrye", + iconUrl: "/images/github.svg" + ), + new( + name: "Email", + userUrl: "mailto:victorfrye@outlook.com", + iconUrl: "/images/envelope.svg" + ) + ]; +} diff --git a/src/Client/Components/Content/SocialButtons.razor b/src/Client/Components/Content/SocialButtons.razor new file mode 100644 index 0000000..d81eeff --- /dev/null +++ b/src/Client/Components/Content/SocialButtons.razor @@ -0,0 +1,16 @@ +
+ @foreach (var social in Socials) + { + @ButtonTemplate(social) + } +
+ +@code { + [Parameter] + public IList Socials { get; set; } = []; + + private RenderFragment ButtonTemplate = (social) => + @ + @social.Name + ; +} diff --git a/src/Client/Components/Content/Connect.razor.css b/src/Client/Components/Content/SocialButtons.razor.css similarity index 96% rename from src/Client/Components/Content/Connect.razor.css rename to src/Client/Components/Content/SocialButtons.razor.css index 275fdec..9c26d0b 100644 --- a/src/Client/Components/Content/Connect.razor.css +++ b/src/Client/Components/Content/SocialButtons.razor.css @@ -1,7 +1,3 @@ -.d-socials { - gap: 1rem; -} - .img-social { height: 20px; width: 20px; @@ -47,4 +43,4 @@ .btn-social:hover:nth-child(4) { background: var(--gradient); -} \ No newline at end of file +} diff --git a/src/Client/Components/Layouts/FooterLayout.razor b/src/Client/Components/Layouts/FooterLayout.razor new file mode 100644 index 0000000..8e467af --- /dev/null +++ b/src/Client/Components/Layouts/FooterLayout.razor @@ -0,0 +1,3 @@ +
+ ©2024 Victor Frye +
diff --git a/src/Client/Components/Content/Banner.razor b/src/Client/Components/Layouts/HeaderLayout.razor similarity index 74% rename from src/Client/Components/Content/Banner.razor rename to src/Client/Components/Layouts/HeaderLayout.razor index 8518323..d30a722 100644 --- a/src/Client/Components/Content/Banner.razor +++ b/src/Client/Components/Layouts/HeaderLayout.razor @@ -1,10 +1,10 @@ - + diff --git a/src/Client/Components/Layout/MainLayout.razor b/src/Client/Components/Layouts/MainLayout.razor similarity index 70% rename from src/Client/Components/Layout/MainLayout.razor rename to src/Client/Components/Layouts/MainLayout.razor index 49df540..fcb6596 100644 --- a/src/Client/Components/Layout/MainLayout.razor +++ b/src/Client/Components/Layouts/MainLayout.razor @@ -4,13 +4,13 @@
+ +
@Body
-
- ©2024 Victor Frye -
+
diff --git a/src/Client/Components/Pages/Home.razor b/src/Client/Components/Pages/Home.razor index b39e529..2b70487 100644 --- a/src/Client/Components/Pages/Home.razor +++ b/src/Client/Components/Pages/Home.razor @@ -2,6 +2,5 @@ Victor Frye | Your friendly neighborhood technologist - diff --git a/src/Client/Models/Social.cs b/src/Client/Models/Social.cs new file mode 100644 index 0000000..825406b --- /dev/null +++ b/src/Client/Models/Social.cs @@ -0,0 +1,8 @@ +namespace VictorFrye.DotCom.Client.Models; + +public class Social(string name, string iconUrl, string userUrl) +{ + public string Name { get; init; } = name; + public string IconUrl { get; init; } = iconUrl; + public string UserUrl { get; init; } = userUrl; +} diff --git a/src/Client/_Imports.razor b/src/Client/_Imports.razor index 124ded4..36eaf66 100644 --- a/src/Client/_Imports.razor +++ b/src/Client/_Imports.razor @@ -1,15 +1,15 @@ @using System.Net.Http @using System.Net.Http.Json +@using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web -@using static Microsoft.AspNetCore.Components.Web.RenderMode @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop @using VictorFrye.DotCom.Client -@using VictorFrye.DotCom.Client.Components @using VictorFrye.DotCom.Client.Components.Content -@using VictorFrye.DotCom.Client.Components.Layout +@using VictorFrye.DotCom.Client.Components.Layouts +@using VictorFrye.DotCom.Client.Models diff --git a/src/Client/wwwroot/images/envelope.svg b/src/Client/wwwroot/images/envelope.svg index 0519d28..6361c64 100644 --- a/src/Client/wwwroot/images/envelope.svg +++ b/src/Client/wwwroot/images/envelope.svg @@ -1,5 +1,4 @@ - - + - \ No newline at end of file + d="M22 8.608v8.142a3.25 3.25 0 0 1-3.066 3.245L18.75 20H5.25a3.25 3.25 0 0 1-3.245-3.066L2 16.75V8.608l9.652 5.056a.75.75 0 0 0 .696 0L22 8.608ZM5.25 4h13.5a3.25 3.25 0 0 1 3.234 2.924L12 12.154l-9.984-5.23a3.25 3.25 0 0 1 3.048-2.919L5.25 4h13.5-13.5Z" /> + diff --git a/src/Client/wwwroot/images/github.svg b/src/Client/wwwroot/images/github.svg index 35bc6f5..3f599b4 100644 --- a/src/Client/wwwroot/images/github.svg +++ b/src/Client/wwwroot/images/github.svg @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/src/Client/wwwroot/images/linkedin.svg b/src/Client/wwwroot/images/linkedin.svg index c3982ff..a6c4252 100644 --- a/src/Client/wwwroot/images/linkedin.svg +++ b/src/Client/wwwroot/images/linkedin.svg @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/src/Client/wwwroot/images/threads.svg b/src/Client/wwwroot/images/threads.svg index e768687..69591cd 100644 --- a/src/Client/wwwroot/images/threads.svg +++ b/src/Client/wwwroot/images/threads.svg @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/src/Client/wwwroot/index.html b/src/Client/wwwroot/index.html index d7b78b1..83dc604 100644 --- a/src/Client/wwwroot/index.html +++ b/src/Client/wwwroot/index.html @@ -4,8 +4,17 @@ + + + + + + + + Victor Frye | Your friendly neighborhood technologist + @@ -15,6 +24,7 @@
+

Victor Frye

@@ -30,4 +40,4 @@ - \ No newline at end of file + diff --git a/src/Client/staticwebapp.config.json b/src/Client/wwwroot/staticwebapp.config.json similarity index 100% rename from src/Client/staticwebapp.config.json rename to src/Client/wwwroot/staticwebapp.config.json diff --git a/src/Client/wwwroot/styles/app.css b/src/Client/wwwroot/styles/app.css index c236d7a..0bb2049 100644 --- a/src/Client/wwwroot/styles/app.css +++ b/src/Client/wwwroot/styles/app.css @@ -19,6 +19,14 @@ body { font-family: var(--bs-body-font-family) } +h1 { + font-size: 1.5rem !important; +} + +h2 { + font-size: 1.25rem !important; +} + .text-primary { color: var(--primary) !important; } @@ -168,4 +176,4 @@ a:hover { code { color: #c02d76; -} \ No newline at end of file +}