Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Riokei committed Apr 26, 2023
1 parent e337899 commit 2740eb6
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang=en-us class=h-100><head><title>404 Page not found</title><meta charset=utf-8><meta name=description content="Chris W.'s web developer portfolio."><meta name=dc.relation content="http://riokei.github.io"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><script src=https://kit.fontawesome.com/cda496ef33.js crossorigin=anonymous></script>
<link rel=stylesheet type=text/css href=/bootstrap/css/bootstrap.css><link rel=stylesheet type=text/css href=/css/style.css><link rel=stylesheet href=https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css><link rel=icon href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⌨️</text></svg>"></head><body class="d-flex flex-column h-100"><header><nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"><div class=container-fluid><a class=navbar-brand href=http://riokei.github.io>Chris W.</a>
<link rel=stylesheet type=text/css href=/bootstrap/css/bootstrap.css><link rel=stylesheet type=text/css href=/css/style.css><link rel=stylesheet href=https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css><link rel=icon href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⌨️</text></svg>"></head><body class="d-flex flex-column h-100"><header><nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"><div class=container-fluid><a class="navbar-brand fs-3" href=http://riokei.github.io>Chris W.</a>
<button class=navbar-toggler type=button data-bs-toggle=collapse data-bs-target=#navbarCollapse aria-controls=navbarCollapse aria-expanded=false aria-label="Toggle navigation">
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarCollapse><ul class="navbar-nav me-auto mb-2 mb-md-0"><li class=nav-item><a class=nav-link href=http://riokei.github.io>Home</a></li><li class=nav-item><a class=nav-link aria-current=page href=/blog/ title="blog section">Blog</a></li></ul></ul></div></div></nav></header><div id=content class=container-fluid><main id=main><div><h1 id=title><a href=/>Go Home</a></h1><h2>404</h2><p class=lead>Page not found.</p></div></main></div><footer class="footer mt-auto py-3 bg-dark"><div class="container text-center"><div class="row gy-2"><div class="col text-white d-flex align-items-center justify-content-center"><div class=row><div class="col social"><a href=https://github.com/Riokei target=_blank alt="Link to Github Profile"><i class="fab fa-github text-white fa-2x"></i></a></div><div class="col social"><a href=https://mastodon.social/@riokei target=_blank alt="Link to Github Profile"><i class="fa-brands fa-mastodon text-white fa-2x"></i></a></div></div></div></div><div class=row><div class=col-12><p class=text-muted>© 2022, generated via Hugo, designed by <a href=https://github.com/Riokei>Chris W.</a><br>Image by <a href=https://unsplash.com/photos/nPhl2x4fk2s>@clark_fransa</a>.</p></div></div></footer><script src=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js integrity=sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p crossorigin=anonymous></script></body></html>
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarCollapse><ul class="navbar-nav me-auto mb-2 mb-md-0 fs-4"><li class=nav-item><a class=nav-link href=http://riokei.github.io>Home</a></li><li class=nav-item><a class=nav-link aria-current=page href=/blog/ title="blog section">Blog</a></li></ul></ul></div></div></nav></header><div id=content class=container-fluid><main id=main><div><h1 id=title><a href=/>Go Home</a></h1><h2>404</h2><p class=lead>Page not found.</p></div></main></div><footer class="footer mt-auto py-3 bg-dark"><div class="container text-center"><div class="row gy-2"><div class="col text-white d-flex align-items-center justify-content-center"><div class=row><div class="col social"><a href=https://github.com/Riokei target=_blank alt="Link to Github Profile"><i class="fab fa-github text-white fa-2x"></i></a></div><div class="col social"><a href=https://mastodon.social/@riokei target=_blank alt="Link to Github Profile"><i class="fa-brands fa-mastodon text-white fa-2x"></i></a></div></div></div></div><div class=row><div class=col-12><p class=text-muted>© 2022, generated via Hugo, designed by <a href=https://github.com/Riokei>Chris W.</a><br>Image by <a href=https://unsplash.com/photos/nPhl2x4fk2s>@clark_fransa</a>.</p></div></div></footer><script src=https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js integrity=sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p crossorigin=anonymous></script></body></html>
4 changes: 2 additions & 2 deletions blog/email-blaster/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html><html lang=en-us class=h-100><head><title>Devlog: Email Blaster</title><meta charset=utf-8><meta name=description content="Chris W.'s web developer portfolio."><meta name=dc.relation content="http://riokei.github.io"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><script src=https://kit.fontawesome.com/cda496ef33.js crossorigin=anonymous></script>
<link rel=stylesheet type=text/css href=/bootstrap/css/bootstrap.css><link rel=stylesheet type=text/css href=/css/style.css><link rel=stylesheet href=https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css><link rel=icon href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⌨️</text></svg>"></head><body class="d-flex flex-column h-100"><header><nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"><div class=container-fluid><a class=navbar-brand href=http://riokei.github.io>Chris W.</a>
<link rel=stylesheet type=text/css href=/bootstrap/css/bootstrap.css><link rel=stylesheet type=text/css href=/css/style.css><link rel=stylesheet href=https://cdn.jsdelivr.net/gh/devicons/devicon@v2.14.0/devicon.min.css><link rel=icon href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⌨️</text></svg>"></head><body class="d-flex flex-column h-100"><header><nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"><div class=container-fluid><a class="navbar-brand fs-3" href=http://riokei.github.io>Chris W.</a>
<button class=navbar-toggler type=button data-bs-toggle=collapse data-bs-target=#navbarCollapse aria-controls=navbarCollapse aria-expanded=false aria-label="Toggle navigation">
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarCollapse><ul class="navbar-nav me-auto mb-2 mb-md-0"><li class=nav-item><a class=nav-link href=http://riokei.github.io>Home</a></li><li class=nav-item><a class=nav-link aria-current=page href=/blog/ title="blog section">Blog</a></li></ul></ul></div></div></nav></header><div id=content class=container-fluid><section id=main class="pt-5 my-5"><div class=container><article class="card rounded-0 shadow-none"><div class=card-body><div class="d-flex justify-content-between"><h2 id=title class=text-dark>Devlog: Email Blaster</h2><div><a href=http://riokei.github.io/blog class="btn btn-outline-dark">&lt;-- Back to Index</a></div></div><div class="d-flex justify-content-start"><h5 id=date>Wed Apr 26, 2023 | 1221 Words</h5></div><div class=row><div class=col-12><article id="content text-dark"><h1 id=what-is-email-blaster>What is Email Blaster?</h1><p>Email Blaster is a project I wrote as part of the &ldquo;The Complete .NET Coding Bootcamp Course&rdquo; from Coder Foundry. In this blog post I&rsquo;ll talk about the project I made, tweaks I added to it, and show it off here. The project is written in C# using .NET MVC, PostgreSQL, Microsoft Identity, Entity Framework Core, Mailkit, and MimeKit.</p><p>To start, here is what the homepage of the project looks like:<div class="text-center pb-3"><img src=Screenshot_1.png alt=Homepage decoding=async class=img-fluid></div></p><p>You can see the styled Microsoft Identity login pages on the top right, a logo and nav link on the left, a hero in the center, and a footer at the bottom. This layout is slightly different than the rest of the side due to how the bootstrap container is set up and the custom class for the hero is used.</p><p>Moving on here is the styled default Identity log in:<div class="text-center pb-3"><img src=Screenshot_2.png alt="Log in page" decoding=async class=img-fluid></div></p><p>Upon logging in you&rsquo;ll be taken back to the home page but you&rsquo;ll now see a new navigation up top.<div class="text-center pb-3"><img src=login.png alt="screenshot of logged in navigation showing new pages" decoding=async class=img-fluid></div>As you can see the new things here are Contacts, Categories, and a &ldquo;Hello email@email !&rdquo; and Log out button. I blocked out the email on this but it does show properly in the live application. Now before I show screenshots of the Contacts and Categories pages let me first explain the set up of the models a bit.</p><h2 id=contacts-model>Contacts Model</h2><p>Each user has their own set of Contacts, contacts are defined by an Id, AppUserId, FirstName, LastName, a not mapped FullName, Birthdate, Address1 (line 1), Address 2 (line 2 if needed but only line 1 is required), City, State, ZipCode (using DataType.PostalCode), Email, PhoneNumber, Created, and lastly the image fields ImageData, ImageType, a not mapped IFormFile ImageFile, and lastly some virtuals to reference AppUser and Categories for use with lambda expressions via Entity Framework later.</p><h2 id=categories-model>Categories Model</h2><p>Likewise, each user has their own set of Categories that have an Id, AppUserID, Name, and the two virtuals but this time Categories references Contacts.</p><hr><p>Now on to the Contacts page:<div class="text-center pb-3"><img src=Screenshot_4.png alt="View of the contacts page." decoding=async class=img-fluid></div></p><p>Lets start with the search bar, category filter drop-down, and state filter drop-down. In the course, we created the search bar and category filter by filtering what contacts are returned to the view by either the search or list of categories applied to different contacts. Adding on to this I added a feature to filter by state, since States are in an enum list I created a variable &ldquo;stateResult&rdquo; using:</p><pre tabindex=0><code>var contact = from s in _context.Contacts select s;
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse" id=navbarCollapse><ul class="navbar-nav me-auto mb-2 mb-md-0 fs-4"><li class=nav-item><a class=nav-link href=http://riokei.github.io>Home</a></li><li class=nav-item><a class=nav-link aria-current=page href=/blog/ title="blog section">Blog</a></li></ul></ul></div></div></nav></header><div id=content class=container-fluid><section id=main class="pt-5 my-5"><div class=container><article class="card rounded-0 shadow-none"><div class=card-body><div class="d-flex justify-content-between"><h2 id=title class=text-dark>Devlog: Email Blaster</h2><div><a href=http://riokei.github.io/blog class="btn btn-outline-dark">&lt;-- Back to Index</a></div></div><div class="d-flex justify-content-start"><h5 id=date>Wed Apr 26, 2023 | 1221 Words</h5></div><div class=row><div class=col-12><article id="content text-dark"><h1 id=what-is-email-blaster>What is Email Blaster?</h1><p>Email Blaster is a project I wrote as part of the &ldquo;The Complete .NET Coding Bootcamp Course&rdquo; from Coder Foundry. In this blog post I&rsquo;ll talk about the project I made, tweaks I added to it, and show it off here. The project is written in C# using .NET MVC, PostgreSQL, Microsoft Identity, Entity Framework Core, Mailkit, and MimeKit.</p><p>To start, here is what the homepage of the project looks like:<div class="text-center pb-3"><img src=Screenshot_1.png alt=Homepage decoding=async class=img-fluid></div></p><p>You can see the styled Microsoft Identity login pages on the top right, a logo and nav link on the left, a hero in the center, and a footer at the bottom. This layout is slightly different than the rest of the side due to how the bootstrap container is set up and the custom class for the hero is used.</p><p>Moving on here is the styled default Identity log in:<div class="text-center pb-3"><img src=Screenshot_2.png alt="Log in page" decoding=async class=img-fluid></div></p><p>Upon logging in you&rsquo;ll be taken back to the home page but you&rsquo;ll now see a new navigation up top.<div class="text-center pb-3"><img src=login.png alt="screenshot of logged in navigation showing new pages" decoding=async class=img-fluid></div>As you can see the new things here are Contacts, Categories, and a &ldquo;Hello email@email !&rdquo; and Log out button. I blocked out the email on this but it does show properly in the live application. Now before I show screenshots of the Contacts and Categories pages let me first explain the set up of the models a bit.</p><h2 id=contacts-model>Contacts Model</h2><p>Each user has their own set of Contacts, contacts are defined by an Id, AppUserId, FirstName, LastName, a not mapped FullName, Birthdate, Address1 (line 1), Address 2 (line 2 if needed but only line 1 is required), City, State, ZipCode (using DataType.PostalCode), Email, PhoneNumber, Created, and lastly the image fields ImageData, ImageType, a not mapped IFormFile ImageFile, and lastly some virtuals to reference AppUser and Categories for use with lambda expressions via Entity Framework later.</p><h2 id=categories-model>Categories Model</h2><p>Likewise, each user has their own set of Categories that have an Id, AppUserID, Name, and the two virtuals but this time Categories references Contacts.</p><hr><p>Now on to the Contacts page:<div class="text-center pb-3"><img src=Screenshot_4.png alt="View of the contacts page." decoding=async class=img-fluid></div></p><p>Lets start with the search bar, category filter drop-down, and state filter drop-down. In the course, we created the search bar and category filter by filtering what contacts are returned to the view by either the search or list of categories applied to different contacts. Adding on to this I added a feature to filter by state, since States are in an enum list I created a variable &ldquo;stateResult&rdquo; using:</p><pre tabindex=0><code>var contact = from s in _context.Contacts select s;
var stateResult = from States s in Enum.GetValues(typeof(States)) select new { Id = s.ToString(), Name = s.ToString() };
ViewData[&#34;States&#34;] = new SelectList(stateResult, &#34;Id&#34;, &#34;Name&#34;, state);
</code></pre><p>to put those fields into the view and then as I&rsquo;d already written out the if else statement for filtering by category I added an else if for filtering by state:</p><pre tabindex=0><code>if (appUser != null)
Expand Down
Loading

0 comments on commit 2740eb6

Please sign in to comment.