Env swap #21

Merged
danieljsummers merged 30 commits from env-swap into help-wanted 2021-08-10 03:23:50 +00:00
106 changed files with 130 additions and 5909 deletions
Showing only changes of commit 54aec0ad02 - Show all commits

View File

@ -3,21 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.30717.126 VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JobsJobsJobs.Server", "JobsJobsJobs\Server\JobsJobsJobs.Server.csproj", "{35AEECBF-489D-41C5-9BA3-6E43AD7A8196}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JobsJobsJobs.Client", "JobsJobsJobs\Client\JobsJobsJobs.Client.csproj", "{16771650-F0F4-4B9C-8C63-D9BFFC94F90A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JobsJobsJobs.Shared", "JobsJobsJobs\Shared\JobsJobsJobs.Shared.csproj", "{AE329284-47DA-4E76-B542-47489B271130}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{50B51580-9F09-41E2-BC78-DAD38C37B583}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{50B51580-9F09-41E2-BC78-DAD38C37B583}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.dockerignore = .dockerignore .dockerignore = .dockerignore
..\.gitignore = ..\.gitignore ..\.gitignore = ..\.gitignore
database\12-add-real-name.sql = database\12-add-real-name.sql
database\16-job-listing.sql = database\16-job-listing.sql
JobsJobsJobs\Directory.Build.props = JobsJobsJobs\Directory.Build.props JobsJobsJobs\Directory.Build.props = JobsJobsJobs\Directory.Build.props
Dockerfile = Dockerfile Dockerfile = Dockerfile
database\tables.sql = database\tables.sql
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JobsJobsJobs", "JobsJobsJobs", "{FA833B24-B8F6-4CE6-A044-99257EAC02FF}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "JobsJobsJobs", "JobsJobsJobs", "{FA833B24-B8F6-4CE6-A044-99257EAC02FF}"
@ -34,18 +25,6 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Release|Any CPU.Build.0 = Release|Any CPU
{16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Release|Any CPU.Build.0 = Release|Any CPU
{AE329284-47DA-4E76-B542-47489B271130}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE329284-47DA-4E76-B542-47489B271130}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE329284-47DA-4E76-B542-47489B271130}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE329284-47DA-4E76-B542-47489B271130}.Release|Any CPU.Build.0 = Release|Any CPU
{C81278DA-DA97-4E55-AB39-4B88565B615D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C81278DA-DA97-4E55-AB39-4B88565B615D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C81278DA-DA97-4E55-AB39-4B88565B615D}.Debug|Any CPU.Build.0 = Debug|Any CPU {C81278DA-DA97-4E55-AB39-4B88565B615D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C81278DA-DA97-4E55-AB39-4B88565B615D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C81278DA-DA97-4E55-AB39-4B88565B615D}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@ -1,10 +0,0 @@
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>

View File

@ -1,122 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.JSInterop;
using NodaTime;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client
{
/// <summary>
/// Information about a user
/// </summary>
public record UserInfo(CitizenId Id, string Name);
/// <summary>
/// Client-side application state for Jobs, Jobs, Jobs
/// </summary>
public class AppState
{
/// <summary>
/// The application version, as a nice display string
/// </summary>
public static Lazy<string> Version => new(() =>
{
var version = Assembly.GetExecutingAssembly().GetName().Version!;
var display = $"v{version.Major}.{version.Minor}";
if (version.Build > 0) display += $".{version.Build}";
return display;
});
public event Action OnChange = () => { };
private UserInfo? _user = null;
/// <summary>
/// The information of the currently logged-in user
/// </summary>
public UserInfo? User
{
get => _user;
set
{
_user = value;
NotifyChanged();
}
}
private string _jwt = "";
/// <summary>
/// The JSON Web Token (JWT) for the currently logged-on user
/// </summary>
public string Jwt
{
get => _jwt;
set
{
_jwt = value;
NotifyChanged();
}
}
private IEnumerable<Continent>? _continents = null;
/// <summary>
/// Get a list of continents (only retrieves once per application load)
/// </summary>
/// <param name="http">The HTTP client to use to obtain continents the first time</param>
/// <returns>The list of continents</returns>
/// <exception cref="ApplicationException">If the continents cannot be loaded</exception>
public async Task<IEnumerable<Continent>> GetContinents(HttpClient http)
{
if (_continents == null)
{
ServerApi.SetJwt(http, this);
var continentResult = await ServerApi.RetrieveMany<Continent>(http, "continent/all");
if (continentResult.IsOk)
{
_continents = continentResult.Ok;
}
else
{
throw new ApplicationException($"Could not load continents - {continentResult.Error}");
}
}
return _continents;
}
private DateTimeZone? _tz = null;
/// <summary>
/// Get the time zone for the current user's browser
/// </summary>
/// <param name="js">The JS interop runtime for the application</param>
/// <returns>The time zone based on the user's browser</returns>
public async Task<DateTimeZone> GetTimeZone(IJSRuntime js)
{
if (_tz == null)
{
try
{
_tz = DateTimeZoneProviders.Tzdb.GetZoneOrNull(await js.InvokeAsync<string>("getTimeZone"));
}
catch (Exception) { }
}
if (_tz == null)
{
// Either the zone wasn't found, or the user's browser denied us access to it; there's not much to do
// here but set it to UTC and move on
_tz = DateTimeZoneProviders.Tzdb.GetZoneOrNull("Etc/UTC")!;
}
return _tz;
}
public AppState() { }
private void NotifyChanged() => OnChange.Invoke();
}
}

View File

@ -1,29 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<ItemGroup>
<PackageReference Include="Blazored.Toast" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\JobsJobsJobs.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\audio\" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\audio\pelosi-jobs.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\audio\thats-true.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RazorPage_SelectedScaffolderID>RazorPageScaffolder</RazorPage_SelectedScaffolderID>
<RazorPage_SelectedScaffolderCategoryPath>root/Common/RazorPage</RazorPage_SelectedScaffolderCategoryPath>
<ActiveDebugProfile>JobsJobsJobs</ActiveDebugProfile>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -1,8 +0,0 @@
@page "/citizen/authorized"
@inject HttpClient http
@inject NavigationManager nav
@inject AppState state
<PageTitle Title="Logging on..." />
<p>@Message</p>

View File

@ -1,40 +0,0 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.WebUtilities;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Citizens
{
public partial class Authorized : ComponentBase
{
/// <summary>
/// The message to be displayed on this page
/// </summary>
private string Message { get; set; } = "Logging you on with No Agenda Social...";
protected override async Task OnInitializedAsync()
{
// Exchange authorization code for a JWT
var query = QueryHelpers.ParseQuery(nav.ToAbsoluteUri(nav.Uri).Query);
if (query.TryGetValue("code", out var authCode))
{
var logOnResult = await ServerApi.LogOn(http, authCode);
if (logOnResult.IsOk)
{
var logOn = logOnResult.Ok;
state.User = new UserInfo(logOn.CitizenId, logOn.Name);
state.Jwt = logOn.Jwt;
nav.NavigateTo("/citizen/dashboard");
}
else
{
Message = logOnResult.Error;
}
}
else
{
Message = "Did not receive a token from No Agenda Social (perhaps you clicked \"Cancel\"?)";
}
}
}
}

View File

@ -1,46 +0,0 @@
@page "/citizen/dashboard"
@inject HttpClient http
@inject AppState state
<PageTitle Title="Dashboard" />
<h3>Welcome, @state.User!.Name!</h3>
<Loading OnLoad=@LoadProfile Message=@(new MarkupString("Retrieving your employment profile&hellip;"))>
@if (Profile != null)
{
<p>
Your employment profile was last updated <FullDateTime TheDate=@Profile.LastUpdatedOn />. Your profile currently
lists @Profile.Skills.Count skill@(Profile.Skills.Count != 1 ? "s" : "").
</p>
<p><a href="/profile/view/@state.User.Id">View Your Employment Profile</a></p>
@if (Profile.SeekingEmployment)
{
<p>
Your profile indicates that you are seeking employment. Once you find it,
<a href="/success-story/add">tell your fellow citizens about it!</a>
</p>
}
}
else
{
<p>
You do not have an employment profile established; click &ldquo;Edit Profile&rdquo; in the menu to get
started!
</p>
}
<hr>
<p>
There @(ProfileCount == 1 ? "is" : "are") @(ProfileCount == 0 ? "no" : ProfileCount) employment
profile@(ProfileCount != 1 ? "s" : "") from citizens of Gitmo Nation.
@if (ProfileCount > 0)
{
<text>Take a look around and see if you can help them find work!</text>
}
</p>
</Loading>
<hr>
<p>
To see how this application works, check out &ldquo;How It Works&rdquo; in the sidebar (last updated June
14<sup>th</sup>, 2021).
</p>

View File

@ -1,58 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Citizens
{
/// <summary>
/// The first page a user sees after signing in
/// </summary>
public partial class Dashboard : ComponentBase
{
/// <summary>
/// The user's profile
/// </summary>
private Profile? Profile { get; set; } = null;
/// <summary>
/// The number of profiles
/// </summary>
private int ProfileCount { get; set; }
/// <summary>
/// Load the user's profile information
/// </summary>
/// <param name="errors">A collection to report errors that may be encountered</param>
public async Task LoadProfile(ICollection<string> errors)
{
if (state.User != null)
{
ServerApi.SetJwt(http, state);
var profileTask = ServerApi.RetrieveProfile(http, state);
var profileCountTask = ServerApi.RetrieveOne<Count>(http, "profile/count");
await Task.WhenAll(profileTask, profileCountTask);
if (profileTask.Result.IsOk)
{
Profile = profileTask.Result.Ok;
}
else
{
errors.Add(profileTask.Result.Error);
}
if (profileCountTask.Result.IsOk)
{
ProfileCount = profileCountTask.Result.Ok?.Value ?? 0;
}
else
{
errors.Add(profileCountTask.Result.Error);
}
}
}
}
}

View File

@ -1,132 +0,0 @@
@page "/citizen/profile"
@inject HttpClient http
@inject AppState state
@inject NavigationManager nav
@inject IToastService toast
<PageTitle Title="Edit Profile" />
<h3>Employment Profile</h3>
<Loading OnLoad=@SetUpProfile Message=@(new MarkupString("Loading Your Profile&hellip;"))>
<EditForm Model=@ProfileForm OnValidSubmit=@SaveProfile>
<DataAnnotationsValidator />
<div class="form-row">
<div class="col col-xs-12 col-sm-10 col-md-8 col-lg-6">
<div class="form-group">
<label for="realName" class="jjj-label">Real Name</label>
<InputText id="realName" @bind-Value=@ProfileForm.RealName class="form-control"
placeholder="Leave blank to use your NAS display name" />
<ValidationMessage For=@(() => ProfileForm.RealName) />
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-check">
<InputCheckbox id="seeking" class="form-check-input" @bind-Value=@ProfileForm.IsSeekingEmployment />
<label for="seeking" class="form-check-label">I am currently seeking employment</label>
@if (IsSeeking)
{
<em>&nbsp; &nbsp; If you have found employment, consider
<a href="/success-story/add">telling your fellow citizens about it</a>
</em>
}
</div>
</div>
</div>
<div class="form-row">
<div class="col col-xs-12 col-sm-6 col-md-4">
<div class="form-group">
<label for="continentId" class="jjj-required">Continent</label>
<InputSelect id="continentId" @bind-Value=@ProfileForm.ContinentId class="form-control">
<option>&ndash; Select &ndash;</option>
@foreach (var (id, name) in Continents)
{
<option value="@id">@name</option>
}
</InputSelect>
<ValidationMessage For=@(() => ProfileForm.ContinentId) />
</div>
</div>
<div class="col col-xs-12 col-sm-6 col-md-8">
<div class="form-group">
<label for="region" class="jjj-required">Region</label>
<InputText id="region" @bind-Value=@ProfileForm.Region class="form-control"
placeholder="Country, state, geographic area, etc." />
<ValidationMessage For=@(() => ProfileForm.Region) />
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="bio" class="jjj-required">Professional Biography</label>
<MarkdownEditor Id="bio" @bind-Text=@ProfileForm.Biography />
<ValidationMessage For=@(() => ProfileForm.Biography) />
</div>
</div>
</div>
<div class="form-row">
<div class="col col-xs-12 col-sm-12 offset-md-2 col-md-4">
<div class="form-check">
<InputCheckbox id="isRemote" class="form-check-input" @bind-Value=@ProfileForm.RemoteWork />
<label for="isRemote" class="form-check-label">I am looking for remote work</label>
</div>
</div>
<div class="col col-xs-12 col-sm-12 col-md-4">
<div class="form-check">
<InputCheckbox id="isFull" class="form-check-input" @bind-Value=@ProfileForm.FullTime />
<label for="isFull" class="form-check-label">I am looking for full-time work</label>
</div>
</div>
</div>
<hr>
<h4>
Skills &nbsp;
<button type="button" class="btn btn-outline-primary" @onclick=@AddNewSkill>Add a Skill</button>
</h4>
@foreach (var skill in ProfileForm.Skills)
{
<SkillEdit Skill=@skill OnRemove=@RemoveSkill />
}
<hr>
<h4>Experience</h4>
<p>
This application does not have a place to individually list your chronological job history; however, you can
use this area to list prior jobs, their dates, and anything else you want to include that&rsquo;s not already a
part of your Professional Biography above.
</p>
<div class="form-row">
<div class="col">
<MarkdownEditor Id="experience" @bind-Text=@ProfileForm.Experience />
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-check">
<InputCheckbox id="isPublic" class="form-check-input" @bind-Value=@ProfileForm.IsPublic />
<label for="isPublic" class="form-check-label">
Allow my profile to be searched publicly (outside NA Social)
</label>
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<br>
<button type="submit" class="btn btn-outline-primary">Save</button>
</div>
</div>
</EditForm>
@if (!IsNew)
{
<p>
<br><a href="/profile/view/@state.User!.Id"><span class="oi oi-file"></span> View Your User Profile</a>
</p>
}
<p>
<br>If you want to delete your profile, or your entire account,
<a href="/so-long/options">see your deletion options here</a>.
</p>
</Loading>

View File

@ -1,134 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Citizens
{
/// <summary>
/// Profile edit page (called EditProfile so as not to create naming conflicts)
/// </summary>
public partial class EditProfile : ComponentBase
{
/// <summary>
/// Counter for IDs when "Add a Skill" button is clicked
/// </summary>
private int _newSkillCounter = 0;
/// <summary>
/// Whether the citizen is seeking employment at the time the profile is loaded (used to show success story
/// link)
/// </summary>
private bool IsSeeking { get; set; } = false;
/// <summary>
/// The form for this page
/// </summary>
private ProfileForm ProfileForm { get; set; } = new ProfileForm();
/// <summary>
/// All continents
/// </summary>
private IEnumerable<Continent> Continents { get; set; } = Enumerable.Empty<Continent>();
/// <summary>
/// Whether this is a new profile or not
/// </summary>
private bool IsNew { get; set; } = false;
/// <summary>
/// Set up the data needed to add or edit the user's profile
/// </summary>
/// <param name="errors">The collection where errors can be reported</param>
public async Task SetUpProfile(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var continentTask = state.GetContinents(http);
var profileTask = ServerApi.RetrieveProfile(http, state);
var citizenTask = ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{state.User!.Id}");
await Task.WhenAll(continentTask, profileTask, citizenTask);
Continents = continentTask.Result;
if (profileTask.Result.IsOk)
{
if (profileTask.Result.Ok == null)
{
ProfileForm = new ProfileForm();
IsNew = true;
}
else
{
ProfileForm = ProfileForm.FromProfile(profileTask.Result.Ok);
IsSeeking = profileTask.Result.Ok.SeekingEmployment;
}
if (ProfileForm.Skills.Count == 0) AddNewSkill();
}
else
{
errors.Add(profileTask.Result.Error);
}
if (citizenTask.Result.IsOk)
{
ProfileForm.RealName = citizenTask.Result.Ok!.RealName ?? "";
}
else
{
errors.Add(citizenTask.Result.Error);
}
}
/// <summary>
/// Add a new skill to the form
/// </summary>
private void AddNewSkill() =>
ProfileForm.Skills.Add(new SkillForm { Id = $"new{_newSkillCounter++}" });
/// <summary>
/// Remove the skill for the given ID
/// </summary>
/// <param name="skillId">The ID of the skill to remove</param>
private void RemoveSkill(string skillId) =>
ProfileForm.Skills.Remove(ProfileForm.Skills.First(s => s.Id == skillId));
/// <summary>
/// Save changes to the current profile
/// </summary>
public async Task SaveProfile()
{
// Remove any skills left blank
var blankSkills = ProfileForm.Skills
.Where(s => string.IsNullOrEmpty(s.Description) && string.IsNullOrEmpty(s.Notes))
.ToList();
foreach (var blankSkill in blankSkills) ProfileForm.Skills.Remove(blankSkill);
var res = await http.PostAsJsonAsync("/api/profile/save", ProfileForm);
if (res.IsSuccessStatusCode && state.User != null)
{
var citizen = await ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{state.User.Id}");
if (citizen.IsOk)
{
state.User = state.User with { Name = citizen.Ok!.CitizenName };
toast.ShowSuccess("Profile Saved Successfully");
nav.NavigateTo($"/profile/view/{state.User!.Id}");
}
else
{
toast.ShowError(citizen.Error);
}
}
else
{
var error = await res.Content.ReadAsStringAsync();
if (!string.IsNullOrEmpty(error)) error = $"- {error}";
toast.ShowError($"{(int)res.StatusCode} {error}");
}
}
}
}

View File

@ -1,13 +0,0 @@
@page "/citizen/log-off"
@inject NavigationManager nav
@inject AppState state
@inject IToastService toast
@code {
protected override void OnInitialized()
{
state.Jwt = "";
state.User = null;
toast.ShowSuccess("Have a Nice Day!", "Log Off Successful");
nav.NavigateTo("/");
}
}

View File

@ -1,81 +0,0 @@
@page "/how-it-works"
<PageTitle Title="How It Works" />
<h3>How It Works</h3>
<h4>Completing Your Profile</h4>
<ul>
<li>
The &ldquo;View Your Employment Profile&rdquo; link (which you&rdquo;ll see on this page, once your profile is
established) shows your profile the way all other validated users will be able to see it. While this site does not
perform communication with others over No Agenda Social, the name on employment profiles is a link to that
user&rsquo;s profile; from there, others can communicate further with you using the tools Mastodon provides.
</li>
<li>
The &ldquo;Professional Biography&rdquo; and &ldquo;Experience&rdquo; sections support Markdown, a plain-text way
to specify formatting quite similar to that provided by word processors. The
<a href="https://daringfireball.net/projects/markdown/" target="_blank">original page</a> for the project is a good
overview of its capabilities, and the pages at
<a href="https://www.markdownguide.org/" target="_blank">Markdown Guide</a> give in-depth lessons to make the most
of this language. The version of Markdown employed here supports many popular extensions, include smart quotes
(turning "a quote" into &ldquo;a quote&rdquo;), tables, super/subscripts, and more.
</li>
<li>
Skills are optional, but they are the place to record skills you have. Along with the skill, there is a
&ldquo;Notes&rdquo; section, which can be used to indicate the time you&rsquo;ve practiced a particular skill, the
mastery you have of that skill, etc. It is free-form text, so it is all up to you how you utilize the field.
</li>
<li>
The &ldquo;Experience&rdquo; field is intended to capture a chronological or topical employment history; with this
&ldquo;quick-n-dirty&rdquo; implementation, this Markdown box can be used to capture that information however you
would like it presented to fellow citizens.
</li>
<li>
If you check the &ldquo;Allow my profile to be searched publicly&rdquo; checkbox, <strong>and</strong> you are
seeking employment, your continent, region, and skills fields will be searchable and displayed to public users of
the site. They will not be tied to your No Agenda Social handle or real name; they are there to let people peek
behind the curtain a bit, and hopefully inspire them to join us.
</li>
</ul>
<h4>Searching Profiles</h4>
<p>
The &ldquo;View Profiles&rdquo; link at the side allows you to search for profiles by continent, the citizen&rsquo;s
desire for remote work, a skill, or any text in their professional biography and experience. If you find someone with
whom you&rsquo;d like to discuss potential opportunities, the name at the top of the profile links to their No Agenda
Social account, where you can use its features to get in touch.
</p>
<h4>Finding Employment</h4>
<p>
If your profile indicates that you are seeking employment, and you secure employment, that is something you will
want to update (and &ndash; congratulations!). From both the Dashboard and the Edit Profile pages, you will see a
link that encourages you to tell us about it. Click either of those links, and you will be brought to a page that
allows you to indicate whether your employment actually came from someone finding your profile on Jobs, Jobs, Jobs,
and gives you a place to write about the experience. These stories are only viewable by validated users, so feel free
to use as much (or as little) identifying information as you&rsquo;d like. You can also submit this page with all the
fields blank; in that case, your &ldquo;Seeking Employment&rdquo; flag is cleared, and the &ldquo;story&rdquo; is
recorded.
</p>
<p>
As a validated user, you can also view others success stories. Clicking &ldquo;Success Stories&rdquo; in the sidebar
will display a list of all the stories that have been recorded. If there is a story to be read, there will be a link
to read it; if you submitted the story, there will also be an &ldquo;Edit&rdquo; link.
</p>
<h4>Publicly Available Information</h4>
<p>
The &ldquo;Job Seekers&rdquo; page for profile information will allow users to search for and display the continent,
region, skills, and notes of users who are seeking employment <strong>and</strong> have opted in to their information
being publicly searchable. If you are a public user, this information is always the latest we have; check out the link
at the top of the search results for how you can learn more about these fine human resources!
</p>
<h4>Help / Suggestions</h4>
<p>
This is open-source software
<a href="https://github.com/bit-badger/jobs-jobs-jobs" _target="_blank">developed on Github</a>; feel free to
<a href="https://github.com/bit-badger/jobs-jobs-jobs/issues" target="_blank">create an issue there</a>, or look up
@("@")danieljsummers on No Agenda Social.
</p>

View File

@ -1,23 +0,0 @@
@page "/"
@inject IJSRuntime js
<PageTitle Title="Welcome!" />
<p>
Welcome to Jobs, Jobs, Jobs (AKA No Agenda Careers), where citizens of Gitmo Nation can assist one another in finding
employment. This will enable them to continue providing value-for-value to Adam and John, as they continue their work
deconstructing the misinformation that passes for news on a day-to-day basis.
</p>
<p>
Do you not understand the terms in the paragraph above? No worries; just head over to
<a href="https://noagendashow.net">
The Best Podcast in the Universe
</a> <em><a class="audio" @onclick=@PlayTrue>(that&rsquo;s true!)</a></em> and find out what you&rsquo;re missing.
</p>
<audio id="thatstrue">
<source src="/audio/thats-true.mp3">
</audio>
@code {
async void PlayTrue() => await js.InvokeVoidAsync("Audio.play", "thatstrue");
}

View File

@ -1,41 +0,0 @@
@page "/listings/mine"
@inject HttpClient http
@inject NavigationManager nav
@inject AppState state
<PageTitle Title="My Job Listings" />
<h3>My Job Listings</h3>
<Loading OnLoad=@OnLoad Message=@(new MarkupString("Loading job listings&hellip;"))>
<p>
<a class="btn" href="/listing/new/edit">Add a New Job Listing</a>
</p>
@if (Listings.Any())
{
<table>
<thead>
<tr>
<th>Action</th>
<th>Title</th>
<th>Created</th>
<th>Updated</th>
</tr>
</thead>
<tbody>
@foreach (var listing in Listings)
{
<tr>
<td><a href="/listing/@listing.Id/edit">Edit</a></td>
<td>@listing.Title</td>
<td><FullDateTime TheDate=@listing.CreatedOn /></td>
<td><FullDateTime TheDate=@listing.UpdatedOn /></td>
</tr>
}
</tbody>
</table>
}
else
{
<p><em>No job listings found</em></p>
}
</Loading>

View File

@ -1,34 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Listings
{
public partial class Mine : ComponentBase
{
/// <summary>
/// The job listings entered by the current user
/// </summary>
private IEnumerable<Listing> Listings { get; set; } = Enumerable.Empty<Listing>();
/// <summary>
/// Load the user's job listings
/// </summary>
/// <param name="errors">Error collection for possible problems</param>
private async Task OnLoad(ICollection<string> errors)
{
var listings = await ServerApi.RetrieveMany<Listing>(http, "listing/mine");
if (listings.IsOk)
{
Listings = listings.Ok;
}
else
{
errors.Add(listings.Error);
}
}
}
}

View File

@ -1,413 +0,0 @@
@page "/privacy-policy"
<PageTitle Title="Privacy Policy" />
<h3>Privacy Policy</h3>
<p><em>(as of February 6<sup>th</sup>, 2021)</em></p>
<p>
@Name (“we,” “our,” or “us”) is committed to protecting your privacy. This Privacy Policy explains how your personal
information is collected, used, and disclosed by @Name.
</p>
<p>
This Privacy Policy applies to our website, and its associated subdomains (collectively, our “Service”) alongside
our application, @Name. By accessing or using our Service, you signify that you have read, understood, and agree to
our collection, storage, use, and disclosure of your personal information as described in this Privacy Policy and our
Terms of Service.
</p>
<h4>Definitions and key terms</h4>
<p>
To help explain things as clearly as possible in this Privacy Policy, every time any of these terms are referenced,
are strictly defined as:
</p>
<ul>
<li>
Cookie: small amount of data generated by a website and saved by your web browser. It is used to identify your
browser, provide analytics, remember information about you such as your language preference or login information.
</li>
<li>
Company: when this policy mentions “Company,” “we,” “us,” or “our,” it refers to @Name, that is responsible for
your information under this Privacy Policy.
</li>
<li>Country: where @Name or the owners/founders of @Name are based, in this case is US.</li>
<li>
Customer: refers to the company, organization or person that signs up to use the @Name Service to manage the
relationships with your consumers or service users.
</li>
<li>
Device: any internet connected device such as a phone, tablet, computer or any other device that can be used to
visit @Name and use the services.
</li>
<li>
IP address: Every device connected to the Internet is assigned a number known as an Internet protocol (IP) address.
These numbers are usually assigned in geographic blocks. An IP address can often be used to identify the location
from which a device is connecting to the Internet.
</li>
<li>
Personnel: refers to those individuals who are employed by @Name or are under contract to perform a service on
behalf of one of the parties.
</li>
<li>
Personal Data: any information that directly, indirectly, or in connection with other information — including a
personal identification number — allows for the identification or identifiability of a natural person.
</li>
<li>
Service: refers to the service provided by @Name as described in the relative terms (if available) and on this
platform.
</li>
<li>
Third-party service: refers to advertisers, contest sponsors, promotional and marketing partners, and others who
provide our content or whose products or services we think may interest you.
</li>
<li>
Website: @Name&rsquo;s site, which can be accessed via this URL: <a href="/">https://noagendacareers.com/</a>
</li>
<li>You: a person or entity that is registered with @Name to use the Services.</li>
</ul>
<h4>What Information Do We Collect?</h4>
<p>
We collect information from you when you visit our website, register on our site, or fill out a form.
</p>
<ul>
<li>Name / Username</li>
<li>Coarse Geographic Location</li>
<li>Employment History</li>
<li>No Agenda Social Account Name / Profile</li>
</ul>
<h4>How Do We Use The Information We Collect?</h4>
<p>
Any of the information we collect from you may be used in one of the following ways:
</p>
<ul>
<li>To personalize your experience (your information helps us to better respond to your individual needs)</li>
<li>
To improve our website (we continually strive to improve our website offerings based on the information and
feedback we receive from you)
</li>
<li>
To improve customer service (your information helps us to more effectively respond to your customer service
requests and support needs)
</li>
</ul>
<h4>When does @Name use end user information from third parties?</h4>
<p>@Name will collect End User Data necessary to provide the @Name services to our customers.</p>
<p>
End users may voluntarily provide us with information they have made available on social media websites (specifically
No Agenda Social). If you provide us with any such information, we may collect publicly available information from
the social media websites you have indicated. You can control how much of your information social media websites make
public by visiting these websites and changing your privacy settings.
</p>
<h4>When does @Name use customer information from third parties?</h4>
<p>We do not utilize third party information apart from the end-user data described above.</p>
<h4>Do we share the information we collect with third parties?</h4>
<p>
We may disclose personal and non-personal information about you to government or law enforcement officials or private
parties as we, in our sole discretion, believe necessary or appropriate in order to respond to claims, legal process
(including subpoenas), to protect our rights and interests or those of a third party, the safety of the public or any
person, to prevent or stop any illegal, unethical, or legally actionable activity, or to otherwise comply with
applicable court orders, laws, rules and regulations.
</p>
<h4>Where and when is information collected from customers and end users?</h4>
<p>
@Name will collect personal information that you submit to us. We may also receive personal information about you
from third parties as described above.
</p>
<h4>How Do We Use Your E-mail Address?</h4>
<p>
We do not collect nor use an e-mail address. If you have provided it in the free text areas of the site, other
validated users may be able to view it, but @Name does not search for nor utilize e-mail addresses from those areas.
</p>
<h4>How Long Do We Keep Your Information?</h4>
<p>
We keep your information only so long as we need it to provide @Name to you and fulfill the purposes described in
this policy. When we no longer need to use your information and there is no need for us to keep it to comply with our
legal or regulatory obligations, well either remove it from our systems or depersonalize it so that we can&rsquo;t
identify you.
</p>
<h4>How Do We Protect Your Information?</h4>
<p>
We implement a variety of security measures to maintain the safety of your personal information when you enter,
submit, or access your personal information. We mandate the use of a secure server. We cannot, however, ensure or
warrant the absolute security of any information you transmit to @Name or guarantee that your information on the
Service may not be accessed, disclosed, altered, or destroyed by a breach of any of our physical, technical, or
managerial safeguards.
</p>
<h4>Could my information be transferred to other countries?</h4>
<p>
@Name is hosted in the US. Information collected via our website may be viewed and hosted anywhere in the world,
including countries that may not have laws of general applicability regulating the use and transfer of such data. To
the fullest extent allowed by applicable law, by using any of the above, you voluntarily consent to the trans-border
transfer and hosting of such information.
</p>
<h4>Is the information collected through the @Name Service secure?</h4>
<p>
We take precautions to protect the security of your information. We have physical, electronic, and managerial
procedures to help safeguard, prevent unauthorized access, maintain data security, and correctly use your
information. However, neither people nor security systems are foolproof, including encryption systems. In addition,
people can commit intentional crimes, make mistakes, or fail to follow policies. Therefore, while we use reasonable
efforts to protect your personal information, we cannot guarantee its absolute security. If applicable law imposes
any non-disclaimable duty to protect your personal information, you agree that intentional misconduct will be the
standards used to measure our compliance with that duty.
</p>
<h4>Can I update or correct my information?</h4>
<p>
The rights you have to request updates or corrections to the information @Name collects depend on your relationship
with @Name.
</p>
<p>
Customers have the right to request the restriction of certain uses and disclosures of personally identifiable
information as follows. You can contact us in order to (1) update or correct your personally identifiable
information, or (3) delete the personally identifiable information maintained about you on our systems (subject to
the following paragraph), by cancelling your account. Such updates, corrections, changes and deletions will have no
effect on other information that we maintain in accordance with this Privacy Policy prior to such update, correction,
change, or deletion. You are responsible for maintaining the secrecy of your unique password and account information
at all times.
</p>
<p>
@Name also provides ways for users to modify or remove the information we have collected from them from the
application; these actions will have the same effect as contacting us to modify or remove data.
</p>
<p>
You should be aware that it is not technologically possible to remove each and every record of the information you
have provided to us from our system. The need to back up our systems to protect information from inadvertent loss
means that a copy of your information may exist in a non-erasable form that will be difficult or impossible for us to
locate. Promptly after receiving your request, all personal information stored in databases we actively use, and
other readily searchable media will be updated, corrected, changed, or deleted, as appropriate, as soon as and to the
extent reasonably and technically practicable.
</p>
<p>
If you are an end user and wish to update, delete, or receive any information we have about you, you may do so by
contacting the organization of which you are a customer.
</p>
<h4>Governing Law</h4>
<p>
This Privacy Policy is governed by the laws of US without regard to its conflict of laws provision. You consent to
the exclusive jurisdiction of the courts in connection with any action or dispute arising between the parties under
or in connection with this Privacy Policy except for those individuals who may have rights to make claims under
Privacy Shield, or the Swiss-US framework.
</p>
<p>
The laws of US, excluding its conflicts of law rules, shall govern this Agreement and your use of the website. Your
use of the website may also be subject to other local, state, national, or international laws.
</p>
<p>
By using @Name or contacting us directly, you signify your acceptance of this Privacy Policy. If you do not agree to
this Privacy Policy, you should not engage with our website, or use our services. Continued use of the website,
direct engagement with us, or following the posting of changes to this Privacy Policy that do not significantly
affect the use or disclosure of your personal information will mean that you accept those changes.
</p>
<h4>Your Consent</h4>
<p>
We&rsquo;ve updated our Privacy Policy to provide you with complete transparency into what is being set when you
visit our site and how it&rsquo;s being used. By using our website, registering an account, or making a purchase, you
hereby consent to our Privacy Policy and agree to its terms.
</p>
<h4>Links to Other Websites</h4>
<p>
This Privacy Policy applies only to the Services. The Services may contain links to other websites not operated or
controlled by @Name. We are not responsible for the content, accuracy or opinions expressed in such websites, and
such websites are not investigated, monitored or checked for accuracy or completeness by us. Please remember that
when you use a link to go from the Services to another website, our Privacy Policy is no longer in effect. Your
browsing and interaction on any other website, including those that have a link on our platform, is subject to that
websites own rules and policies. Such third parties may use their own cookies or other methods to collect
information about you.
</p>
<h4>Cookies</h4>
<p>@Name does not use Cookies.</p>
<h4>Kids' Privacy</h4>
<p>
We do not address anyone under the age of 13. We do not knowingly collect personally identifiable information from
anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has provided Us with
Personal Data, please contact Us. If We become aware that We have collected Personal Data from anyone under the age
of 13 without verification of parental consent, We take steps to remove that information from Our servers.
</p>
<h4>Changes To Our Privacy Policy</h4>
<p>
We may change our Service and policies, and we may need to make changes to this Privacy Policy so that they
accurately reflect our Service and policies. Unless otherwise required by law, we will notify you (for example,
through our Service) before we make changes to this Privacy Policy and give you an opportunity to review them before
they go into effect. Then, if you continue to use the Service, you will be bound by the updated Privacy Policy. If
you do not want to agree to this or any updated Privacy Policy, you can delete your account.
</p>
<h4>Third-Party Services</h4>
<p>
We may display, include or make available third-party content (including data, information, applications and other
products services) or provide links to third-party websites or services (&ldquo;Third-Party Services&rdquo;).
</p>
<p>
You acknowledge and agree that @Name shall not be responsible for any Third-Party Services, including their accuracy,
completeness, timeliness, validity, copyright compliance, legality, decency, quality or any other aspect thereof.
@Name does not assume and shall not have any liability or responsibility to you or any other person or entity for any
Third-Party Services.
</p>
<p>
Third-Party Services and links thereto are provided solely as a convenience to you and you access and use them
entirely at your own risk and subject to such third parties' terms and conditions.
</p>
<h4>Tracking Technologies</h4>
<p>
@Name does not use any tracking technologies. When an authorization code is received from No Agenda Social, that
token is stored in the browser&rsquo;s memory, and the Service uses tokens on each request for data. If the page is
refreshed or the browser window/tab is closed, this token disappears, and a new one must be generated before the
application can be used again.
</p>
<h4>Information about General Data Protection Regulation (GDPR)</h4>
<p>
We may be collecting and using information from you if you are from the European Economic Area (EEA), and in this
section of our Privacy Policy we are going to explain exactly how and why is this data collected, and how we maintain
this data under protection from being replicated or used in the wrong way.
</p>
<h4>What is GDPR?</h4>
<p>
GDPR is an EU-wide privacy and data protection law that regulates how EU residents&rsquo; data is protected by
companies and enhances the control the EU residents have, over their personal data.
</p>
<p>
The GDPR is relevant to any globally operating company and not just the EU-based businesses and EU residents. Our
customers data is important irrespective of where they are located, which is why we have implemented GDPR controls
as our baseline standard for all our operations worldwide.
</p>
<h4>What is personal data?</h4>
<p>
Any data that relates to an identifiable or identified individual. GDPR covers a broad spectrum of information that
could be used on its own, or in combination with other pieces of information, to identify a person. Personal data
extends beyond a persons name or email address. Some examples include financial information, political opinions,
genetic data, biometric data, IP addresses, physical address, sexual orientation, and ethnicity.
</p>
<p>The Data Protection Principles include requirements such as:</p>
<ul>
<li>
Personal data collected must be processed in a fair, legal, and transparent way and should only be used in a way
that a person would reasonably expect.
</li>
<li>
Personal data should only be collected to fulfil a specific purpose and it should only be used for that purpose.
Organizations must specify why they need the personal data when they collect it.
</li>
<li>Personal data should be held no longer than necessary to fulfil its purpose.</li>
<li>
People covered by the GDPR have the right to access their own personal data. They can also request a copy of their
data, and that their data be updated, deleted, restricted, or moved to another organization.
</li>
</ul>
<h4>Why is GDPR important?</h4>
<p>
GDPR adds some new requirements regarding how companies should protect individuals&rsquo; personal data that they
collect and process. It also raises the stakes for compliance by increasing enforcement and imposing greater fines
for breach. Beyond these facts, it&rsquo;s simply the right thing to do. At @Name we strongly believe that your data
privacy is very important and we already have solid security and privacy practices in place that go beyond the
requirements of this regulation.
</p>
<h4>Individual Data Subject&rsquo;s Rights - Data Access, Portability, and Deletion</h4>
<p>
We are committed to helping our customers meet the data subject rights requirements of GDPR. @Name processes or
stores all personal data in fully vetted, DPA compliant vendors. We do store all conversation and personal data for
up to 6 years unless your account is deleted. In which case, we dispose of all data in accordance with our Terms of
Service and Privacy Policy, but we will not hold it longer than 60 days.
</p>
<p>
We are aware that if you are working with EU customers, you need to be able to provide them with the ability to
access, update, retrieve and remove personal data. We got you! We've been set up as self service from the start and
have always given you access to your data. Our customer support team is here for you to answer any questions you
might have about working with the API.
</p>
<h4>California Residents</h4>
<p>
The California Consumer Privacy Act (CCPA) requires us to disclose categories of Personal Information we collect and
how we use it, the categories of sources from whom we collect Personal Information, and the third parties with whom
we share it, which we have explained above.
</p>
<p>
We are also required to communicate information about rights California residents have under California law. You may
exercise the following rights:
</p>
<ul>
<li>
Right to Know and Access. You may submit a verifiable request for information regarding the: (1) categories of
Personal Information we collect, use, or share; (2) purposes for which categories of Personal Information are
collected or used by us; (3) categories of sources from which we collect Personal Information; and (4) specific
pieces of Personal Information we have collected about you.
</li>
<li>Right to Equal Service. We will not discriminate against you if you exercise your privacy rights.</li>
<li>
Right to Delete. You may submit a verifiable request to close your account and we will delete Personal Information
about you that we have collected.
</li>
<li>Request that a business that sells a consumer's personal data, not sell the consumer's personal data.</li>
</ul>
<p>
If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please
contact us.
</p>
<p>We do not sell the Personal Information of our users.</p>
<p>For more information about these rights, please contact us.</p>
<h4>California Online Privacy Protection Act (CalOPPA)</h4>
<p>
CalOPPA requires us to disclose categories of Personal Information we collect and how we use it, the categories of
sources from whom we collect Personal Information, and the third parties with whom we share it, which we have
explained above.
</p>
<p>CalOPPA users have the following rights:</p>
<ul>
<li>
Right to Know and Access. You may submit a verifiable request for information regarding the: (1) categories of
Personal Information we collect, use, or share; (2) purposes for which categories of Personal Information are
collected or used by us; (3) categories of sources from which we collect Personal Information; and (4) specific
pieces of Personal Information we have collected about you.
</li>
<li>Right to Equal Service. We will not discriminate against you if you exercise your privacy rights.</li>
<li>
Right to Delete. You may submit a verifiable request to close your account and we will delete Personal Information
about you that we have collected.
</li>
<li>Right to request that a business that sells a consumer's personal data, not sell the consumer's personal data.</li>
</ul>
<p>
If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please
contact us.
</p>
<p>We do not sell the Personal Information of our users.</p>
<p>For more information about these rights, please contact us.</p>
<h4>Contact Us</h4>
<p>Don't hesitate to contact us if you have any questions.</p>
<ul>
<li>Via this Link: <a href="/how-it-works">https://noagendacareers.com/how-it-works</a></li>
</ul>
@code {
/// <summary>
/// The name of the application
/// </summary>
private string Name = "Jobs, Jobs, Jobs";
}

View File

@ -1,57 +0,0 @@
@page "/profile/search"
@inject HttpClient http
@inject NavigationManager nav
@inject AppState state
<PageTitle Title="Search Profiles" />
<h3>Search Profiles</h3>
<ErrorList Errors=@ErrorMessages>
@if (Searching)
{
<p>Searching profiles...</p>
}
else
{
if (!Searched)
{
<p>Enter one or more criteria to filter results, or just click &ldquo;Search&rdquo; to list all profiles.</p>
}
<Collapsible HeaderText="Search Criteria" Collapsed=@(Searched && SearchResults.Any())>
<ProfileSearchForm Criteria=@Criteria OnSearch=@DoSearch Continents=@Continents />
</Collapsible>
<br>
@if (SearchResults.Any())
{
<table class="table table-sm table-hover">
<thead>
<tr>
<th scope="col">Profile</th>
<th scope="col">Name</th>
<th scope="col" class="text-center">Seeking?</th>
<th scope="col" class="text-center">Remote?</th>
<th scope="col" class="text-center">Full-Time?</th>
<th scope="col">Last Updated</th>
</tr>
</thead>
<tbody>
@foreach (var profile in SearchResults)
{
<tr>
<td><a href="/profile/view/@profile.CitizenId">View</a></td>
<td class=@IsSeeking(profile)>@profile.DisplayName</td>
<td class="text-center">@YesOrNo(profile.SeekingEmployment)</td>
<td class="text-center">@YesOrNo(profile.RemoteWork)</td>
<td class="text-center">@YesOrNo(profile.FullTime)</td>
<td><FullDate TheDate=@profile.LastUpdated /></td>
</tr>
}
</tbody>
</table>
}
else if (Searched)
{
<p>No results found for the specified criteria</p>
}
}
</ErrorList>

View File

@ -1,139 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.WebUtilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Profiles
{
public partial class Search : ComponentBase
{
/// <summary>
/// Whether a search has been performed
/// </summary>
private bool Searched { get; set; } = false;
/// <summary>
/// Indicates whether a request for matching profiles is in progress
/// </summary>
private bool Searching { get; set; } = false;
/// <summary>
/// The search criteria
/// </summary>
private ProfileSearch Criteria { get; set; } = new ProfileSearch();
/// <summary>
/// Error messages encountered while searching for profiles
/// </summary>
private IList<string> ErrorMessages { get; } = new List<string>();
/// <summary>
/// All continents
/// </summary>
private IEnumerable<Continent> Continents { get; set; } = Enumerable.Empty<Continent>();
/// <summary>
/// The search results
/// </summary>
private IEnumerable<ProfileSearchResult> SearchResults { get; set; } = Enumerable.Empty<ProfileSearchResult>();
protected override async Task OnInitializedAsync()
{
Continents = await state.GetContinents(http);
// Determine if we have searched before
var query = QueryHelpers.ParseQuery(nav.ToAbsoluteUri(nav.Uri).Query);
if (query.TryGetValue("Searched", out var searched))
{
Searched = Convert.ToBoolean(searched);
void setPart(string part, Action<string> func)
{
if (query.TryGetValue(part, out var partValue)) func(partValue);
}
setPart(nameof(Criteria.ContinentId), x => Criteria.ContinentId = x);
setPart(nameof(Criteria.Skill), x => Criteria.Skill = x);
setPart(nameof(Criteria.BioExperience), x => Criteria.BioExperience = x);
setPart(nameof(Criteria.RemoteWork), x => Criteria.RemoteWork = x);
await RetrieveProfiles();
}
}
/// <summary>
/// Do a search
/// </summary>
/// <remarks>This navigates with the parameters in the URL; this should trigger a search</remarks>
private async Task DoSearch()
{
var query = SearchQuery();
query.Add("Searched", "True");
nav.NavigateTo(QueryHelpers.AddQueryString("/profile/search", query));
await RetrieveProfiles();
}
/// <summary>
/// Retreive profiles matching the current search criteria
/// </summary>
private async Task RetrieveProfiles()
{
Searching = true;
var searchResult = await ServerApi.RetrieveMany<ProfileSearchResult>(http,
QueryHelpers.AddQueryString("profile/search", SearchQuery()));
if (searchResult.IsOk)
{
SearchResults = searchResult.Ok;
}
else
{
ErrorMessages.Add(searchResult.Error);
}
Searched = true;
Searching = false;
}
/// <summary>
/// Return a CSS class if the user is actively seeking work
/// </summary>
/// <param name="profile">The result in question</param>
/// <returns>A string with the appropriate CSS class, if actively seeking work</returns>
private static string? IsSeeking(ProfileSearchResult profile) =>
profile.SeekingEmployment ? "font-weight-bold" : null;
/// <summary>
/// Return "Yes" for true and "No" for false
/// </summary>
/// <param name="condition">The condition in question</param>
/// <returns>"Yes" for true, "No" for false</returns>
private static string YesOrNo(bool condition) => condition ? "Yes" : "No";
/// <summary>
/// Create a search query string from the currently-entered criteria
/// </summary>
/// <returns>The query string for the currently-entered criteria</returns>
private IDictionary<string, string?> SearchQuery()
{
var dict = new Dictionary<string, string?>();
if (Criteria.IsEmptySearch) return dict;
void part(string name, Func<ProfileSearch, string?> func)
{
if (!string.IsNullOrEmpty(func(Criteria))) dict.Add(name, func(Criteria));
}
part(nameof(Criteria.ContinentId), it => it.ContinentId);
part(nameof(Criteria.Skill), it => it.Skill);
part(nameof(Criteria.BioExperience), it => it.BioExperience);
part(nameof(Criteria.RemoteWork), it => it.RemoteWork);
return dict;
}
}
}

View File

@ -1,62 +0,0 @@
@page "/profile/seeking"
@inject HttpClient http
@inject NavigationManager nav
@inject AppState state
<PageTitle Title="People Seeking Work" />
<h3>People Seeking Work</h3>
<ErrorList Errors=@ErrorMessages>
@if (Searching)
{
<p>Searching profiles...</p>
}
else
{
if (!Searched)
{
<p>Enter one or more criteria to filter results, or just click &ldquo;Search&rdquo; to list all profiles.</p>
}
<Collapsible HeaderText="Search Criteria" Collapsed=@(Searched && SearchResults.Any())>
<PublicSearchForm Criteria=@Criteria OnSearch=@DoSearch Continents=@Continents />
</Collapsible>
<br>
@if (SearchResults.Any())
{
<p>
These profiles match your search criteria. To learn more about these people, join the merry band of human
resources in the <a href="https://noagendashow.net" target="_blank">No Agenda</a> tribe!
</p>
<table class="table table-sm table-hover">
<thead>
<tr>
<th scope="col">Continent</th>
<th scope="col" class="text-center">Region</th>
<th scope="col" class="text-center">Remote?</th>
<th scope="col" class="text-center">Skills</th>
</tr>
</thead>
<tbody>
@foreach (var profile in SearchResults)
{
<tr>
<td>@profile.Continent</td>
<td>@profile.Region</td>
<td class="text-center">@YesOrNo(profile.RemoteWork)</td>
<td>
@foreach (var skill in profile.Skills)
{
@skill.Replace(" ()", "")<br>
}
</td>
</tr>
}
</tbody>
</table>
}
else if (Searched)
{
<p>No results found for the specified criteria</p>
}
}
</ErrorList>

View File

@ -1,134 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.WebUtilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Profiles
{
public partial class Seeking : ComponentBase
{
/// <summary>
/// Whether a search has been performed
/// </summary>
private bool Searched { get; set; } = false;
/// <summary>
/// Indicates whether a request for matching profiles is in progress
/// </summary>
private bool Searching { get; set; } = false;
/// <summary>
/// The search criteria
/// </summary>
private PublicSearch Criteria { get; set; } = new PublicSearch();
/// <summary>
/// Error messages encountered while searching for profiles
/// </summary>
private IList<string> ErrorMessages { get; } = new List<string>();
/// <summary>
/// All continents
/// </summary>
private IEnumerable<Continent> Continents { get; set; } = Enumerable.Empty<Continent>();
/// <summary>
/// The search results
/// </summary>
private IEnumerable<PublicSearchResult> SearchResults { get; set; } = Enumerable.Empty<PublicSearchResult>();
protected override async Task OnInitializedAsync()
{
Continents = await state.GetContinents(http);
// Determine if we have searched before
var query = QueryHelpers.ParseQuery(nav.ToAbsoluteUri(nav.Uri).Query);
if (query.TryGetValue("Searched", out var searched))
{
Searched = Convert.ToBoolean(searched);
void setPart(string part, Action<string> func)
{
if (query.TryGetValue(part, out var partValue)) func(partValue);
}
setPart(nameof(Criteria.ContinentId), x => Criteria.ContinentId = x);
setPart(nameof(Criteria.Region), x => Criteria.Region = x);
setPart(nameof(Criteria.Skill), x => Criteria.Skill = x);
setPart(nameof(Criteria.RemoteWork), x => Criteria.RemoteWork = x);
await RetrieveProfiles();
}
}
/// <summary>
/// Do a search
/// </summary>
/// <remarks>This navigates with the parameters in the URL; this should trigger a search</remarks>
private async Task DoSearch()
{
var query = SearchQuery();
query.Add("Searched", "True");
nav.NavigateTo(QueryHelpers.AddQueryString("/profile/seeking", query));
await RetrieveProfiles();
}
/// <summary>
/// Retreive profiles matching the current search criteria
/// </summary>
private async Task RetrieveProfiles()
{
Searching = true;
var searchResult = await ServerApi.RetrieveMany<PublicSearchResult>(http,
QueryHelpers.AddQueryString("profile/public-search", SearchQuery()));
if (searchResult.IsOk)
{
SearchResults = searchResult.Ok;
}
else
{
ErrorMessages.Add(searchResult.Error);
}
Searched = true;
Searching = false;
}
private static string? IsSeeking(ProfileSearchResult profile) =>
profile.SeekingEmployment ? "font-weight-bold" : null;
/// <summary>
/// Return "Yes" for true and "No" for false
/// </summary>
/// <param name="condition">The condition in question</param>
/// <returns>"Yes" for true, "No" for false</returns>
private static string YesOrNo(bool condition) => condition ? "Yes" : "No";
/// <summary>
/// Create a search query string from the currently-entered criteria
/// </summary>
/// <returns>The query string for the currently-entered criteria</returns>
private IDictionary<string, string?> SearchQuery()
{
var dict = new Dictionary<string, string?>();
if (Criteria.IsEmptySearch) return dict;
void part(string name, Func<PublicSearch, string?> func)
{
if (!string.IsNullOrEmpty(func(Criteria))) dict.Add(name, func(Criteria));
}
part(nameof(Criteria.ContinentId), it => it.ContinentId);
part(nameof(Criteria.Region), it => it.Region);
part(nameof(Criteria.Skill), it => it.Skill);
part(nameof(Criteria.RemoteWork), it => it.RemoteWork);
return dict;
}
}
}

View File

@ -1,45 +0,0 @@
@page "/profile/view/{Id}"
@inject HttpClient http
@inject AppState state
<Loading OnLoad=@RetrieveProfile>
<PageTitle Title=@($"Employment Profile for {Citizen.CitizenName}") />
<h2><a href="@Citizen.ProfileUrl" target="_blank">@Citizen.CitizenName</a></h2>
<h4>@Profile.Continent!.Name, @Profile.Region</h4>
<p>@WorkTypes</p>
<hr>
<div>
@(new MarkupString(Profile.Biography.ToHtml()))
</div>
@if (Profile.Skills.Count > 0)
{
<hr>
<h4>Skills</h4>
<ul>
@foreach (var skill in Profile.Skills)
{
var notes = skill.Notes == null ? "" : $" ({skill.Notes})";
<li>@skill.Description@notes</li>
}
</ul>
}
@if (Profile.Experience != null)
{
<hr>
<h4>Experience / Employment History</h4>
<div>
@(new MarkupString(Profile.Experience.ToHtml()))
</div>
}
@if (Id == state.User!.Id.ToString())
{
<hr>
<p><a href="/citizen/profile"><span class="oi oi-pencil"></span> Edit Your Profile</a></p>
}
</Loading>

View File

@ -1,90 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Profiles
{
public partial class View : ComponentBase
{
/// <summary>
/// The citizen whose profile is being displayed
/// </summary>
private Citizen Citizen { get; set; } = default!;
/// <summary>
/// The profile to display
/// </summary>
private Profile Profile { get; set; } = default!;
/// <summary>
/// The work types for the top of the page
/// </summary>
private MarkupString WorkTypes
{
get
{
IEnumerable<string> parts()
{
if (Profile.SeekingEmployment)
{
yield return "<strong><em>CURRENTLY SEEKING EMPLOYMENT</em></strong>";
}
else
{
yield return "Not actively seeking employment";
}
yield return $"{(Profile.FullTime ? "I" : "Not i")}nterested in full-time employment";
yield return $"{(Profile.RemoteWork ? "I" : "Not i")}nterested in remote opportunities";
}
return new MarkupString(string.Join(" &bull; ", parts()));
}
}
/// <summary>
/// The ID of the citizen whose profile should be displayed
/// </summary>
[Parameter]
public string Id { get; set; } = default!;
/// <summary>
/// Retrieve the requested profile
/// </summary>
/// <param name="errors">A collection to report errors that may occur</param>
public async Task RetrieveProfile(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var citizenTask = ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{Id}");
var profileTask = ServerApi.RetrieveOne<Profile>(http, $"profile/get/{Id}");
await Task.WhenAll(citizenTask, profileTask);
if (citizenTask.Result.IsOk && citizenTask.Result.Ok != null)
{
Citizen = citizenTask.Result.Ok;
}
else if (citizenTask.Result.IsOk)
{
errors.Add("Citizen not found");
}
else
{
errors.Add(citizenTask.Result.Error);
}
if (profileTask.Result.IsOk && profileTask.Result.Ok != null)
{
Profile = profileTask.Result.Ok;
}
else if (profileTask.Result.IsOk)
{
errors.Add("Profile not found");
}
else
{
errors.Add(profileTask.Result.Error);
}
}
}
}

View File

@ -1,39 +0,0 @@
@page "/so-long/options"
@inject HttpClient http
@inject AppState state
@inject NavigationManager nav
@inject IToastService toast
<PageTitle Title="Account Deletion Options" />
<h3>Account Deletion Options</h3>
<h4>Option 1 &ndash; Delete Your Profile</h4>
<p>
Utilizing this option will remove your current employment profile and skills. This will preserve any success stories
you may have written, and preserves this application&rsquo;s knowledge of you. This is what you want to use if you
want to clear out your profile and start again (and remove the current one from others&rsquo; view).
</p>
<p class="text-center">
<button class="btn btn-danger" @onclick=@DeleteProfile>Delete Your Profile</button>
</p>
<hr>
<h4>Option 2 &ndash; Delete Your Account</h4>
<p>
This option will make it like you never visited this site. It will delete your profile, skills, success stories, and
account. This is what you want to use if you want to disappear from this application. Clicking the button below
<strong>will not</strong> affect your No Agenda Social account in any way; its effects are limited to Jobs, Jobs,
Jobs.
</p>
<p>
<em>
(This will not revoke this application&rsquo;s permissions on No Agenda Social; you will have to remove this
yourself. The confirmation message has a link where you can do this; once the page loads, find the
<strong>Jobs, Jobs, Jobs</strong> entry, and click the <strong>&times; Revoke</strong> link for that entry.)
</em>
</p>
<p class="text-center">
<button class="btn btn-danger" @onclick=@DeleteAccount>Delete Your Entire Account</button>
</p>

View File

@ -1,54 +0,0 @@
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.SoLong
{
public partial class Options : ComponentBase
{
/// <summary>
/// Extract an error phrase from a response similar to <code>404 - Not Found</code>
/// </summary>
/// <param name="response">The HTTP response</param>
/// <returns>The formatted error code</returns>
private static string ErrorPhrase(HttpResponseMessage response) =>
$"{response.StatusCode}{(string.IsNullOrEmpty(response.ReasonPhrase) ? "" : $" - {response.ReasonPhrase }")}";
/// <summary>
/// Delete the profile only; redirect to home page on success
/// </summary>
private async Task DeleteProfile()
{
ServerApi.SetJwt(http, state);
var result = await http.DeleteAsync("/api/profile/");
if (result.IsSuccessStatusCode)
{
toast.ShowSuccess("Profile Deleted Successfully");
nav.NavigateTo("/citizen/dashboard");
}
else
{
toast.ShowError(ErrorPhrase(result));
}
}
/// <summary>
/// Delete everything pertaining to the user's account
/// </summary>
private async Task DeleteAccount()
{
ServerApi.SetJwt(http, state);
var result = await http.DeleteAsync("/api/citizen/");
if (result.IsSuccessStatusCode)
{
state.Jwt = "";
state.User = null;
nav.NavigateTo("/so-long/success");
}
else
{
toast.ShowError(ErrorPhrase(result));
}
}
}
}

View File

@ -1,15 +0,0 @@
@page "/so-long/success"
<PageTitle Title="Account Deletion Success" />
<h3>Account Deletion Success</h3>
<p>
Your account has been successfully deleted. To revoke the permissions you have previously granted to this
application, find it in <a href="https://noagendasocial.com/oauth/authorized_applications">this list</a> and click
<strong>&times; Revoke</strong>. Otherwise, clicking &ldquo;Log On&rdquo; will create a new, empty account without
prompting you further.
</p>
<p>
Thank you for participating, and thank you for your courage. #GitmoNation
</p>

View File

@ -1,49 +0,0 @@
@page "/success-story/add"
@page "/success-story/edit/{Id}"
@inject HttpClient http
@inject AppState state
@inject NavigationManager nav
@inject IToastService toast
<PageTitle Title=@Title />
<h3>@Title</h3>
<Loading OnLoad=@RetrieveStory>
@if (IsNew)
{
<p>
Congratulations on your employment! Your fellow citizens would enjoy hearing how it all came about; tell us
about it below! <em>(These will be visible to other users, but not to the general public.)</em>
</p>
}
<EditForm Model=@Form OnValidSubmit=@SaveStory>
<div class="form-row">
<div class="col">
<div class="form-check">
<InputCheckbox id="fromHere" class="form-check-input" @bind-Value=@Form.FromHere />
<label for="fromHere" class="form-check-label">I found my employment here</label>
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<div class="form-group">
<label for="story" class="jjj-label">The Success Story</label>
<MarkdownEditor Id="story" @bind-Text=@Form.Story />
</div>
</div>
</div>
<div class="form-row">
<div class="col">
<br>
<button type="submit" class="btn btn-outline-primary">Save</button>
@if (IsNew)
{
<p>
<em>(Saving this will set &ldquo;Seeking Employment&rdquo; to &ldquo;No&rdquo; on your profile.)</em>
</p>
}
</div>
</div>
</EditForm>
</Loading>

View File

@ -1,124 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.SuccessStory
{
public partial class EditStory : ComponentBase
{
/// <summary>
/// The ID of the success story being edited
/// </summary>
[Parameter]
public string? Id { get; set; }
/// <summary>
/// The page title / header
/// </summary>
public string Title => IsNew ? "Tell Your Success Story" : "Edit Success Story";
/// <summary>
/// The form with information for the success story
/// </summary>
private StoryForm Form { get; set; } = new StoryForm();
/// <summary>
/// Convenience property for showing new
/// </summary>
private bool IsNew => Form.Id == "new";
/// <summary>
/// Retrieve the story
/// </summary>
/// <param name="errors">A collection to use in reporting errors that may occur</param>
public async Task RetrieveStory(ICollection<string> errors)
{
if (Id != null)
{
ServerApi.SetJwt(http, state);
var story = await ServerApi.RetrieveOne<Success>(http, $"success/{Id}");
if (story.IsOk && story.Ok != null)
{
if (story.Ok.CitizenId == state.User!.Id)
{
Form = new StoryForm
{
Id = story.Ok.Id.ToString(),
FromHere = story.Ok.FromHere,
Story = story.Ok.Story?.Text ?? ""
};
}
else
{
errors.Add("Stop messing with the URL");
}
}
else if (story.IsOk)
{
errors.Add($"The success story {Id} does not exist");
}
else
{
errors.Add(story.Error);
}
}
}
/// <summary>
/// Save the success story
/// </summary>
private async Task SaveStory()
{
ServerApi.SetJwt(http, state);
var res = await http.PostAsJsonAsync("/api/success/save", Form);
if (res.IsSuccessStatusCode)
{
if (IsNew)
{
res = await http.PatchAsync("/api/profile/employment-found", new StringContent(""));
if (res.IsSuccessStatusCode)
{
SaveSuccessful();
}
else
{
await SaveFailed(res);
}
}
else
{
SaveSuccessful();
}
}
else
{
await SaveFailed(res);
}
}
/// <summary>
/// Handle success notifications if saving succeeded
/// </summary>
private void SaveSuccessful()
{
toast.ShowSuccess("Story Saved Successfully");
nav.NavigateTo("/success-story/list");
}
/// <summary>
/// Handle failure notifications is saving was not successful
/// </summary>
/// <param name="res">The HTTP response</param>
private async Task SaveFailed(HttpResponseMessage res)
{
var error = await res.Content.ReadAsStringAsync();
if (!string.IsNullOrEmpty(error)) error = $"- {error}";
toast.ShowError($"{(int)res.StatusCode} {error}");
}
}
}

View File

@ -1,59 +0,0 @@
@page "/success-story/list"
@inject HttpClient http
@inject AppState state
<PageTitle Title="Success Stories" />
<h3>Success Stories</h3>
<Loading OnLoad=@LoadStories>
@if (Stories.Any())
{
<table class="table table-sm table-hover">
<thead>
<tr>
<th scope="col">Story</th>
<th scope="col">From</th>
<th scope="col">Found Here?</th>
<th scope="col">Recorded On</th>
</tr>
</thead>
<tbody>
@foreach (var story in Stories)
{
<tr>
<td>
@if (story.HasStory)
{
<a href="/success-story/view/@story.Id">View</a>
}
else
{
<em>None</em>
}
@if (story.CitizenId == state.User!.Id)
{
<text> ~ </text><a href="/success-story/edit/@story.Id">Edit</a>
}
</td>
<td>@story.CitizenName</td>
<td>
@if (story.FromHere)
{
<strong>Yes</strong>
}
else
{
<text>No</text>
}
</td>
<td><FullDate TheDate=@story.RecordedOn /></td>
</tr>
}
</tbody>
</table>
}
else
{
<p>There are no success stories recorded <em>(yet)</em></p>
}
</Loading>

View File

@ -1,34 +0,0 @@
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.SuccessStory
{
public partial class ListStories : ComponentBase
{
/// <summary>
/// The story entries
/// </summary>
private IEnumerable<StoryEntry> Stories { get; set; } = default!;
/// <summary>
/// Load all success stories
/// </summary>
/// <param name="errors">The collection into which errors can be reported</param>
public async Task LoadStories(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var stories = await ServerApi.RetrieveMany<StoryEntry>(http, "success/list");
if (stories.IsOk)
{
Stories = stories.Ok;
}
else
{
errors.Add(stories.Error);
}
}
}
}

View File

@ -1,19 +0,0 @@
@page "/success-story/view/{Id}"
@inject HttpClient http
@inject AppState state
<PageTitle Title="Success Story" />
<Loading OnLoad=@RetrieveStory>
<h3>@Citizen.CitizenName&rsquo;s Success Story</h3>
<h4><FullDateTime TheDate=@Story.RecordedOn /></h4>
@if (Story.FromHere)
{
<p><em><strong>Found via Jobs, Jobs, Jobs</strong></em></p>
}
<hr>
@if (Story.Story != null)
{
<div>@(new MarkupString(Story.Story.ToHtml()))</div>
}
</Loading>

View File

@ -1,69 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.SuccessStory
{
public partial class ViewStory : ComponentBase
{
/// <summary>
/// The ID of the success story to display
/// </summary>
[Parameter]
public string Id { get; set; } = default!;
/// <summary>
/// The success story to be displayed
/// </summary>
private Success Story { get; set; } = default!;
/// <summary>
/// The citizen who authorized this success story
/// </summary>
private Citizen Citizen { get; set; } = default!;
/// <summary>
/// Retrieve the success story
/// </summary>
/// <param name="errors">The error collection via which errors will be reported</param>
public async Task RetrieveStory(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var story = await ServerApi.RetrieveOne<Success>(http, $"success/{Id}");
if (story.IsOk)
{
if (story.Ok == null)
{
errors.Add($"Success story {Id} not found");
}
else
{
Story = story.Ok;
var citizen = await ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{Story.CitizenId}");
if (citizen.IsOk)
{
if (citizen.Ok == null)
{
errors.Add($"Citizen ID {Story.CitizenId} not found");
}
else
{
Citizen = citizen.Ok;
}
}
else
{
errors.Add(citizen.Error);
}
}
}
else
{
errors.Add(story.Error);
}
}
}
}

View File

@ -1,38 +0,0 @@
@page "/terms-of-service"
<PageTitle Title="Terms of Service" />
<h3>Terms of Service</h3>
<p><em>(as of February 6<sup>th</sup>, 2021)</em></p>
<h4>Acceptance of Terms</h4>
<p>
By accessing this web site, you are agreeing to be bound by these Terms and Conditions, and that you are responsible
to ensure that your use of this site complies with all applicable laws. Your continued use of this site implies your
acceptance of these terms.
</p>
<h4>Description of Service and Registration</h4>
<p>
Jobs, Jobs, Jobs is a service that allows individuals to enter and amend employment profiles, restricting access to
the details of these profiles to other users of <a href="https://noagendasocial.com">No Agenda Social</a>.
Registration is accomplished by allowing Jobs, Jobs, Jobs to read one&rsquo;s No Agenda Social profile. See our
<a href="/privacy-policy">privacy policy</a> for details on the personal (user) information we maintain.
</p>
<h4>Liability</h4>
<p>
This service is provided &ldquo;as is&rdquo;, and no warranty (express or implied) exists. The service and its
developers may not be held liable for any damages that may arise through the use of this service.
</p>
<h4>Updates to Terms</h4>
<p>
These terms and conditions may be updated at any time. When these terms are updated, users will be notified via a
notice on the dashboard page. Additionally, the date at the top of this page will be updated, and any substantive
updates will also be accompanied by a summary of those changes.
</p>
<hr>
<p>You may also wish to review our <a href="/privacy-policy">privacy policy</a> to learn how we handle your data.</p>

View File

@ -1,27 +0,0 @@
using Blazored.Toast;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using NodaTime;
using NodaTime.Serialization.SystemTextJson;
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddSingleton(new AppState());
builder.Services.AddSingleton(new JsonSerializerOptions().ConfigureForNodaTime(DateTimeZoneProviders.Tzdb));
builder.Services.AddBlazoredToast();
await builder.Build().RunAsync();
}
}
}

View File

@ -1,30 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:49363",
"sslPort": 44308
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"JobsJobsJobs": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -1,181 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using NodaTime;
using NodaTime.Serialization.SystemTextJson;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client
{
/// <summary>
/// Functions used to access the API
/// </summary>
public static class ServerApi
{
/// <summary>
/// System.Text.Json options configured for NodaTime
/// </summary>
private static readonly JsonSerializerOptions _serializerOptions;
/// <summary>
/// Static constructor
/// </summary>
static ServerApi()
{
var options = new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};
options.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
_serializerOptions = options;
}
/// <summary>
/// Create an API URL
/// </summary>
/// <param name="url">The URL to append to the API base URL</param>
/// <returns>The full URL to be used in HTTP requests</returns>
private static string ApiUrl(string url) => $"/api/{url}";
/// <summary>
/// Create an HTTP request with an authorization header
/// </summary>
/// <param name="state">The current application state</param>
/// <param name="url">The URL for the request (will be appended to the API root)</param>
/// <param name="method">The request method (optional, defaults to GET)</param>
/// <returns>A request with the header attached, ready for further manipulation</returns>
private static HttpRequestMessage WithHeader(AppState state, string url, HttpMethod? method = null)
{
var req = new HttpRequestMessage(method ?? HttpMethod.Get, ApiUrl(url));
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", state.Jwt);
return req;
}
/// <summary>
/// Set the JSON Web Token (JWT) bearer header for the given HTTP client
/// </summary>
/// <param name="http">The HTTP client whose authentication header should be set</param>
/// <param name="state">The current application state</param>
public static void SetJwt(HttpClient http, AppState state)
{
if (state.User != null)
{
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", state.Jwt);
}
}
/// <summary>
/// Log on a user with the authorization code received from No Agenda Social
/// </summary>
/// <param name="http">The HTTP client to use for server communication</param>
/// <param name="authCode">The authorization code received from NAS</param>
/// <returns>The log on details if successful, an error if not</returns>
public static async Task<Result<LogOnSuccess>> LogOn(HttpClient http, string authCode)
{
try
{
var logOn = await http.GetFromJsonAsync<LogOnSuccess>(ApiUrl($"citizen/log-on/{authCode}"));
if (logOn == null) {
return Result<LogOnSuccess>.AsError(
"Unable to log on with No Agenda Social. This should never happen; contact @danieljsummers");
}
return Result<LogOnSuccess>.AsOk(logOn);
}
catch (HttpRequestException ex)
{
return Result<LogOnSuccess>.AsError($"Unable to log on with No Agenda Social: {ex.Message}");
}
}
/// <summary>
/// Retrieve a citizen's profile
/// </summary>
/// <param name="http">The HTTP client to use for server communication</param>
/// <param name="state">The current application state</param>
/// <returns>The citizen's profile, null if it is not found, or an error message if one occurs</returns>
public static async Task<Result<Profile?>> RetrieveProfile(HttpClient http, AppState state)
{
var req = WithHeader(state, "profile/");
var res = await http.SendAsync(req);
return true switch
{
_ when res.StatusCode == HttpStatusCode.NoContent => Result<Profile?>.AsOk(null),
_ when res.IsSuccessStatusCode => Result<Profile?>.AsOk(
await res.Content.ReadFromJsonAsync<Profile>(_serializerOptions)),
_ => Result<Profile?>.AsError(await res.Content.ReadAsStringAsync()),
};
}
/// <summary>
/// Retrieve all continents
/// </summary>
/// <param name="http">The HTTP client to use for server communication</param>
/// <param name="state">The current application state</param>
/// <returns>The continents, or an error message if one occurs</returns>
public static async Task<Result<IEnumerable<Continent>>> AllContinents(HttpClient http, AppState state)
{
var req = WithHeader(state, "continent/all");
var res = await http.SendAsync(req);
if (res.IsSuccessStatusCode) {
var continents = await res.Content.ReadFromJsonAsync<IEnumerable<Continent>>();
return Result<IEnumerable<Continent>>.AsOk(continents ?? Enumerable.Empty<Continent>());
}
return Result<IEnumerable<Continent>>.AsError(await res.Content.ReadAsStringAsync());
}
/// <summary>
/// Retrieve many items from the given URL
/// </summary>
/// <typeparam name="T">The type of item expected</typeparam>
/// <param name="http">The HTTP client to use for server communication</param>
/// <param name="url">The API URL to call</param>
/// <returns>A result with the items, or an error if one occurs</returns>
/// <remarks>The caller is responsible for setting the JWT on the HTTP client</remarks>
public static async Task<Result<IEnumerable<T>>> RetrieveMany<T>(HttpClient http, string url)
{
try
{
var results = await http.GetFromJsonAsync<IEnumerable<T>>($"/api/{url}", _serializerOptions);
return Result<IEnumerable<T>>.AsOk(results ?? Enumerable.Empty<T>());
}
catch (HttpRequestException ex)
{
return Result<IEnumerable<T>>.AsError(ex.Message);
}
catch (JsonException ex)
{
return Result<IEnumerable<T>>.AsError($"Unable to parse result: {ex.Message}");
}
}
/// <summary>
/// Retrieve one item from the given URL
/// </summary>
/// <typeparam name="T">The type of item expected</typeparam>
/// <param name="http">The HTTP client to use for server communication</param>
/// <param name="url">The API URL to call</param>
/// <returns>A result with the item (possibly null), or an error if one occurs</returns>
/// <remarks>The caller is responsible for setting the JWT on the HTTP client</remarks>
public static async Task<Result<T?>> RetrieveOne<T>(HttpClient http, string url)
{
try
{
return Result<T?>.AsOk(await http.GetFromJsonAsync<T>($"/api/{url}", _serializerOptions));
}
catch (HttpRequestException ex)
{
return Result<T?>.AsError(ex.Message);
}
catch (JsonException ex)
{
return Result<T?>.AsError($"Unable to parse result: {ex.Message}");
}
}
}
}

View File

@ -1,25 +0,0 @@
<div class="card">
<div class="card-header">
<a href="#" class="@(Collapsed ? "jjj-c-collapsed" : "jjj-c-open")"
@onclick=@Toggle @onclick:preventDefault>
@HeaderText
</a>
</div>
@if (!Collapsed)
{
<div class="card-body">@ChildContent</div>
}
</div>
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public bool Collapsed { get; set; } = false;
[Parameter]
public string HeaderText { get; set; } = "Toggle";
private void Toggle() => Collapsed = !Collapsed;
}

View File

@ -1,16 +0,0 @@
a.jjj-c-collapsed,
a.jjj-c-open {
text-decoration: none;
font-weight: bold;
color: black;
}
a.jjj-c-collapsed:hover,
a.jjj-c-open:hover {
cursor: pointer;
}
.jjj-c-collapsed::before {
content: '\2b9e \00a0';
}
.jjj-c-open::before {
content: '\2b9f \00a0';
}

View File

@ -1,22 +0,0 @@
@if (Errors.Count == 0)
{
@ChildContent
}
else
{
<p>The following error@(Errors.Count == 1 ? "" : "s") occurred:</p>
<ul>
@foreach (var msg in Errors)
{
<li><pre>@msg</pre></li>
}
</ul>
}
@code {
[Parameter]
public ICollection<string> Errors { get; set; } = default!;
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
}

View File

@ -1,4 +0,0 @@
@inject IJSRuntime js
@inject AppState state
@Translated

View File

@ -1,30 +0,0 @@
using Microsoft.AspNetCore.Components;
using NodaTime;
using NodaTime.Text;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Shared
{
public partial class FullDate : ComponentBase
{
/// <summary>
/// The pattern with which dates will be formatted
/// </summary>
private static readonly ZonedDateTimePattern Pattern =
ZonedDateTimePattern.CreateWithCurrentCulture("ld<MMMM d, yyyy>", DateTimeZoneProviders.Tzdb);
/// <summary>
/// The date to be formatted
/// </summary>
[Parameter]
public Instant TheDate { get; set; }
/// <summary>
/// The formatted date
/// </summary>
private string Translated { get; set; } = "";
protected override async Task OnInitializedAsync() =>
Translated = Pattern.Format(TheDate.InZone(await state.GetTimeZone(js)));
}
}

View File

@ -1,4 +0,0 @@
@inject IJSRuntime js
@inject AppState state
@Translated

View File

@ -1,30 +0,0 @@
using Microsoft.AspNetCore.Components;
using NodaTime;
using NodaTime.Text;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Shared
{
public partial class FullDateTime : ComponentBase
{
/// <summary>
/// The pattern with which dates will be formatted
/// </summary>
private static readonly ZonedDateTimePattern Pattern =
ZonedDateTimePattern.CreateWithCurrentCulture("ld<D> ' at ' lt<t>", DateTimeZoneProviders.Tzdb);
/// <summary>
/// The date to be formatted
/// </summary>
[Parameter]
public Instant TheDate { get; set; }
/// <summary>
/// The formatted date
/// </summary>
private string Translated { get; set; } = "";
protected override async Task OnInitializedAsync() =>
Translated = Pattern.Format(TheDate.InZone(await state.GetTimeZone(js)));
}
}

View File

@ -1,10 +0,0 @@
@if (IsLoading)
{
<p>@Message</p>
}
else
{
<ErrorList Errors=@ErrorMessages>
@ChildContent
</ErrorList>
}

View File

@ -1,56 +0,0 @@
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Shared
{
public partial class Loading : ComponentBase
{
/// <summary>
/// The delegate to call to load the data for this page
/// </summary>
[Parameter]
public EventCallback<ICollection<string>> OnLoad { get; set; }
/// <summary>
/// The message to display when the page is loading (optional)
/// </summary>
[Parameter]
public MarkupString Message { get; set; } = new MarkupString("Loading&hellip;");
/// <summary>
/// The content to be displayed once the data has been loaded
/// </summary>
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
/// <summary>
/// Error messages that may arise from the data loading delegate
/// </summary>
private ICollection<string> ErrorMessages { get; set; } = new List<string>();
/// <summary>
/// Whether we are currently loading data
/// </summary>
private bool IsLoading { get; set; } = true;
protected override async Task OnInitializedAsync()
{
if (OnLoad.HasDelegate)
{
try
{
await OnLoad.InvokeAsync(ErrorMessages);
}
finally
{
IsLoading = false;
}
}
else
{
IsLoading = false;
}
}
}
}

View File

@ -1,43 +0,0 @@
@inherits LayoutComponentBase
@using Blazored.Toast.Configuration
@inject IJSRuntime js
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<div class="main">
<div class="top-row px-4">
<em>(&hellip;and Jobs - <a class="audio" @onclick="PlayJobs">Let's Vote for Jobs!</a>)</em>
</div>
<div class="content px-4">
@Body
</div>
<audio id="pelosijobs">
<source src="/audio/pelosi-jobs.mp3">
</audio>
<div class="app-version">
Jobs, Jobs, Jobs @AppState.Version.Value &bull; <a href="/privacy-policy">Privacy Policy</a>
&bull; <a href="/terms-of-service">Terms of Service</a>
</div>
</div>
</div>
@if (InitToasts)
{
<BlazoredToasts Position="ToastPosition.BottomRight"
ShowProgressBar="true" />
}
@code {
bool InitToasts = false;
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");
protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);
if (!InitToasts) InitToasts = true;
}
}

View File

@ -1,86 +0,0 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
.main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, darkgreen 0%, green 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
color: rgba(0, 0, 0, .5);
}
.top-row ::deep a, .top-row .btn-link {
white-space: nowrap;
/* margin-left: 1.5rem; */
}
.top-row a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}
.top-row.auth {
justify-content: space-between;
}
.top-row a, .top-row .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.main > div {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
.app-version {
padding-top: 2rem;
text-align: right;
color: rgba(0, 0, 0, .25);
font-style: italic;
font-size: .8rem;
}
.app-version a:link,
.app-version a:visited {
color: rgba(0, 0, 0, .25);
}
.app-version a:hover {
text-decoration: underline;
}

View File

@ -1,15 +0,0 @@
<nav class="nav nav-pills">
<a href="#" class="nav-link @MarkdownClass" @onclick="ShowMarkdown" @onclick:preventDefault>Markdown</a>
<a href="#" class="nav-link @PreviewClass" @onclick="ShowPreview" @onclick:preventDefault>Preview</a>
</nav>
@if (_showPreview)
{
<section class="preview">
@PreviewText
</section>
}
else
{
<textarea id="@Id" @bind="@PlainText" @bind:event="oninput" class="form-control" rows="10">
</textarea>
}

View File

@ -1,88 +0,0 @@
using Markdig;
using Microsoft.AspNetCore.Components;
namespace JobsJobsJobs.Client.Shared
{
/// <summary>
/// Code-behind for the Markdown Editor component
/// </summary>
public partial class MarkdownEditor : ComponentBase
{
/// <summary>
/// Pipeline with most extensions enabled
/// </summary>
private readonly MarkdownPipeline _pipeline = new MarkdownPipelineBuilder()
.UseSmartyPants().UseAdvancedExtensions().Build();
/// <summary>
/// Whether the preview should be shown
/// </summary>
private bool _showPreview = false;
/// <summary>
/// Backing field for the plain-text representation of this document
/// </summary>
private string _text = "";
/// <summary>
/// The plain-text (Markdown source)
/// </summary>
private string PlainText {
get => _text;
set
{
_text = value;
TextChanged.InvokeAsync(_text).ConfigureAwait(false).GetAwaiter().GetResult();
}
}
/// <summary>
/// The rendered HTML
/// </summary>
private MarkupString PreviewText => (MarkupString)Markdown.ToHtml(_text, _pipeline);
/// <summary>
/// CSS class for the "Markdown" tab (active if preview not shown)
/// </summary>
private string MarkdownClass => _showPreview ? "" : "active";
/// <summary>
/// CSS class for the "Preview" tab (active if preview shown)
/// </summary>
private string PreviewClass => _showPreview ? "active" : "";
/// <summary>
/// The ID used for the textarea; allows for a label to be assigned
/// </summary>
[Parameter]
public string Id { get; set; } = "";
/// <summary>
/// The text value of the Markdown
/// </summary>
[Parameter]
public string Text { get; set; } = "";
/// <summary>
/// Event fired when the text is changed
/// </summary>
[Parameter]
public EventCallback<string> TextChanged { get; set; }
protected override void OnInitialized()
{
base.OnInitialized();
_text = Text;
}
/// <summary>
/// Show the Markdown editor
/// </summary>
private void ShowMarkdown() => _showPreview = false;
/// <summary>
/// Show the Markdown preview
/// </summary>
private void ShowPreview() => _showPreview = true;
}
}

View File

@ -1,5 +0,0 @@
section.preview {
border: solid 1px darkgray;
border-radius: .5rem;
padding: .25rem;
}

View File

@ -1,121 +0,0 @@
@inject AppState state
@inject NavigationManager nav
@implements IDisposable
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">Jobs, Jobs, Jobs</a>
<button class="navbar-toggler" @onclick=@ToggleNavMenu>
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="@NavMenuCssClass" @onclick=@ToggleNavMenu>
<ul class="nav flex-column">
@if (state.User == null)
{
<li class="nav-item px-3">
<NavLink class="nav-link" href="" Match=@NavLinkMatch.All>
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="/profile/seeking">
<span class="oi oi-spreadsheet" aria-hidden="true"></span> Job Seekers
</NavLink>
</li>
<li class="nav-item px-3">
<a class="nav-link" href="@AuthUrl">
<span class="oi oi-account-login" aria-hidden="true"></span> Log On
</a>
</li>
}
else
{
<li class="nav-item px-3">
<NavLink class="nav-link" href="/citizen/dashboard">
<span class="oi oi-dashboard" aria-hidden="true"></span> Dashboard
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="/citizen/profile">
<span class="oi oi-pencil" aria-hidden="true"></span> My Profile
</NavLink>
</li>
<li class="nav-item separator px-3">
<NavLink class="nav-link" href="/profile/search">
<span class="oi oi-spreadsheet" aria-hidden="true"></span> View Profiles
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="/listings/mine">
<span class="oi oi-signpost" aria-hidden="true"></span> My Job Listings
</NavLink>
</li>
<li class="nav-item separator px-3">
<NavLink class="nav-link" href="/listings/search">
<span class="oi oi-excerpt" aria-hidden="true"></span> View Listings
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="/success-story/list">
<span class="oi oi-graph" aria-hidden="true"></span> Success Stories
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="/citizen/log-off">
<span class="oi oi-account-logout" aria-hidden="true"></span> Log Off
</NavLink>
</li>
}
<li class="nav-item px-3">
<NavLink class="nav-link" href="/how-it-works">
<span class="oi oi-question-mark" aria-hidden="true"></span> How It Works
</NavLink>
</li>
</ul>
</div>
@code {
protected override void OnInitialized()
{
base.OnInitialized();
state.OnChange += StateHasChanged;
}
/// <summary>
/// The client ID for Jobs, Jobs, Jobs at No Agenda Social
/// </summary>
// TODO: move to config
private readonly string _clientId = "k_06zlMy0N451meL4AqlwMQzs5PYr6g3d2Q_dCT-OjU";
/// <summary>
/// The authorization URL to which the user should be directed
/// </summary>
private string AuthUrl
{
get
{
var client = $"client_id={_clientId}";
var scope = "scope=read:accounts";
var redirect = $"redirect_uri=https://{new Uri(nav.Uri).Authority}/citizen/authorized";
var respType = "response_type=code";
// TODO: move NAS base URL to config
return $"https://noagendasocial.com/oauth/authorize?{client}&{scope}&{redirect}&{respType}";
}
}
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
public void Dispose()
{
state.OnChange -= StateHasChanged;
}
}

View File

@ -1,65 +0,0 @@
.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
color: white;
}
.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
.nav-item.separator {
border-bottom: solid 1px white;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
}

View File

@ -1,11 +0,0 @@
@inject IJSRuntime js
@code {
[Parameter]
public string Title { get; set; } = default!;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
await js.InvokeVoidAsync("setPageTitle", $"{Title} ~ Jobs, Jobs, Jobs");
}
}

View File

@ -1,60 +0,0 @@
@using JobsJobsJobs.Shared.Api
<EditForm Model=@Criteria OnValidSubmit=@OnSearch>
<div class="form-row">
<div class="col col-12 col-sm-6 col-md-4 col-lg-3">
<label for="continentId" class="jjj-label">Continent</label>
<InputSelect id="continentId" @bind-Value=@Criteria.ContinentId class="form-control form-control-sm">
<option value="">&ndash; Any &ndash;</option>
@foreach (var (id, name) in Continents)
{
<option value="@id">@name</option>
}
</InputSelect>
</div>
<div class="col col-12 col-sm-6 offset-md-2 col-lg-3 offset-lg-0">
<label class="jjj-label">Seeking Remote Work?</label><br>
<InputRadioGroup @bind-Value=@Criteria.RemoteWork>
<div class="form-check form-check-inline">
<InputRadio id="remoteNull" Value=@("") class="form-check-input" />
<label for="remoteNull" class="form-check-label">No Selection</label>
</div>
<div class="form-check form-check-inline">
<InputRadio id="remoteYes" Value=@("yes") class="form-check-input" />
<label for="remoteYes" class="form-check-label">Yes</label>
</div>
<div class="form-check form-check-inline">
<InputRadio id="remoteNo" Value=@("no") class="form-check-input" />
<label for="remoteNo" class="form-check-label">No</label>
</div>
</InputRadioGroup>
</div>
<div class="col col-12 col-sm-6 col-lg-3">
<label for="skillSearch" class="jjj-label">Skill</label>
<InputText id="skillSearch" @bind-Value=@Criteria.Skill class="form-control form-control-sm"
placeholder="(free-form text)" />
</div>
<div class="col col-12 col-sm-6 col-lg-3">
<label for="bioSearch" class="jjj-label">Bio / Experience</label>
<InputText id="bioSearch" @bind-Value=@Criteria.BioExperience class="form-control form-control-sm"
placeholder="(free-form text)" />
</div>
</div>
<div class="form-row">
<div class="col">
<br>
<button type="submit" class="btn btn-sm btn-outline-primary">Search</button>
</div>
</div>
</EditForm>
@code {
[Parameter]
public ProfileSearch Criteria { get; set; } = default!;
[Parameter]
public EventCallback OnSearch { get; set; } = default!;
[Parameter]
public IEnumerable<Continent> Continents { get; set; } = default!;
}

View File

@ -1,60 +0,0 @@
@using JobsJobsJobs.Shared.Api
<EditForm Model=@Criteria OnValidSubmit=@OnSearch>
<div class="form-row">
<div class="col col-12 col-sm-6 col-md-4 col-lg-3">
<label for="continentId" class="jjj-label">Continent</label>
<InputSelect id="continentId" @bind-Value=@Criteria.ContinentId class="form-control form-control-sm">
<option value="">&ndash; Any &ndash;</option>
@foreach (var (id, name) in Continents)
{
<option value="@id">@name</option>
}
</InputSelect>
</div>
<div class="col col-12 col-sm-6 col-md-4 col-lg-3">
<label for="region" class="jjj-label">Region</label>
<InputText id="region" @bind-Value=@Criteria.Region class="form-control form-control-sm"
placeholder="(free-form text)" />
</div>
<div class="col col-12 col-sm-6 offset-md-2 col-lg-3 offset-lg-0">
<label class="jjj-label">Seeking Remote Work?</label><br>
<InputRadioGroup @bind-Value=@Criteria.RemoteWork>
<div class="form-check form-check-inline">
<InputRadio id="remoteNull" Value=@("") class="form-check-input" />
<label for="remoteNull" class="form-check-label">No Selection</label>
</div>
<div class="form-check form-check-inline">
<InputRadio id="remoteYes" Value=@("yes") class="form-check-input" />
<label for="remoteYes" class="form-check-label">Yes</label>
</div>
<div class="form-check form-check-inline">
<InputRadio id="remoteNo" Value=@("no") class="form-check-input" />
<label for="remoteNo" class="form-check-label">No</label>
</div>
</InputRadioGroup>
</div>
<div class="col col-12 col-sm-6 col-lg-3">
<label for="skillSearch" class="jjj-label">Skill</label>
<InputText id="skillSearch" @bind-Value=@Criteria.Skill class="form-control form-control-sm"
placeholder="(free-form text)" />
</div>
</div>
<div class="form-row">
<div class="col">
<br>
<button type="submit" class="btn btn-sm btn-outline-primary">Search</button>
</div>
</div>
</EditForm>
@code {
[Parameter]
public PublicSearch Criteria { get; set; } = default!;
[Parameter]
public EventCallback OnSearch { get; set; } = default!;
[Parameter]
public IEnumerable<Continent> Continents { get; set; } = default!;
}

View File

@ -1,22 +0,0 @@
<div class="form-row">
<div class="col col-xs-2 col-sm-2 col-md-1">
<br>
<button type="button" class="btn btn-outline-danger" title="Delete" @onclick="@RemoveMe">&minus;</button>
</div>
<div class="col col-xs-10 col-sm-10 col-md-6">
<div class="form-group">
<label for="skillDesc@(Skill.Id)" class="jjj-label">Skill</label>
<input type="text" id="skillDesc@(Skill.Id)" @bind="@Skill.Description" class="form-control" maxlength="100"
placeholder="A skill (language, design technique, process, etc.)">
<ValidationMessage For="@(() => Skill.Description)" />
</div>
</div>
<div class="col col-xs-12 col-sm-12 col-md-5">
<div class="form-group">
<label for="skillNotes@(Skill.Id)" class="jjj-label">Notes</label>
<input type="text" id="skillNotes@(Skill.Id)" @bind="@Skill.Notes" class="form-control" maxlength="100"
placeholder="A further description of the skill (100 characters max)">
<ValidationMessage For="@(() => Skill.Notes)" />
</div>
</div>
</div>

View File

@ -1,29 +0,0 @@
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Shared
{
/// <summary>
/// A component that allows a skill to be edited
/// </summary>
public partial class SkillEdit : ComponentBase
{
/// <summary>
/// The skill being edited
/// </summary>
[Parameter]
public SkillForm Skill { get; set; } = default!;
/// <summary>
/// Callback used if the remove button is clicked
/// </summary>
[Parameter]
public EventCallback<string> OnRemove { get; set; } = default!;
/// <summary>
/// Remove this skill from the skill collection
/// </summary>
private Task RemoveMe() => OnRemove.InvokeAsync(Skill.Id);
}
}

View File

@ -1,14 +0,0 @@
@using Blazored.Toast
@using Blazored.Toast.Services
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.AspNetCore.WebUtilities
@using Microsoft.JSInterop
@using JobsJobsJobs.Client
@using JobsJobsJobs.Client.Shared
@using JobsJobsJobs.Shared

View File

@ -1,72 +0,0 @@
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
a, .btn-link {
color: #0366d6;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.content {
padding-top: 1.1rem;
}
.valid.modified:not([type=checkbox]) {
outline: 1px solid #26b050;
}
.invalid {
outline: 1px solid red;
}
.validation-message {
color: red;
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
a.audio {
color: inherit;
border-bottom: dotted 1px lightgray;
}
a.audio:hover {
cursor: pointer;
}
label.jjj-required {
font-weight:bold;
}
label.jjj-required::after {
color: red;
content: ' *';
}
label.jjj-label,
::placeholder {
font-style: italic;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,86 +0,0 @@
SIL OPEN FONT LICENSE Version 1.1
Copyright (c) 2014 Waybury
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2014 Waybury
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,114 +0,0 @@
[Open Iconic v1.1.1](http://useiconic.com/open)
===========
### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint&mdash;ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
## What's in Open Iconic?
* 223 icons designed to be legible down to 8 pixels
* Super-light SVG files - 61.8 for the entire set
* SVG sprite&mdash;the modern replacement for icon fonts
* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px.
## Getting Started
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
### General Usage
#### Using Open Iconic's SVGs
We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute).
```
<img src="/open-iconic/svg/icon-name.svg" alt="icon name">
```
#### Using Open Iconic's SVG Sprite
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for each different icon in the* `<use>` *tag.*
```
<svg class="icon">
<use xlink:href="open-iconic.svg#account-login" class="icon-account-login"></use>
</svg>
```
Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `<svg>` tag with equal width and height dimensions.
```
.icon {
width: 16px;
height: 16px;
}
```
Coloring icons is even easier. All you need to do is set the `fill` rule on the `<use>` tag.
```
.icon-account-login {
fill: #f00;
}
```
To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/).
#### Using Open Iconic's Icon Font...
##### …with Bootstrap
You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}`
```
<link href="/open-iconic/font/css/open-iconic-bootstrap.css" rel="stylesheet">
```
```
<span class="oi oi-icon-name" title="icon name" aria-hidden="true"></span>
```
##### …with Foundation
You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}`
```
<link href="/open-iconic/font/css/open-iconic-foundation.css" rel="stylesheet">
```
```
<span class="fi-icon-name" title="icon name" aria-hidden="true"></span>
```
##### …on its own
You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}`
```
<link href="/open-iconic/font/css/open-iconic.css" rel="stylesheet">
```
```
<span class="oi" data-glyph="icon-name" title="icon name" aria-hidden="true"></span>
```
## License
### Icons
All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT).
### Fonts
All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web).

File diff suppressed because one or more lines are too long

View File

@ -1,543 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2014-7-1: Created.
-->
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014
By P.J. Onori
Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net)
</metadata>
<defs>
<font id="open-iconic" horiz-adv-x="800" >
<font-face
font-family="Icons"
font-weight="400"
font-stretch="normal"
units-per-em="800"
panose-1="2 0 5 3 0 0 0 0 0 0"
ascent="800"
descent="0"
bbox="-0.5 -101 802 800.126"
underline-thickness="50"
underline-position="-100"
unicode-range="U+E000-E0DE"
/>
<missing-glyph />
<glyph glyph-name="" unicode="&#xe000;"
d="M300 700h500v-700h-500v100h400v500h-400v100zM400 500l200 -150l-200 -150v100h-400v100h400v100z" />
<glyph glyph-name="1" unicode="&#xe001;"
d="M300 700h500v-700h-500v100h400v500h-400v100zM200 500v-100h400v-100h-400v-100l-200 150z" />
<glyph glyph-name="2" unicode="&#xe002;"
d="M350 700c193 0 350 -157 350 -350v-50h100l-200 -200l-200 200h100v50c0 138 -112 250 -250 250s-250 -112 -250 -250c0 193 157 350 350 350z" />
<glyph glyph-name="3" unicode="&#xe003;"
d="M450 700c193 0 350 -157 350 -350c0 138 -112 250 -250 250s-250 -112 -250 -250v-50h100l-200 -200l-200 200h100v50c0 193 157 350 350 350z" />
<glyph glyph-name="4" unicode="&#xe004;"
d="M0 700h800v-100h-800v100zM100 500h600v-100h-600v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
<glyph glyph-name="5" unicode="&#xe005;"
d="M0 700h800v-100h-800v100zM0 500h600v-100h-600v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
<glyph glyph-name="6" unicode="&#xe006;"
d="M0 700h800v-100h-800v100zM200 500h600v-100h-600v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
<glyph glyph-name="7" unicode="&#xe007;"
d="M400 700c75 0 146 -23 206 -59l-75 -225l-322 234c57 31 122 50 191 50zM125 588l191 -138l-310 -222c-4 24 -6 47 -6 72c0 114 49 215 125 288zM688 575c69 -72 112 -168 112 -275c0 -35 -8 -68 -16 -100h-218zM216 253l112 -347c-128 23 -232 109 -287 222zM372 100
h372c-64 -109 -177 -185 -310 -197z" />
<glyph glyph-name="8" unicode="&#xe008;" horiz-adv-x="600"
d="M200 800h100v-500h200l-247 -300l-253 300h200v500z" />
<glyph glyph-name="9" unicode="&#xe009;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 700v-300h-200l300 -300l300 300h-200v300h-200z" />
<glyph glyph-name="a" unicode="&#xe00a;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300l300 -300v200h300v200h-300v200z" />
<glyph glyph-name="b" unicode="&#xe00b;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700v-200h-300v-200h300v-200l300 300z" />
<glyph glyph-name="c" unicode="&#xe00c;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300h200v-300h200v300h200z" />
<glyph glyph-name="d" unicode="&#xe00d;"
d="M300 600v-200h500v-100h-500v-200l-300 247z" />
<glyph glyph-name="e" unicode="&#xe00e;"
d="M500 600l300 -247l-300 -253v200h-500v100h500v200z" />
<glyph glyph-name="f" unicode="&#xe00f;" horiz-adv-x="600"
d="M200 800h200v-500h200l-297 -300l-303 300h200v500z" />
<glyph glyph-name="10" unicode="&#xe010;"
d="M300 700v-200h500v-200h-500v-200l-300 297z" />
<glyph glyph-name="11" unicode="&#xe011;"
d="M500 700l300 -297l-300 -303v200h-500v200h500v200z" />
<glyph glyph-name="12" unicode="&#xe012;" horiz-adv-x="600"
d="M297 800l303 -300h-200v-500h-200v500h-200z" />
<glyph glyph-name="13" unicode="&#xe013;" horiz-adv-x="600"
d="M247 800l253 -300h-200v-500h-100v500h-200z" />
<glyph glyph-name="14" unicode="&#xe014;"
d="M400 800h100v-800h-100v800zM200 700h100v-600h-100v600zM600 600h100v-400h-100v400zM0 500h100v-200h-100v200z" />
<glyph glyph-name="15" unicode="&#xe015;"
d="M116 600l72 -72c-54 -54 -88 -126 -88 -209s34 -159 88 -213l-72 -72c-72 72 -116 175 -116 285s44 209 116 281zM684 600c72 -72 116 -171 116 -281s-44 -213 -116 -285l-72 72c54 54 88 130 88 213s-34 155 -88 209zM259 460l69 -72c-18 -18 -28 -41 -28 -69
s10 -54 28 -72l-69 -72c-36 36 -59 89 -59 144s23 105 59 141zM541 459c36 -36 59 -85 59 -140s-23 -108 -59 -144l-69 72c18 18 28 44 28 72s-10 51 -28 69z" />
<glyph glyph-name="16" unicode="&#xe016;" horiz-adv-x="400"
d="M200 800c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM100 319c31 -11 65 -19 100 -19s68 8 100 19v-319l-100 100l-100 -100v319z" />
<glyph glyph-name="17" unicode="&#xe017;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300c0 -66 21 -126 56 -175l419 419c-49 35 -109 56 -175 56zM644 575l-419 -419c49 -35 109 -56 175 -56c166 0 300 134 300 300
c0 66 -21 126 -56 175z" />
<glyph glyph-name="18" unicode="&#xe018;"
d="M0 700h100v-600h700v-100h-800v700zM500 700h200v-500h-200v500zM200 500h200v-300h-200v300z" />
<glyph glyph-name="19" unicode="&#xe019;"
d="M397 800c13 1 23 -4 34 -13c2 -2 214 -254 241 -287h128v-100h-100v-366c0 -18 -16 -34 -34 -34h-532c-18 0 -34 16 -34 34v366h-100v100h128l234 281c9 11 22 18 35 19zM400 672l-144 -172h288zM250 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50
v100c0 28 -22 50 -50 50zM550 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50v100c0 28 -22 50 -50 50z" />
<glyph glyph-name="1a" unicode="&#xe01a;"
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9zM100 600v-400h500v400h-500z" />
<glyph glyph-name="1b" unicode="&#xe01b;"
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9z" />
<glyph glyph-name="1c" unicode="&#xe01c;"
d="M92 650c0 23 19 50 45 50h3h5h5h500c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-141c9 -17 120 -231 166 -309c16 -26 34 -61 34 -106c0 -39 -15 -77 -41 -103h-3c-26 -25 -62 -41 -100 -41h-512c-39 0 -77 15 -103 41s-41 64 -41 103c0 46 18 80 34 106
c46 78 157 292 166 309v141h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51zM500 600h-200v-162l-6 -10s-63 -123 -119 -228h450c-56 105 -119 228 -119 228l-6 10v162z" />
<glyph glyph-name="1d" unicode="&#xe01d;"
d="M400 800c110 0 200 -90 200 -200c0 -104 52 -198 134 -266c41 -34 66 -82 66 -134h-800c0 52 25 100 66 134c82 68 134 162 134 266c0 110 90 200 200 200zM300 100h200c0 -55 -45 -100 -100 -100s-100 45 -100 100z" />
<glyph glyph-name="1e" unicode="&#xe01e;" horiz-adv-x="600"
d="M150 800h50l350 -250l-225 -147l225 -153l-350 -250h-50v250l-75 -75l-75 75l150 150l-150 150l75 75l75 -75v250zM250 650v-200l150 100zM250 350v-200l150 100z" />
<glyph glyph-name="1f" unicode="&#xe01f;"
d="M0 800h500c110 0 200 -90 200 -200c0 -47 -17 -91 -44 -125c85 -40 144 -125 144 -225c0 -138 -112 -250 -250 -250h-550v100c55 0 100 45 100 100v400c0 55 -45 100 -100 100v100zM300 700v-200h100c55 0 100 45 100 100s-45 100 -100 100h-100zM300 400v-300h150
c83 0 150 67 150 150s-67 150 -150 150h-150z" />
<glyph glyph-name="20" unicode="&#xe020;" horiz-adv-x="600"
d="M300 800v-300h200l-300 -500v300h-200z" />
<glyph glyph-name="21" unicode="&#xe021;"
d="M100 800h300v-300l100 100l100 -100v300h50c28 0 50 -22 50 -50v-550h-550c-28 0 -50 -22 -50 -50s22 -50 50 -50h550v-100h-550c-83 0 -150 67 -150 150v550l3 19c8 39 39 70 78 78z" />
<glyph glyph-name="22" unicode="&#xe022;" horiz-adv-x="400"
d="M0 800h400v-800l-200 200l-200 -200v800z" />
<glyph glyph-name="23" unicode="&#xe023;"
d="M0 800h800v-100h-800v100zM0 600h300v-103h203v103h297v-591c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v591z" />
<glyph glyph-name="24" unicode="&#xe024;"
d="M300 800h200c55 0 100 -45 100 -100v-100h191c6 0 9 -3 9 -9v-241c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v241c0 6 3 9 9 9h191v100c0 55 45 100 100 100zM300 700v-100h200v100h-200zM0 209c16 -6 32 -9 50 -9h700c18 0 34 3 50 9v-200c0 -6 -3 -9 -9 -9h-782
c-6 0 -9 3 -9 9v200z" />
<glyph glyph-name="25" unicode="&#xe025;" horiz-adv-x="600"
d="M300 800c58 0 110 -16 147 -53s53 -89 53 -147h-100c0 39 -11 61 -25 75s-36 25 -75 25c-35 0 -55 -10 -72 -31s-28 -55 -28 -94c0 -51 20 -107 28 -175h172v-100h-178c-14 -60 -49 -127 -113 -200h491v-100h-600v122l16 12c69 69 95 121 106 166h-122v100h125
c-8 50 -25 106 -25 175c0 58 16 114 50 156c34 43 88 69 150 69z" />
<glyph glyph-name="26" unicode="&#xe026;"
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-700c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v700v2c0 20 15 42 34 48zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50zM350 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h300c28 0 50 22 50 50
s-22 50 -50 50h-300zM100 400v-400h600v400h-600z" />
<glyph glyph-name="27" unicode="&#xe027;"
d="M744 797l6 -3l44 -44c4 -4 3 -8 0 -12l-266 -375l-15 -13l-25 -12c-23 72 -78 127 -150 150l12 25l13 15l375 266zM266 400c74 0 134 -60 134 -134c0 -147 -119 -266 -266 -266c-48 0 -95 12 -134 34c80 46 134 133 134 232c0 74 58 134 132 134z" />
<glyph glyph-name="28" unicode="&#xe028;"
d="M9 451c0 23 19 50 46 50c8 0 19 -3 26 -7l131 -66l29 22c-79 81 -1 250 118 250s197 -167 119 -250l28 -22l131 66c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-115 -56c9 -16 19 -33 25 -50h68c28 0 50 -22 50 -50s-22 -50 -50 -50h-50
c0 -23 -2 -45 -6 -66l78 -40c21 -5 37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11l-65 35c-24 -46 -62 -86 -103 -110c-35 19 -60 45 -60 72v135v4v5v6v5v5v87c0 28 -22 50 -50 50c-24 0 -45 -17 -50 -40c1 -3 1 -8 1 -11s0 -8 -1 -11v-82v-4v-5v-144
c0 -28 -24 -53 -59 -72c-41 25 -79 64 -103 110l-66 -35c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49l78 40c-4 21 -6 43 -6 66h-50h-5c-28 0 -50 22 -50 50c0 26 22 50 50 50h5h69c6 17 16 34 25 50l-116 56c-16 7 -28 27 -28 45z" />
<glyph glyph-name="29" unicode="&#xe029;"
d="M600 700h91c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-91v600zM210 503l290 147v-500l-250 125v-3c-15 0 -25 -8 -28 -22l75 -178c11 -25 0 -58 -25 -69s-58 0 -69 25l-103 272h-91c-6 0 -9 3 -9 9v182c0 6 3 9 9 9h182z" />
<glyph glyph-name="2a" unicode="&#xe02a;"
d="M9 800h682c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM100 700v-200h500v200h-500zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-300h100v300h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="2b" unicode="&#xe02b;"
d="M0 800h700v-200h-700v200zM0 500h700v-491c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v491zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="2c" unicode="&#xe02c;"
d="M409 800h182c6 0 10 -4 12 -9l94 -182c2 -5 6 -9 12 -9h82c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v441c0 83 67 150 150 150h141c6 0 10 4 12 9l94 182c2 5 6 9 12 9zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z
M500 500c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM500 400c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="2d" unicode="&#xe02d;"
d="M0 600h800l-400 -400z" />
<glyph glyph-name="2e" unicode="&#xe02e;" horiz-adv-x="400"
d="M400 800v-800l-400 400z" />
<glyph glyph-name="2f" unicode="&#xe02f;" horiz-adv-x="400"
d="M0 800l400 -400l-400 -400v800z" />
<glyph glyph-name="30" unicode="&#xe030;"
d="M400 600l400 -400h-800z" />
<glyph glyph-name="31" unicode="&#xe031;"
d="M0 550c0 23 20 50 46 50h3h5h4h200c17 0 37 -13 44 -28l38 -72h444c14 0 19 -12 15 -25l-81 -250c-4 -13 -21 -25 -35 -25h-350c-14 0 -30 12 -34 25c-27 83 -54 167 -81 250l-10 25h-150c-2 0 -5 -1 -7 -1c-28 0 -51 23 -51 51zM358 100c28 0 50 -22 50 -50
s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM658 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="32" unicode="&#xe032;"
d="M0 700h500v-100h-300v-300h-100l-100 -100v500zM300 500h500v-500l-100 100h-400v400z" />
<glyph glyph-name="33" unicode="&#xe033;"
d="M641 700l143 -141l-493 -493c-71 76 -146 148 -219 222l-72 71l141 141c50 -51 101 -101 153 -150c116 117 234 231 347 350z" />
<glyph glyph-name="34" unicode="&#xe034;"
d="M150 600l250 -250l250 250l150 -150l-400 -400l-400 400z" />
<glyph glyph-name="35" unicode="&#xe035;" horiz-adv-x="600"
d="M400 800l150 -150l-250 -250l250 -250l-150 -150l-400 400z" />
<glyph glyph-name="36" unicode="&#xe036;" horiz-adv-x="600"
d="M150 800l400 -400l-400 -400l-150 150l250 250l-250 250z" />
<glyph glyph-name="37" unicode="&#xe037;"
d="M400 600l400 -400l-150 -150l-250 250l-250 -250l-150 150z" />
<glyph glyph-name="38" unicode="&#xe038;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM600 622l-250 -250l-100 100l-72 -72l172 -172l322 322z" />
<glyph glyph-name="39" unicode="&#xe039;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM250 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
<glyph glyph-name="3a" unicode="&#xe03a;"
d="M350 800c28 0 50 -22 50 -50v-50h75c14 0 25 -11 25 -25v-75h-300v75c0 14 11 25 25 25h75v50c0 28 22 50 50 50zM25 700h75v-200h500v200h75c14 0 25 -11 25 -25v-650c0 -14 -11 -25 -25 -25h-650c-14 0 -25 11 -25 25v650c0 14 11 25 25 25z" />
<glyph glyph-name="3b" unicode="&#xe03b;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM350 600h100v-181c23 -24 47 -47 72 -69l-72 -72c-27 30 -55 59 -84 88l-16 12
v222z" />
<glyph glyph-name="3c" unicode="&#xe03c;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-191v50c0 83 -67 150 -150 150s-150 -67 -150 -150v-50h-272c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM434 400h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1
v-150h150l-200 -200l-200 200h150v150v2c0 20 15 42 34 48z" />
<glyph glyph-name="3d" unicode="&#xe03d;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-141l-200 200l-200 -200h-222c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM450 350l250 -250h-200v-50c0 -28 -22 -50 -50 -50s-50 22 -50 50v50h-200z" />
<glyph glyph-name="3e" unicode="&#xe03e;"
d="M450 700c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200s90 200 200 200c23 114 129 200 250 200z" />
<glyph glyph-name="3f" unicode="&#xe03f;"
d="M250 800c82 0 154 -40 200 -100c-143 0 -270 -85 -325 -209c-36 -10 -70 -25 -100 -47c-16 33 -25 67 -25 106c0 138 112 250 250 250zM450 600c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200
s90 200 200 200c23 114 129 200 250 200z" />
<glyph glyph-name="40" unicode="&#xe040;"
d="M500 700h100l-300 -600h-100zM100 600h100l-100 -200l100 -200h-100l-100 200zM600 600h100l100 -200l-100 -200h-100l100 200z" />
<glyph glyph-name="41" unicode="&#xe041;"
d="M350 800h100l50 -119l28 -12l119 50l72 -72l-50 -119l12 -28l119 -50v-100l-119 -50l-12 -28l50 -119l-72 -72l-119 50l-28 -12l-50 -119h-100l-50 119l-28 12l-119 -50l-72 72l50 119l-12 28l-119 50v100l119 50l12 28l-50 119l72 72l119 -50l28 12zM400 550
c-83 0 -150 -67 -150 -150s67 -150 150 -150s150 67 150 150s-67 150 -150 150z" />
<glyph glyph-name="42" unicode="&#xe042;"
d="M0 800h800v-200h-800v200zM200 500h400l-200 -200zM0 100h800v-100h-800v100z" />
<glyph glyph-name="43" unicode="&#xe043;"
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM500 600v-400l-200 200z" />
<glyph glyph-name="44" unicode="&#xe044;"
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM300 600l200 -200l-200 -200v400z" />
<glyph glyph-name="45" unicode="&#xe045;"
d="M0 800h800v-100h-800v100zM400 500l200 -200h-400zM0 200h800v-200h-800v200z" />
<glyph glyph-name="46" unicode="&#xe046;"
d="M150 700c83 0 150 -67 150 -150v-50h100v50c0 83 67 150 150 150s150 -67 150 -150s-67 -150 -150 -150h-50v-100h50c83 0 150 -67 150 -150s-67 -150 -150 -150s-150 67 -150 150v50h-100v-50c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150h50v100h-50
c-83 0 -150 67 -150 150s67 150 150 150zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h50v50c0 28 -22 50 -50 50zM550 600c-28 0 -50 -22 -50 -50v-50h50c28 0 50 22 50 50s-22 50 -50 50zM300 400v-100h100v100h-100zM150 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
s50 22 50 50v50h-50zM500 200v-50c0 -28 22 -50 50 -50s50 22 50 50s-22 50 -50 50h-50z" />
<glyph glyph-name="47" unicode="&#xe047;"
d="M0 791c0 5 4 9 9 9h782c6 0 9 -4 9 -10v-790l-200 200h-591c-6 0 -9 3 -9 9v582z" />
<glyph glyph-name="48" unicode="&#xe048;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM600 600l-100 -300l-300 -100l100 300zM400 450c-28 0 -50 -22 -50 -50
s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="49" unicode="&#xe049;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700v-600c166 0 300 134 300 300s-134 300 -300 300z" />
<glyph glyph-name="4a" unicode="&#xe04a;"
d="M0 800h800v-100h-800v100zM0 600h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100zM750 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="4b" unicode="&#xe04b;"
d="M25 700h750c14 0 25 -11 25 -25v-75h-800v75c0 14 11 25 25 25zM0 500h800v-375c0 -14 -11 -25 -25 -25h-750c-14 0 -25 11 -25 25v375zM100 300v-100h100v100h-100zM300 300v-100h100v100h-100z" />
<glyph glyph-name="4c" unicode="&#xe04c;"
d="M100 800h100v-100h450l100 100l50 -50l-100 -100v-450h100v-100h-100v-100h-100v100h-500v500h-100v100h100v100zM200 600v-350l350 350h-350zM600 550l-350 -350h350v350z" />
<glyph glyph-name="4d" unicode="&#xe04d;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z
M200 452c0 20 15 42 34 48h3h3h8c12 0 28 -7 36 -16l91 -90l25 6c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100l6 25l-90 91c-9 8 -16 24 -16 36zM550 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="4e" unicode="&#xe04e;"
d="M300 800h200v-300h200l-300 -300l-300 300h200v300zM0 100h800v-100h-800v100z" />
<glyph glyph-name="4f" unicode="&#xe04f;"
d="M0 800h800v-100h-800v100zM400 600l300 -300h-200v-300h-200v300h-200z" />
<glyph glyph-name="50" unicode="&#xe050;"
d="M200 700h600v-600h-600l-200 300zM350 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
<glyph glyph-name="51" unicode="&#xe051;"
d="M400 700c220 0 400 -180 400 -400h-100c0 166 -134 300 -300 300s-300 -134 -300 -300h-100c0 220 180 400 400 400zM341 491l59 -88l59 88c81 -25 141 -101 141 -191c0 -110 -90 -200 -200 -200s-200 90 -200 200c0 90 60 166 141 191z" />
<glyph glyph-name="52" unicode="&#xe052;"
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300zM100 600v-100h100v100h-100zM100 400v-100h100v100h-100zM100 200v-100h400v100h-400z" />
<glyph glyph-name="53" unicode="&#xe053;" horiz-adv-x="600"
d="M200 700h100v-100h75c30 0 58 -6 81 -22s44 -44 44 -78v-100h-100v94c-4 3 -13 6 -25 6h-250c-14 0 -25 -11 -25 -25v-50c0 -15 20 -40 34 -44l257 -65c66 -16 109 -73 109 -141v-50c0 -68 -57 -125 -125 -125h-75v-100h-100v100h-75c-30 0 -58 6 -81 22s-44 44 -44 78
v100h100v-94c4 -3 13 -6 25 -6h250c14 0 25 11 25 25v50c0 15 -20 40 -34 44l-257 65c-66 16 -109 73 -109 141v50c0 68 57 125 125 125h75v100z" />
<glyph glyph-name="54" unicode="&#xe054;"
d="M0 700h300v-300l-300 -300v600zM500 700h300v-300l-300 -300v600z" />
<glyph glyph-name="55" unicode="&#xe055;"
d="M300 700v-600h-300v300zM800 700v-600h-300v300z" />
<glyph glyph-name="56" unicode="&#xe056;"
d="M300 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300zM800 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300z" />
<glyph glyph-name="57" unicode="&#xe057;"
d="M0 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300zM500 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300z" />
<glyph glyph-name="58" unicode="&#xe058;" horiz-adv-x="600"
d="M300 800l34 -34c11 -11 266 -270 266 -488c0 -165 -135 -300 -300 -300s-300 135 -300 300c0 218 255 477 266 488zM150 328c-28 0 -50 -22 -50 -50c0 -110 90 -200 200 -200c28 0 50 22 50 50s-22 50 -50 50c-55 0 -100 45 -100 100c0 28 -22 50 -50 50z" />
<glyph glyph-name="59" unicode="&#xe059;"
d="M400 800l400 -500h-800zM0 200h800v-200h-800v200z" />
<glyph glyph-name="5a" unicode="&#xe05a;" horiz-adv-x="600"
d="M300 800l300 -300h-600zM0 300h600l-300 -300z" />
<glyph glyph-name="5b" unicode="&#xe05b;"
d="M0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200z" />
<glyph glyph-name="5c" unicode="&#xe05c;"
d="M0 700h800v-100l-400 -200l-400 200v100zM0 500l400 -200l400 200v-400h-800v400z" />
<glyph glyph-name="5d" unicode="&#xe05d;"
d="M400 800l400 -200v-600h-800v600zM400 688l-300 -150v-188l300 -150l300 150v188zM200 500h400v-100l-200 -100l-200 100v100z" />
<glyph glyph-name="5e" unicode="&#xe05e;"
d="M600 700c69 0 134 -19 191 -50l-16 -106c-49 35 -109 56 -175 56c-131 0 -240 -84 -281 -200h331l-16 -100h-334c0 -36 8 -68 19 -100h297l-16 -100h-222c55 -61 133 -100 222 -100c78 0 147 30 200 78v-122c-59 -35 -127 -56 -200 -56c-147 0 -274 82 -344 200h-256
l19 100h197c-8 32 -16 66 -16 100h-200l25 100h191c45 172 198 300 384 300z" />
<glyph glyph-name="5f" unicode="&#xe05f;"
d="M0 700h700v-100h-700v100zM0 500h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100z" />
<glyph glyph-name="60" unicode="&#xe060;"
d="M0 800h800v-100h-800v100zM200 600h400l-200 -200zM0 200h800v-200h-800v200z" />
<glyph glyph-name="61" unicode="&#xe061;"
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM200 600l200 -200l-200 -200v400z" />
<glyph glyph-name="62" unicode="&#xe062;"
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM600 600v-400l-200 200z" />
<glyph glyph-name="63" unicode="&#xe063;"
d="M0 800h800v-200h-800v200zM400 400l200 -200h-400zM0 100h800v-100h-800v100z" />
<glyph glyph-name="64" unicode="&#xe064;"
d="M0 800h200v-100h-100v-600h600v100h100v-200h-800v800zM400 800h400v-400l-150 150l-250 -250l-100 100l250 250z" />
<glyph glyph-name="65" unicode="&#xe065;"
d="M403 700c247 0 397 -300 397 -300s-150 -300 -397 -300c-253 0 -403 300 -403 300s150 300 403 300zM400 600c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM400 500c10 0 19 -3 28 -6c-16 -8 -28 -24 -28 -44c0 -28 22 -50 50 -50
c20 0 36 12 44 28c3 -9 6 -18 6 -28c0 -55 -45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="66" unicode="&#xe066;" horiz-adv-x="900"
d="M331 700h3h3c3 1 7 1 10 1c12 0 29 -8 37 -17l94 -93l66 65c57 57 155 57 212 0c58 -58 58 -154 0 -212l-65 -66l93 -94c10 -8 18 -25 18 -38c0 -28 -22 -50 -50 -50c-13 0 -32 9 -40 20l-62 65l-381 -381h-269v272l375 381l-63 63c-9 8 -16 24 -16 36c0 20 16 42 35 48z
M447 481l-313 -315l128 -132l316 316z" />
<glyph glyph-name="67" unicode="&#xe067;"
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300z" />
<glyph glyph-name="68" unicode="&#xe068;"
d="M200 800c0 0 200 -100 200 -300s-298 -302 -200 -500c0 0 -200 100 -200 300s300 300 200 500zM500 500c0 0 200 -100 200 -300c0 -150 -60 -200 -100 -200h-300c0 200 300 300 200 500z" />
<glyph glyph-name="69" unicode="&#xe069;"
d="M0 800h100v-800h-100v800zM200 800h300v-100h300l-200 -203l200 -197h-400v100h-200v400z" />
<glyph glyph-name="6a" unicode="&#xe06a;" horiz-adv-x="400"
d="M150 800h150l-100 -200h200l-150 -300h150l-300 -300l-100 300h134l66 200h-200z" />
<glyph glyph-name="6b" unicode="&#xe06b;"
d="M0 800h300v-100h500v-100h-800v200zM0 500h800v-450c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v450z" />
<glyph glyph-name="6c" unicode="&#xe06c;"
d="M150 800c83 0 150 -67 150 -150c0 -66 -41 -121 -100 -141v-118c15 5 33 9 50 9h200c28 0 50 22 50 50v59c-59 20 -100 75 -100 141c0 83 67 150 150 150s150 -67 150 -150c0 -66 -41 -121 -100 -141v-59c0 -82 -68 -150 -150 -150h-200c-14 0 -25 -7 -34 -16
c50 -24 84 -74 84 -134c0 -83 -67 -150 -150 -150s-150 67 -150 150c0 66 41 121 100 141v218c-59 20 -100 75 -100 141c0 83 67 150 150 150z" />
<glyph glyph-name="6d" unicode="&#xe06d;"
d="M0 800h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400zM500 400l150 -150l150 150v-400h-400l150 150l-150 150z" />
<glyph glyph-name="6e" unicode="&#xe06e;"
d="M100 800l150 -150l150 150v-400h-400l150 150l-150 150zM400 400h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400z" />
<glyph glyph-name="6f" unicode="&#xe06f;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700c-56 0 -108 -17 -153 -44l22 -19c33 -18 13 -48 -13 -59c-30 -13 -77 10 -65 -41c13 -55 -27 -3 -47 -15c-42 -26 49 -152 31 -156l-59 34c-8 0 -13 -5 -16 -10
c1 -30 10 -57 19 -84c28 -11 77 -2 100 -25c47 -28 97 -115 75 -159c34 -13 68 -22 106 -22c101 0 193 48 247 125c3 24 -8 44 -50 44c-69 0 -156 13 -153 97c2 46 101 108 66 143c-30 30 12 39 12 66c0 37 -65 32 -69 50s20 36 41 56c-30 10 -60 19 -94 19zM631 591
c-38 -11 -94 -35 -87 -53c6 -15 52 -1 65 -13c11 -10 16 -59 44 -31l22 22v3c-11 26 -26 50 -44 72z" />
<glyph glyph-name="70" unicode="&#xe070;"
d="M703 800l97 -100l-400 -400l-100 100l-200 -203l-100 100l300 303l100 -100zM0 100h800v-100h-800v100z" />
<glyph glyph-name="71" unicode="&#xe071;"
d="M0 700h100v-100h-100v100zM200 700h100v-100h-100v100zM400 700h100v-100h-100v100zM600 700h100v-100h-100v100zM0 500h100v-100h-100v100zM200 500h100v-100h-100v100zM400 500h100v-100h-100v100zM600 500h100v-100h-100v100zM0 300h100v-100h-100v100zM200 300h100
v-100h-100v100zM400 300h100v-100h-100v100zM600 300h100v-100h-100v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100zM600 100h100v-100h-100v100z" />
<glyph glyph-name="72" unicode="&#xe072;"
d="M0 800h200v-200h-200v200zM300 800h200v-200h-200v200zM600 800h200v-200h-200v200zM0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200zM0 200h200v-200h-200v200zM300 200h200v-200h-200v200zM600 200h200v-200h-200v200z" />
<glyph glyph-name="73" unicode="&#xe073;"
d="M0 800h300v-300h-300v300zM500 800h300v-300h-300v300zM0 300h300v-300h-300v300zM500 300h300v-300h-300v300z" />
<glyph glyph-name="74" unicode="&#xe074;"
d="M19 800h662c11 0 19 -8 19 -19v-331c0 -28 -22 -50 -50 -50h-600c-28 0 -50 22 -50 50v331c0 11 8 19 19 19zM0 309c16 -6 32 -9 50 -9h600c18 0 34 3 50 9v-290c0 -11 -8 -19 -19 -19h-662c-11 0 -19 8 -19 19v290zM550 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="75" unicode="&#xe075;"
d="M0 700h300v-100h-50c-28 0 -50 -22 -50 -50v-150h300v150c0 28 -22 50 -50 50h-50v100h300v-100h-50c-28 0 -50 -22 -50 -50v-400c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50v150h-300v-150c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50
v400c0 28 -22 50 -50 50h-50v100z" />
<glyph glyph-name="76" unicode="&#xe076;"
d="M400 700c165 0 300 -135 300 -300v-100h50c28 0 50 -22 50 -50v-200c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v350c0 111 -89 200 -200 200s-200 -89 -200 -200v-350c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v200c0 28 22 50 50 50h50v100
c0 165 135 300 300 300z" />
<glyph glyph-name="77" unicode="&#xe077;"
d="M0 500c0 109 91 200 200 200s200 -91 200 -200c0 109 91 200 200 200s200 -91 200 -200c0 -55 -23 -105 -59 -141l-341 -340l-341 340c-36 36 -59 86 -59 141z" />
<glyph glyph-name="78" unicode="&#xe078;"
d="M400 700l400 -300l-100 3v-403h-200v200h-200v-200h-200v400h-100z" />
<glyph glyph-name="79" unicode="&#xe079;"
d="M0 800h800v-800h-800v800zM100 700v-300l100 100l400 -400h100v100l-200 200l100 100l100 -100v300h-600z" />
<glyph glyph-name="7a" unicode="&#xe07a;"
d="M19 800h762c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-762c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 600v-300h100l100 -100h200l100 100h100v300h-600z" />
<glyph glyph-name="7b" unicode="&#xe07b;"
d="M200 600c80 0 142 -56 200 -122c58 66 119 122 200 122c131 0 200 -101 200 -200s-69 -200 -200 -200c-81 0 -142 56 -200 122c-58 -66 -121 -122 -200 -122c-131 0 -200 101 -200 200s69 200 200 200zM200 500c-74 0 -100 -54 -100 -100s26 -100 100 -100
c42 0 88 47 134 100c-46 53 -92 100 -134 100zM600 500c-43 0 -88 -47 -134 -100c46 -53 91 -100 134 -100c74 0 100 54 100 100s-26 100 -100 100z" />
<glyph glyph-name="7c" unicode="&#xe07c;" horiz-adv-x="400"
d="M300 800c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100zM150 550c83 0 150 -69 150 -150c0 -66 -100 -214 -100 -250c0 -28 22 -50 50 -50s50 22 50 50h100c0 -83 -67 -150 -150 -150s-150 64 -150 150s100 222 100 250s-22 50 -50 50
s-50 -22 -50 -50h-100c0 83 67 150 150 150z" />
<glyph glyph-name="7d" unicode="&#xe07d;"
d="M200 800h500v-100h-122c-77 -197 -156 -392 -234 -588l-6 -12h162v-100h-500v100h122c77 197 156 392 234 588l7 12h-163v100z" />
<glyph glyph-name="7e" unicode="&#xe07e;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
<glyph glyph-name="7f" unicode="&#xe07f;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
<glyph glyph-name="80" unicode="&#xe080;"
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
<glyph glyph-name="81" unicode="&#xe081;"
d="M550 800c138 0 250 -112 250 -250s-112 -250 -250 -250c-16 0 -32 0 -47 3l-3 -3v-100h-200v-200h-300v200l303 303c-3 15 -3 31 -3 47c0 138 112 250 250 250zM600 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
<glyph glyph-name="82" unicode="&#xe082;"
d="M134 600h3h4h4h5h500c28 0 50 -22 50 -50v-350h100v-150c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v150h100v350v2c0 20 15 42 34 48zM200 500v-300h100v-100h200v100h100v300h-400z" />
<glyph glyph-name="83" unicode="&#xe083;"
d="M0 800h400v-400h-400v400zM500 600h100v-400h-400v100h300v300zM700 400h100v-400h-400v100h300v300z" />
<glyph glyph-name="84" unicode="&#xe084;" horiz-adv-x="600"
d="M337 694c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-300 -150c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49zM437 544c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-400 -200c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50
c0 21 16 44 37 49zM437 344c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-106 -56c24 -4 43 -26 43 -50c0 -28 -23 -51 -51 -51c-2 0 -6 1 -8 1h-200c-26 1 -48 24 -48 50c0 16 12 36 26 44zM151 -50c0 23 20 50 46 50h3h4h5h100c28 0 50 -22 50 -50
s-22 -50 -50 -50h-100c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
<glyph glyph-name="85" unicode="&#xe085;"
d="M199 800h100v-200h-200v100h100v100zM586 797h1c18 1 38 1 56 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0l-44 -44
c-8 -13 -27 -24 -42 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l43 44c32 33 72 53 128 56zM208 490c4 5 14 16 22 16h3c2 0 6 1 8 1c28 0 50 -22 50 -50c0 -11 -6 -27 -14 -35l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0l44 44c8 13 27 24 42 24
c28 0 50 -22 50 -50c0 -15 -11 -35 -24 -43l-43 -44c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281zM499 200h200v-100h-100v-100h-100v200z" />
<glyph glyph-name="86" unicode="&#xe086;"
d="M586 797c18 1 39 1 57 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-62 -62 -132 -81 -182 -78s-69 17 -84 25s-26 27 -26 44c0 28 22 51 50 51c8 0 19 -3 26 -7c0 0 15 -11 41 -13s62 3 106 47l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0
c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43c32 33 72 53 128 56zM386 566c50 -2 64 -17 85 -22s37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11c0 0 -19 9 -47 10s-63 -4 -103 -44l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0
c8 13 27 24 42 24c28 0 50 -22 50 -50c0 -15 -10 -35 -23 -43c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281l150 150c60 60 128 78 178 76z" />
<glyph glyph-name="87" unicode="&#xe087;"
d="M0 700h300v-300h-300v300zM400 700h400v-100h-400v100zM400 500h300v-100h-300v100zM0 300h300v-300h-300v300zM400 300h400v-100h-400v100zM400 100h300v-100h-300v100z" />
<glyph glyph-name="88" unicode="&#xe088;"
d="M50 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 700h600v-100h-600v100zM50 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 500h600v-100h-600v100zM50 300c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
s22 50 50 50zM200 300h600v-100h-600v100zM50 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 100h600v-100h-600v100z" />
<glyph glyph-name="89" unicode="&#xe089;"
d="M800 800l-400 -800l-100 300l-300 100z" />
<glyph glyph-name="8a" unicode="&#xe08a;" horiz-adv-x="600"
d="M300 700c110 0 200 -90 200 -200v-100h100v-400h-600v400h100v100c0 110 90 200 200 200zM300 600c-56 0 -100 -44 -100 -100v-100h200v100c0 56 -44 100 -100 100z" />
<glyph glyph-name="8b" unicode="&#xe08b;" horiz-adv-x="600"
d="M300 800c110 0 200 -90 200 -200v-200h100v-400h-600v400h400v200c0 56 -44 100 -100 100s-100 -44 -100 -100h-100c0 110 90 200 200 200z" />
<glyph glyph-name="8c" unicode="&#xe08c;"
d="M400 700v-100c-111 0 -200 -89 -200 -200h100l-150 -200l-150 200h100c0 165 135 300 300 300zM650 600l150 -200h-100c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-100z" />
<glyph glyph-name="8d" unicode="&#xe08d;"
d="M100 800h600v-300h100l-150 -250l-150 250h100v200h-400v-100h-100v200zM150 550l150 -250h-100v-200h400v100h100v-200h-600v300h-100z" />
<glyph glyph-name="8e" unicode="&#xe08e;"
d="M600 700l200 -150l-200 -150v100h-500v-100h-100v100c0 55 45 100 100 100h500v100zM200 300v-100h500v100h100v-100c0 -55 -45 -100 -100 -100h-500v-100l-200 150z" />
<glyph glyph-name="8f" unicode="&#xe08f;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -60 -17 -117 -44 -166c5 -3 12 -8 16 -12l100 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 100c-4 3 -9 9 -12 13c-49 -26 -107 -41 -166 -41c-193 0 -350 157 -350 350s157 350 350 350zM350 200
c142 0 250 108 250 250c0 139 -111 250 -250 250s-250 -111 -250 -250s111 -250 250 -250z" />
<glyph glyph-name="90" unicode="&#xe090;" horiz-adv-x="600"
d="M300 800c166 0 300 -134 300 -300c0 -200 -300 -500 -300 -500s-300 300 -300 500c0 166 134 300 300 300zM300 700c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200z" />
<glyph glyph-name="91" unicode="&#xe091;" horiz-adv-x="900"
d="M0 800h800v-541c1 -3 1 -8 1 -11s0 -7 -1 -10v-238h-800v800zM495 250c0 26 22 50 50 50h5h150v400h-600v-600h600v100h-150h-5c-28 0 -50 22 -50 50zM350 600c83 0 150 -67 150 -150c0 -100 -150 -250 -150 -250s-150 150 -150 250c0 83 67 150 150 150zM350 500
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="92" unicode="&#xe092;" horiz-adv-x="600"
d="M0 700h200v-600h-200v600zM400 700h200v-600h-200v600z" />
<glyph glyph-name="93" unicode="&#xe093;" horiz-adv-x="600"
d="M0 700l600 -300l-600 -300v600z" />
<glyph glyph-name="94" unicode="&#xe094;" horiz-adv-x="600"
d="M300 700c166 0 300 -134 300 -300s-134 -300 -300 -300s-300 134 -300 300s134 300 300 300z" />
<glyph glyph-name="95" unicode="&#xe095;"
d="M400 700v-600l-400 300zM400 400l400 300v-600z" />
<glyph glyph-name="96" unicode="&#xe096;"
d="M0 700l400 -300l-400 -300v600zM400 100v600l400 -300z" />
<glyph glyph-name="97" unicode="&#xe097;"
d="M0 700h200v-600h-200v600zM200 400l500 300v-600z" />
<glyph glyph-name="98" unicode="&#xe098;"
d="M0 700l500 -300l-500 -300v600zM500 100v600h200v-600h-200z" />
<glyph glyph-name="99" unicode="&#xe099;" horiz-adv-x="600"
d="M0 700h600v-600h-600v600z" />
<glyph glyph-name="9a" unicode="&#xe09a;"
d="M200 800h400v-200h200v-400h-200v-200h-400v200h-200v400h200v200z" />
<glyph glyph-name="9b" unicode="&#xe09b;"
d="M0 700h800v-100h-800v100zM0 403h800v-100h-800v100zM0 103h800v-100h-800v100z" />
<glyph glyph-name="9c" unicode="&#xe09c;" horiz-adv-x="600"
d="M278 700c7 2 13 4 22 4c55 0 100 -45 100 -100v-4v-200c0 -55 -45 -100 -100 -100s-100 45 -100 100v200v2c0 44 35 88 78 98zM34 500h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-50c0 -111 89 -200 200 -200s200 89 200 200v50c0 28 22 50 50 50s50 -22 50 -50v-50
c0 -148 -109 -270 -250 -294v-106h50c55 0 100 -45 100 -100h-400c0 55 45 100 100 100h50v106c-141 24 -250 146 -250 294v50v2c0 20 15 42 34 48z" />
<glyph glyph-name="9d" unicode="&#xe09d;"
d="M0 500h800v-200h-800v200z" />
<glyph glyph-name="9e" unicode="&#xe09e;"
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-500c0 -28 -22 -50 -50 -50h-250v-100h100c55 0 100 -45 100 -100h-600c0 55 45 100 100 100h100v100h-250c-28 0 -50 22 -50 50v500v2c0 20 15 42 34 48zM100 600v-400h600v400h-600z" />
<glyph glyph-name="9f" unicode="&#xe09f;"
d="M272 700c-14 -40 -22 -83 -22 -128c0 -221 179 -400 400 -400c45 0 88 8 128 22c-53 -158 -202 -272 -378 -272c-221 0 -400 179 -400 400c0 176 114 325 272 378z" />
<glyph glyph-name="a0" unicode="&#xe0a0;"
d="M350 700l150 -150h-100v-150h150v100l150 -150l-150 -150v100h-150v-150h100l-150 -150l-150 150h100v150h-150v-100l-150 150l150 150v-100h150v150h-100z" />
<glyph glyph-name="a1" unicode="&#xe0a1;"
d="M800 800v-550c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v206c-201 -6 -327 -27 -400 -50v-397c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v409s100 100 600 100z" />
<glyph glyph-name="a2" unicode="&#xe0a2;" horiz-adv-x="700"
d="M499 700c51 0 102 -20 141 -59c78 -78 78 -203 0 -281l-250 -244c-48 -48 -127 -48 -175 0s-48 127 0 175l96 97l69 -69l-90 -94l-7 -3c-10 -10 -10 -28 0 -38s28 -10 38 0l250 247c37 40 39 102 0 141s-104 40 -144 0l-278 -275c-66 -69 -68 -179 0 -247
c69 -69 181 -69 250 0l9 12l116 113l69 -69l-125 -125c-107 -107 -281 -107 -388 0s-107 281 0 388l278 272c39 39 90 59 141 59z" />
<glyph glyph-name="a3" unicode="&#xe0a3;"
d="M600 800l200 -200l-100 -100l-200 200zM400 600l200 -200l-400 -400h-200v200z" />
<glyph glyph-name="a4" unicode="&#xe0a4;"
d="M550 800c83 0 150 -90 150 -200s-67 -200 -150 -200c-22 0 -40 8 -59 19c6 26 9 52 9 81c0 84 -27 158 -72 212c27 52 71 88 122 88zM250 700c83 0 150 -90 150 -200s-67 -200 -150 -200s-150 90 -150 200s67 200 150 200zM725 384c44 -22 75 -66 75 -118v-166h-200v66
c0 50 -17 96 -44 134c66 2 126 33 169 84zM75 284c45 -53 106 -84 175 -84s130 31 175 84c44 -22 75 -66 75 -118v-166h-500v166c0 52 31 96 75 118z" />
<glyph glyph-name="a5" unicode="&#xe0a5;"
d="M400 800c110 0 200 -112 200 -250s-90 -250 -200 -250s-200 112 -200 250s90 250 200 250zM191 300c54 -61 128 -100 209 -100s155 39 209 100c106 -5 191 -92 191 -200v-100h-800v100c0 108 85 195 191 200z" />
<glyph glyph-name="a6" unicode="&#xe0a6;" horiz-adv-x="600"
d="M19 800h462c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-462c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 700v-500h300v500h-300zM250 150c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="a7" unicode="&#xe0a7;"
d="M350 800c17 0 34 -1 50 -3v-397l-297 297c63 64 150 103 247 103zM500 694c169 -25 300 -168 300 -344c0 -193 -157 -350 -350 -350c-85 0 -161 31 -222 81l272 272v341zM91 562l237 -234l-212 -212c-70 55 -116 138 -116 234c0 84 35 158 91 212z" />
<glyph glyph-name="a8" unicode="&#xe0a8;"
d="M92 650c0 23 20 50 46 50h3h4h5h400c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-200h100c55 0 100 -45 100 -100h-300v-300l-56 -100l-44 100v300h-300c0 55 45 100 100 100h100v200h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
<glyph glyph-name="a9" unicode="&#xe0a9;"
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 600v-400l300 200z" />
<glyph glyph-name="aa" unicode="&#xe0aa;"
d="M300 800h200v-300h300v-200h-300v-300h-200v300h-300v200h300v300z" />
<glyph glyph-name="ab" unicode="&#xe0ab;"
d="M300 800h100v-400h-100v400zM172 656l62 -78l-40 -31c-58 -46 -94 -117 -94 -197c0 -139 111 -250 250 -250s250 111 250 250c0 80 -39 151 -97 197l-37 31l62 78l38 -31c82 -64 134 -164 134 -275c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 111 53 211 134 275z
" />
<glyph glyph-name="ac" unicode="&#xe0ac;"
d="M200 800h400v-200h-400v200zM9 500h782c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-91v200h-600v-200h-91c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM200 300h400v-300h-400v300z" />
<glyph glyph-name="ad" unicode="&#xe0ad;"
d="M0 700h100v-700h-100v700zM700 700h100v-700h-100v700zM200 600h200v-100h-200v100zM300 400h200v-100h-200v100zM400 200h200v-100h-200v100z" />
<glyph glyph-name="ae" unicode="&#xe0ae;"
d="M325 700c42 -141 87 -280 131 -419c29 74 59 148 88 222c30 -57 58 -114 87 -172h169v-100h-231l-13 28c-37 -92 -74 -184 -112 -275c-38 129 -79 257 -119 385c-42 -133 -83 -267 -125 -400c-28 88 -56 175 -84 262h-116v100h188l9 -34l3 -6c42 137 83 273 125 409z" />
<glyph glyph-name="af" unicode="&#xe0af;"
d="M200 600c0 57 43 100 100 100s100 -43 100 -100c0 -28 -18 -48 -28 -72c-3 -6 -3 -16 -3 -28h231v-231c12 0 22 0 28 3c24 10 44 28 72 28c57 0 100 -43 100 -100s-43 -100 -100 -100c-28 0 -48 18 -72 28c-6 3 -16 3 -28 3v-231h-231c0 12 0 22 3 28c10 24 28 44 28 72
c0 57 -43 100 -100 100s-100 -43 -100 -100c0 -28 18 -48 28 -72c3 -6 3 -16 3 -28h-231v600h231c0 12 0 22 -3 28c-10 24 -28 44 -28 72z" />
<glyph glyph-name="b0" unicode="&#xe0b0;" horiz-adv-x="500"
d="M247 700c84 0 148 -20 191 -59s59 -93 59 -141c0 -117 -69 -181 -119 -225s-81 -67 -81 -150v-25h-100v25c0 117 65 181 115 225s85 67 85 150c0 25 -8 48 -28 66s-56 34 -122 34s-97 -18 -116 -37s-27 -43 -31 -69l-100 12c5 38 19 88 59 128s103 66 188 66zM197 0h100
v-100h-100v100z" />
<glyph glyph-name="b1" unicode="&#xe0b1;"
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -69 -48 -127 -112 -144c-22 55 -75 94 -138 94c-20 0 -39 -5 -56 -12c-17 64 -75 112 -144 112s-127 -48 -144 -112c-17 7 -36 12 -56 12c-37 0 -71 -12 -97 -34c-33 36 -53 82 -53 134
c0 110 90 200 200 200c23 114 129 200 250 200zM334 300h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-200c0 -28 -22 -50 -50 -50s-50 22 -50 50v200v2c0 20 15 42 34 48zM134 200h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2
c0 20 15 42 34 48zM534 200h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2c0 20 15 42 34 48z" />
<glyph glyph-name="b2" unicode="&#xe0b2;"
d="M600 800l200 -150l-200 -150v100h-50l-153 -191l175 -206l6 -3h22v100l200 -150l-200 -150v100h-25c-35 0 -56 12 -78 38l-166 190l-153 -190c-22 -27 -43 -38 -78 -38h-100v100h100l166 206l-163 191l-3 3h-100v100h100c34 0 56 -12 78 -38l153 -178l141 178
c22 27 43 38 78 38h50v100z" />
<glyph glyph-name="b3" unicode="&#xe0b3;"
d="M400 800c110 0 209 -47 281 -119l119 119v-300h-300l109 109c-54 55 -126 91 -209 91c-166 0 -300 -134 -300 -300s134 -300 300 -300c83 0 158 34 212 88l72 -72c-72 -72 -174 -116 -284 -116c-220 0 -400 180 -400 400s180 400 400 400z" />
<glyph glyph-name="b4" unicode="&#xe0b4;"
d="M400 800h400v-400l-166 166l-400 -400l166 -166h-400v400l166 -166l400 400z" />
<glyph glyph-name="b5" unicode="&#xe0b5;" horiz-adv-x="600"
d="M250 800l250 -300h-200v-200h200l-250 -300l-250 300h200v200h-200z" />
<glyph glyph-name="b6" unicode="&#xe0b6;"
d="M300 600v-200h200v200l300 -250l-300 -250v200h-200v-200l-300 250z" />
<glyph glyph-name="b7" unicode="&#xe0b7;"
d="M0 800c441 0 800 -359 800 -800h-200c0 333 -267 600 -600 600v200zM0 500c275 0 500 -225 500 -500h-200c0 167 -133 300 -300 300v200zM0 200c110 0 200 -90 200 -200h-200v200z" />
<glyph glyph-name="b8" unicode="&#xe0b8;"
d="M100 800c386 0 700 -314 700 -700h-100c0 332 -268 600 -600 600v100zM100 600c276 0 500 -224 500 -500h-100c0 222 -178 400 -400 400v100zM100 400c165 0 300 -135 300 -300h-100c0 111 -89 200 -200 200v100zM100 200c55 0 100 -45 100 -100s-45 -100 -100 -100
s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="b9" unicode="&#xe0b9;"
d="M300 800h400c55 0 100 -45 100 -100v-200h-400v150c0 28 -22 50 -50 50s-50 -22 -50 -50v-250h400v-300c0 -55 -45 -100 -100 -100h-500c-55 0 -100 45 -100 100v200h100v-150c0 -28 22 -50 50 -50s50 22 50 50v550c0 55 45 100 100 100z" />
<glyph glyph-name="ba" unicode="&#xe0ba;"
d="M75 700h225v-100h-200v-500h400v100h100v-125c0 -41 -34 -75 -75 -75h-450c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM600 700l200 -200l-200 -200v100h-200c-94 0 -173 -65 -194 -153c23 199 189 353 394 353v100z" />
<glyph glyph-name="bb" unicode="&#xe0bb;"
d="M500 700l300 -284l-300 -316v200h-100c-200 0 -348 -102 -400 -300c0 295 100 500 500 500v200z" />
<glyph glyph-name="bc" unicode="&#xe0bc;"
d="M381 791l19 9l19 -9c127 -53 253 -108 381 -160v-31c0 -166 -67 -313 -147 -419c-40 -53 -83 -97 -125 -128s-82 -53 -128 -53s-86 22 -128 53s-85 75 -125 128c-80 107 -147 253 -147 419v31c128 52 254 107 381 160zM400 100v591l-294 -122c8 -126 58 -243 122 -328
c35 -46 73 -86 106 -110s62 -31 66 -31z" />
<glyph glyph-name="bd" unicode="&#xe0bd;"
d="M600 800h100v-800h-100v800zM400 700h100v-700h-100v700zM200 500h100v-500h-100v500zM0 300h100v-300h-100v300z" />
<glyph glyph-name="be" unicode="&#xe0be;"
d="M300 800h100v-200h200l100 -100l-100 -100h-200v-400h-100v500h-200l-100 100l100 100h200v100z" />
<glyph glyph-name="bf" unicode="&#xe0bf;"
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h200v-100h-200v100zM400 600h300v-100h-300v100zM400 400h400v-100h-400v100z" />
<glyph glyph-name="c0" unicode="&#xe0c0;"
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h400v-100h-400v100zM400 600h300v-100h-300v100zM400 400h200v-100h-200v100z" />
<glyph glyph-name="c1" unicode="&#xe0c1;"
d="M75 700h650c41 0 75 -34 75 -75v-550c0 -41 -34 -75 -75 -75h-650c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM100 600v-100h100v100h-100zM300 600v-100h400v100h-400zM100 400v-100h100v100h-100zM300 400v-100h400v100h-400zM100 200v-100h100v100h-100zM300 200
v-100h400v100h-400z" />
<glyph glyph-name="c2" unicode="&#xe0c2;"
d="M400 800l100 -300h300l-250 -200l100 -300l-250 200l-250 -200l100 300l-250 200h300z" />
<glyph glyph-name="c3" unicode="&#xe0c3;"
d="M400 800c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM650 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 600c110 0 200 -90 200 -200
s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM50 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM750 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
s22 50 50 50zM650 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
<glyph glyph-name="c4" unicode="&#xe0c4;"
d="M34 800h632c18 0 34 -16 34 -34v-732c0 -18 -16 -34 -34 -34h-632c-18 0 -34 16 -34 34v732c0 18 16 34 34 34zM100 700v-500h500v500h-500zM350 150c-38 0 -63 -42 -44 -75s69 -33 88 0s-6 75 -44 75z" />
<glyph glyph-name="c5" unicode="&#xe0c5;"
d="M0 800h300l500 -500l-300 -300l-500 500v300zM200 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
<glyph glyph-name="c6" unicode="&#xe0c6;"
d="M0 600h200l300 -300l-200 -200l-300 300v200zM340 600h160l300 -300l-200 -200l-78 78l119 122zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="c7" unicode="&#xe0c7;"
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200
s90 200 200 200zM400 500c-56 0 -100 -44 -100 -100s44 -100 100 -100s100 44 100 100s-44 100 -100 100z" />
<glyph glyph-name="c8" unicode="&#xe0c8;"
d="M0 700h559l-100 -100h-359v-500h500v159l100 100v-359h-700v700zM700 700l100 -100l-400 -400l-200 200l100 100l100 -100z" />
<glyph glyph-name="c9" unicode="&#xe0c9;"
d="M9 800h782c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM150 722l-72 -72l100 -100l-100 -100l72 -72l172 172zM400 500v-100h300v100h-300z" />
<glyph glyph-name="ca" unicode="&#xe0ca;"
d="M0 800h800v-200h-50c0 55 -45 100 -100 100h-150v-550c0 -28 22 -50 50 -50h50v-100h-400v100h50c28 0 50 22 50 50v550h-150c-55 0 -100 -45 -100 -100h-50v200z" />
<glyph glyph-name="cb" unicode="&#xe0cb;"
d="M0 700h100v-400h-100v400zM200 700h350c21 0 39 -13 47 -31c0 0 103 -291 103 -319s-22 -50 -50 -50h-150c-28 0 -50 -25 -50 -50s39 -158 47 -184s-5 -55 -31 -63s-52 5 -66 31s-109 219 -128 238s-44 28 -72 28v400z" />
<glyph glyph-name="cc" unicode="&#xe0cc;"
d="M400 666c10 19 28 32 47 34l19 -3c26 -8 39 -37 31 -63s-47 -159 -47 -184s22 -50 50 -50h150c28 0 50 -22 50 -50s-103 -319 -103 -319c-8 -18 -26 -31 -47 -31h-350v400c28 0 53 9 72 28s114 212 128 238zM0 400h100v-400h-100v400z" />
<glyph glyph-name="cd" unicode="&#xe0cd;"
d="M200 700h300v-100h-100v-6c25 -4 50 -8 72 -16l-34 -94c-28 11 -58 16 -88 16c-139 0 -250 -111 -250 -250s111 -250 250 -250s250 111 250 250c0 31 -5 60 -16 88l91 37c14 -38 25 -81 25 -125c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 176 130 323 300 347v3
h-100v100zM700 584c0 0 -296 -348 -316 -368s-48 -20 -68 0s-20 48 0 68s384 300 384 300z" />
<glyph glyph-name="ce" unicode="&#xe0ce;"
d="M600 700l200 -150l-200 -150v100h-600v100h600v100zM200 300v-100h600v-100h-600v-100l-200 150z" />
<glyph glyph-name="cf" unicode="&#xe0cf;"
d="M300 800h100c55 0 100 -45 100 -100h100c55 0 100 -45 100 -100h-700c0 55 45 100 100 100h100c0 55 45 100 100 100zM100 500h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-481c0 -11 -8 -19 -19 -19h-462
c-11 0 -19 8 -19 19v481z" />
<glyph glyph-name="d0" unicode="&#xe0d0;"
d="M100 800h200v-400c0 -55 45 -100 100 -100s100 45 100 100v400h100v-400c0 -110 -90 -200 -200 -200h-50c-138 0 -250 90 -250 200v400zM0 100h700v-100h-700v100z" />
<glyph glyph-name="d1" unicode="&#xe0d1;"
d="M9 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM609 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282
c0 6 3 9 9 9zM0 100h800v-100h-800v100z" />
<glyph glyph-name="d2" unicode="&#xe0d2;"
d="M10 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 4 9 10 9zM610 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 5 9 10 9zM310 600h181c6 0 9 -3 9 -9v-91h-200v91c0 6 4 9 10 9zM0 400h800v-100h-800v100zM0 200h200v-191c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v191zM300 200
h200v-91c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v91zM600 200h200v-191c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v191z" />
<glyph glyph-name="d3" unicode="&#xe0d3;"
d="M0 700h800v-100h-800v100zM9 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM609 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182
c-6 0 -9 3 -9 9v482c0 6 3 9 9 9z" />
<glyph glyph-name="d4" unicode="&#xe0d4;"
d="M50 600h500c28 0 50 -22 50 -50v-150l100 100h100v-300h-100l-100 100v-150c0 -28 -22 -50 -50 -50h-500c-28 0 -50 22 -50 50v400c0 28 22 50 50 50z" />
<glyph glyph-name="d5" unicode="&#xe0d5;"
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 600v100c26 0 52 -4 75 -10c130 -33 225 -150 225 -290s-95 -258 -225 -291h-3c-23 -6 -47 -9 -72 -9v100c17 0 34 2 50 6c86 22 150 100 150 194s-64 172 -150 194c-16 4 -33 6 -50 6zM500 500l25 -3
c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
<glyph glyph-name="d6" unicode="&#xe0d6;" horiz-adv-x="600"
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 500l25 -3c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
<glyph glyph-name="d7" unicode="&#xe0d7;" horiz-adv-x="400"
d="M334 800h66v-800h-66l-134 200h-200v400h200z" />
<glyph glyph-name="d8" unicode="&#xe0d8;"
d="M309 800h82c6 0 10 -4 12 -9l294 -682l3 -19v-81c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v81l3 19l294 682c2 5 6 9 12 9zM300 500v-200h100v200h-100zM300 200v-100h100v100h-100z" />
<glyph glyph-name="d9" unicode="&#xe0d9;"
d="M375 800c138 0 269 -39 378 -109l-53 -82c-93 60 -205 91 -325 91c-119 0 -229 -32 -322 -91l-53 82c109 70 237 109 375 109zM375 500c78 0 154 -23 216 -62l-53 -85c-46 30 -104 47 -163 47c-60 0 -112 -17 -159 -47l-54 85c62 40 134 62 213 62zM375 200
c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
<glyph glyph-name="da" unicode="&#xe0da;" horiz-adv-x="900"
d="M551 800c16 0 32 0 47 -3l-97 -97v-200h200l97 97c3 -15 3 -31 3 -47c0 -138 -112 -250 -250 -250c-32 0 -62 8 -90 19l-288 -291c-20 -20 -46 -28 -72 -28s-52 8 -72 28c-39 39 -39 105 0 144l291 287c-11 28 -19 59 -19 91c0 138 112 250 250 250zM101 150
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
<glyph glyph-name="db" unicode="&#xe0db;"
d="M141 700c84 -84 169 -167 253 -250c82 83 167 165 247 250l143 -141l-253 -253c84 -82 167 -166 253 -247l-143 -143c-81 86 -165 169 -247 253l-253 -253l-141 143c85 80 167 164 250 247c-83 84 -166 169 -250 253z" />
<glyph glyph-name="dc" unicode="&#xe0dc;"
d="M0 800h100l231 -300h38l231 300h100l-225 -300h225v-100h-300v-100h300v-100h-300v-200h-100v200h-300v100h300v100h-300v100h225z" />
<glyph glyph-name="dd" unicode="&#xe0dd;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM300 600h100v-100h100v-100h-100v-100h-100v100h-100v100h100v100z" />
<glyph glyph-name="de" unicode="&#xe0de;" horiz-adv-x="900"
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM200 500h300v-100h-300v100z" />
</font>
</defs></svg>

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,52 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>JobsJobsJobs</title>
<base href="/">
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet">
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet">
</head>
<body>
<div id="app">Loading...</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script>
/**
* Function to play audio files.
*/
var Audio = {
/**
* Play the target audio clip.
*
* @param {string} audio The ID of the audio element to play
*/
play(audio) {
document.getElementById(audio).play()
}
}
/**
* Set the title of the document. (called by PageTitle component)
*
* @param theTitle The title to be set
*/
function setPageTitle(theTitle) {
document.title = theTitle
}
function getTimeZone() {
return Intl.DateTimeFormat().resolvedOptions().timeZone
}
</script>
</body>
</html>

View File

@ -0,0 +1,121 @@
namespace JobsJobsJobs.DataMigrate
/// Converters used to translate between database and domain types
module Converters =
open JobsJobsJobs.Shared
open Microsoft.EntityFrameworkCore.Storage.ValueConversion
/// Citizen ID converter
let CitizenIdConverter = ValueConverter<CitizenId, string> ((fun v -> string v), fun v -> CitizenId.Parse v)
/// Continent ID converter
let ContinentIdConverter = ValueConverter<ContinentId, string> ((fun v -> string v), fun v -> ContinentId.Parse v)
/// Markdown converter
let MarkdownStringConverter = ValueConverter<MarkdownString, string> ((fun v -> v.Text), fun v -> MarkdownString v)
/// Markdown converter for possibly-null values
let OptionalMarkdownStringConverter : ValueConverter<MarkdownString, string> =
ValueConverter<MarkdownString, string>
((fun v -> match v with null -> null | _ -> v.Text), fun v -> match v with null -> null | _ -> MarkdownString v)
/// Skill ID converter
let SkillIdConverter = ValueConverter<SkillId, string> ((fun v -> string v), fun v -> SkillId.Parse v)
/// Success ID converter
let SuccessIdConverter = ValueConverter<SuccessId, string> ((fun v -> string v), fun v -> SuccessId.Parse v)
open JobsJobsJobs.Shared
open Microsoft.EntityFrameworkCore
open System.Collections.Generic
/// Data context for Jobs, Jobs, Jobs
type JobsDbContext (options : DbContextOptions<JobsDbContext>) =
inherit DbContext (options)
/// Citizens (users known to us)
member val Citizens : DbSet<Citizen> = Unchecked.defaultof<DbSet<Citizen>> with get, set
/// Continents (large land masses - 7 of them!)
member val Continents : DbSet<Continent> = Unchecked.defaultof<DbSet<Continent>> with get, set
/// Employment profiles
member val Profiles : DbSet<Profile> = Unchecked.defaultof<DbSet<Profile>> with get, set
/// Skills held by citizens of Gitmo Nation
member val Skills : DbSet<Skill> = Unchecked.defaultof<DbSet<Skill>> with get, set
/// Success stories from the site
member val Successes : DbSet<Success> = Unchecked.defaultof<DbSet<Success>> with get, set
override _.OnModelCreating (mb : ModelBuilder) =
base.OnModelCreating(mb)
mb.Entity<Citizen>(fun m ->
m.ToTable("citizen", "jjj").HasKey(fun e -> e.Id :> obj) |> ignore
m.Property(fun e -> e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter) |> ignore
m.Property(fun e -> e.NaUser).HasColumnName("na_user").IsRequired().HasMaxLength(50) |> ignore
m.Property(fun e -> e.DisplayName).HasColumnName("display_name").HasMaxLength(255) |> ignore
m.Property(fun e -> e.ProfileUrl).HasColumnName("profile_url").IsRequired().HasMaxLength(1_024) |> ignore
m.Property(fun e -> e.JoinedOn).HasColumnName("joined_on").IsRequired() |> ignore
m.Property(fun e -> e.LastSeenOn).HasColumnName("last_seen_on").IsRequired() |> ignore
m.Property(fun e -> e.RealName).HasColumnName("real_name").HasMaxLength(255) |> ignore
m.HasIndex(fun e -> e.NaUser :> obj).IsUnique() |> ignore
m.Ignore(fun e -> e.CitizenName :> obj) |> ignore)
|> ignore
mb.Entity<Continent>(fun m ->
m.ToTable("continent", "jjj").HasKey(fun e -> e.Id :> obj) |> ignore
m.Property(fun e -> e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ContinentIdConverter) |> ignore
m.Property(fun e -> e.Name).HasColumnName("name").IsRequired().HasMaxLength(255) |> ignore)
|> ignore
mb.Entity<Profile>(fun m ->
m.ToTable("profile", "jjj").HasKey(fun e -> e.Id :> obj) |> ignore
m.Property(fun e -> e.Id).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter) |> ignore
m.Property(fun e -> e.SeekingEmployment).HasColumnName("seeking_employment").IsRequired() |> ignore
m.Property(fun e -> e.IsPublic).HasColumnName("is_public").IsRequired() |> ignore
m.Property(fun e -> e.ContinentId).HasColumnName("continent_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ContinentIdConverter) |> ignore
m.Property(fun e -> e.Region).HasColumnName("region").IsRequired().HasMaxLength(255) |> ignore
m.Property(fun e -> e.RemoteWork).HasColumnName("remote_work").IsRequired() |> ignore
m.Property(fun e -> e.FullTime).HasColumnName("full_time").IsRequired() |> ignore
m.Property(fun e -> e.Biography).HasColumnName("biography").IsRequired()
.HasConversion(Converters.MarkdownStringConverter) |> ignore
m.Property(fun e -> e.LastUpdatedOn).HasColumnName("last_updated_on").IsRequired() |> ignore
m.Property(fun e -> e.Experience).HasColumnName("experience")
.HasConversion(Converters.OptionalMarkdownStringConverter) |> ignore
m.HasOne(fun e -> e.Continent :> obj)
.WithMany()
.HasForeignKey(fun e -> e.ContinentId :> obj) |> ignore
m.HasMany(fun e -> e.Skills :> IEnumerable<Skill>)
.WithOne()
.HasForeignKey(fun e -> e.CitizenId :> obj) |> ignore)
|> ignore
mb.Entity<Skill>(fun m ->
m.ToTable("skill", "jjj").HasKey(fun e -> e.Id :> obj) |> ignore
m.Property(fun e -> e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.SkillIdConverter) |> ignore
m.Property(fun e -> e.CitizenId).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter) |> ignore
m.Property(fun e -> e.Description).HasColumnName("skill").IsRequired().HasMaxLength(100) |> ignore
m.Property(fun e -> e.Notes).HasColumnName("notes").HasMaxLength(100) |> ignore)
|> ignore
mb.Entity<Success>(fun m ->
m.ToTable("success", "jjj").HasKey(fun e -> e.Id :> obj) |> ignore
m.Property(fun e -> e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.SuccessIdConverter) |> ignore
m.Property(fun e -> e.CitizenId).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter) |> ignore
m.Property(fun e -> e.RecordedOn).HasColumnName("recorded_on").IsRequired() |> ignore
m.Property(fun e -> e.FromHere).HasColumnName("from_here").IsRequired() |> ignore
// m.Property(fun e -> e.Source).HasColumnName("source").IsRequired().HasMaxLength(7);
m.Property(fun e -> e.Story).HasColumnName("story")
.HasConversion(Converters.OptionalMarkdownStringConverter) |> ignore)
|> ignore

View File

@ -7,17 +7,22 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="DataContext.fs" />
<Compile Include="Program.fs" /> <Compile Include="Program.fs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Server\JobsJobsJobs.Server.csproj" /> <ProjectReference Include="..\Shared\JobsJobsJobs.Shared.csproj" />
<ProjectReference Include="..\Api\Api.fsproj" /> <ProjectReference Include="..\Api\Api.fsproj" />
<ProjectReference Include="..\Domain\Domain.fsproj" /> <ProjectReference Include="..\Domain\Domain.fsproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Npgsql" Version="5.0.7" /> <PackageReference Include="Npgsql" Version="5.0.7" />
<PackageReference Include="Npgsql" Version="5.0.7" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.7" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="5.0.7" />
<PackageReference Include="Npgsql.NodaTime" Version="5.0.7" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -5,7 +5,7 @@ open System
open System.Linq open System.Linq
open JobsJobsJobs.Api.Data open JobsJobsJobs.Api.Data
open JobsJobsJobs.Domain open JobsJobsJobs.Domain
open JobsJobsJobs.Server.Data open JobsJobsJobs.DataMigrate
open Microsoft.EntityFrameworkCore open Microsoft.EntityFrameworkCore
open Microsoft.Extensions.Hosting open Microsoft.Extensions.Hosting
open Microsoft.Extensions.DependencyInjection open Microsoft.Extensions.DependencyInjection

View File

@ -1,12 +0,0 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "5.0.1",
"commands": [
"dotnet-ef"
]
}
}
}

View File

@ -1,108 +0,0 @@
using JobsJobsJobs.Server.Data;
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using NodaTime;
using System.Security.Claims;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Areas.Api.Controllers
{
/// <summary>
/// API controller for citizen information
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class CitizenController : ControllerBase
{
/// <summary>
/// Authorization configuration section
/// </summary>
private readonly IConfigurationSection _config;
/// <summary>
/// NodaTime clock
/// </summary>
private readonly IClock _clock;
/// <summary>
/// The data context to use for this request
/// </summary>
private readonly JobsDbContext _db;
/// <summary>
/// Constructor
/// </summary>
/// <param name="config">The authorization configuration section</param>
/// <param name="clock">The NodaTime clock instance</param>
/// <param name="db">The data context to use for this request</param>
public CitizenController(IConfiguration config, IClock clock, JobsDbContext db)
{
_config = config.GetSection("Auth");
_clock = clock;
_db = db;
}
/// <summary>
/// The current citizen ID
/// </summary>
private CitizenId CurrentCitizenId => CitizenId.Parse(User.FindFirst(ClaimTypes.NameIdentifier)!.Value);
[HttpGet("log-on/{authCode}")]
public async Task<IActionResult> LogOn([FromRoute] string authCode)
{
// Step 1 - Verify with Mastodon
var accountResult = await Auth.VerifyWithMastodon(authCode, _config);
if (accountResult.IsError) return BadRequest(accountResult.Error);
// Step 2 - Find / establish Jobs, Jobs, Jobs account
var account = accountResult.Ok;
var now = _clock.GetCurrentInstant();
var citizen = await _db.FindCitizenByNAUser(account.Username);
if (citizen == null)
{
citizen = new Citizen(await CitizenId.Create(), account.Username,
string.IsNullOrWhiteSpace(account.DisplayName) ? null : account.DisplayName, null, account.Url,
now, now);
await _db.AddCitizen(citizen);
}
else
{
citizen = citizen with
{
DisplayName = string.IsNullOrWhiteSpace(account.DisplayName) ? null : account.DisplayName,
LastSeenOn = now
};
_db.UpdateCitizen(citizen);
}
await _db.SaveChangesAsync();
// Step 3 - Generate JWT
var jwt = Auth.CreateJwt(citizen, _config);
return new JsonResult(new LogOnSuccess(jwt, citizen.Id.ToString(), citizen.CitizenName));
}
[Authorize]
[HttpGet("get/{id}")]
public async Task<IActionResult> GetCitizenById([FromRoute] string id)
{
var citizen = await _db.FindCitizenById(CitizenId.Parse(id));
return citizen == null ? NotFound() : Ok(citizen);
}
[Authorize]
[HttpDelete("")]
public async Task<IActionResult> Remove()
{
await _db.DeleteCitizen(CurrentCitizenId);
await _db.SaveChangesAsync();
return Ok();
}
}
}

View File

@ -1,32 +0,0 @@
using JobsJobsJobs.Server.Data;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Areas.Api.Controllers
{
/// <summary>
/// API endpoint for continent information
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class ContinentController : ControllerBase
{
/// <summary>
/// The data context to use for this request
/// </summary>
private readonly JobsDbContext _db;
/// <summary>
/// Constructor
/// </summary>
/// <param name="db">The data context to use for this request</param>
public ContinentController(JobsDbContext db)
{
_db = db;
}
[HttpGet("all")]
public async Task<IActionResult> All() =>
Ok(await _db.AllContinents());
}
}

View File

@ -1,52 +0,0 @@
using JobsJobsJobs.Server.Data;
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NodaTime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Areas.Api.Controllers
{
/// <summary>
/// API controller for job listings
/// </summary>
[Route("api/listings")]
[Authorize]
[ApiController]
public class ListingController : ControllerBase
{
/// <summary>
/// The data context
/// </summary>
private readonly JobsDbContext _db;
/// <summary>
/// The NodaTime clock instance
/// </summary>
private readonly IClock _clock;
/// <summary>
/// Constructor
/// </summary>
/// <param name="db">The data context to use for this request</param>
/// <param name="clock">The clock instance to use for this request</param>
public ListingController(JobsDbContext db, IClock clock)
{
_db = db;
_clock = clock;
}
/// <summary>
/// The current citizen ID
/// </summary>
private CitizenId CurrentCitizenId => CitizenId.Parse(User.FindFirst(ClaimTypes.NameIdentifier)!.Value);
[HttpGet("mine")]
public async Task<IActionResult> Mine() =>
Ok(await _db.FindListingsByCitizen(CurrentCitizenId));
}
}

View File

@ -1,147 +0,0 @@
using JobsJobsJobs.Server.Data;
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NodaTime;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Areas.Api.Controllers
{
/// <summary>
/// API controller for employment profile information
/// </summary>
[Route("api/[controller]")]
[Authorize]
[ApiController]
public class ProfileController : ControllerBase
{
/// <summary>
/// The data context
/// </summary>
private readonly JobsDbContext _db;
/// <summary>
/// The NodaTime clock instance
/// </summary>
private readonly IClock _clock;
/// <summary>
/// Constructor
/// </summary>
/// <param name="db">The data context to use for this request</param>
/// <param name="clock">The clock instance to use for this request</param>
public ProfileController(JobsDbContext db, IClock clock)
{
_db = db;
_clock = clock;
}
/// <summary>
/// The current citizen ID
/// </summary>
private CitizenId CurrentCitizenId => CitizenId.Parse(User.FindFirst(ClaimTypes.NameIdentifier)!.Value);
// This returns 204 to indicate that there is no profile data for the current citizen (if, of course, that is
// the case). The version where an ID is specified returns 404, which is an error condition, as it should not
// occur unless someone is messing with a URL.
[HttpGet("")]
public async Task<IActionResult> Get()
{
var profile = await _db.FindProfileByCitizen(CurrentCitizenId);
return profile == null ? NoContent() : Ok(profile);
}
[HttpPost("save")]
public async Task<IActionResult> Save(ProfileForm form)
{
// Profile
var existing = await _db.FindProfileByCitizen(CurrentCitizenId);
var profile = existing == null
? new Profile(CurrentCitizenId, form.IsSeekingEmployment, form.IsPublic,
ContinentId.Parse(form.ContinentId), form.Region, form.RemoteWork, form.FullTime,
new MarkdownString(form.Biography), _clock.GetCurrentInstant(),
string.IsNullOrEmpty(form.Experience) ? null : new MarkdownString(form.Experience))
: existing with
{
SeekingEmployment = form.IsSeekingEmployment,
IsPublic = form.IsPublic,
ContinentId = ContinentId.Parse(form.ContinentId),
Region = form.Region,
RemoteWork = form.RemoteWork,
FullTime = form.FullTime,
Biography = new MarkdownString(form.Biography),
LastUpdatedOn = _clock.GetCurrentInstant(),
Experience = string.IsNullOrEmpty(form.Experience) ? null : new MarkdownString(form.Experience)
};
await _db.SaveProfile(profile);
// Skills
var skills = new List<Skill>();
foreach (var skill in form.Skills) {
skills.Add(new Skill(skill.Id.StartsWith("new") ? await SkillId.Create() : SkillId.Parse(skill.Id),
CurrentCitizenId, skill.Description, string.IsNullOrEmpty(skill.Notes) ? null : skill.Notes));
}
foreach (var skill in skills) await _db.SaveSkill(skill);
await _db.DeleteMissingSkills(CurrentCitizenId, skills.Select(s => s.Id));
// Real Name
_db.Update((await _db.FindCitizenById(CurrentCitizenId))!
with { RealName = string.IsNullOrWhiteSpace(form.RealName) ? null : form.RealName });
await _db.SaveChangesAsync();
return Ok();
}
[HttpGet("count")]
public async Task<IActionResult> GetProfileCount() =>
Ok(new Count(await _db.CountProfiles()));
[HttpGet("skill-count")]
public async Task<IActionResult> GetSkillCount() =>
Ok(new Count(await _db.CountSkillsByCitizen(CurrentCitizenId)));
[HttpGet("get/{id}")]
public async Task<IActionResult> GetProfileForCitizen([FromRoute] string id)
{
var profile = await _db.FindProfileByCitizen(CitizenId.Parse(id));
return profile == null ? NotFound() : Ok(profile);
}
[HttpGet("search")]
public async Task<IActionResult> Search([FromQuery] ProfileSearch search) =>
Ok(await _db.SearchProfiles(search));
[HttpGet("public-search")]
[AllowAnonymous]
public async Task<IActionResult> SearchPublic([FromQuery] PublicSearch search) =>
Ok(await _db.SearchPublicProfiles(search));
[HttpPatch("employment-found")]
public async Task<IActionResult> EmploymentFound()
{
var profile = await _db.FindProfileByCitizen(CurrentCitizenId);
if (profile == null) return NotFound();
var updated = profile with { SeekingEmployment = false };
_db.Update(updated);
await _db.SaveChangesAsync();
return Ok();
}
[HttpDelete("")]
public async Task<IActionResult> Remove()
{
await _db.DeleteProfileByCitizen(CurrentCitizenId);
await _db.SaveChangesAsync();
return Ok();
}
}
}

View File

@ -1,80 +0,0 @@
using JobsJobsJobs.Server.Data;
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NodaTime;
using System.Security.Claims;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Areas.Api.Controllers
{
/// <summary>
/// API controller for success stories
/// </summary>
[Route("api/[controller]")]
[Authorize]
[ApiController]
public class SuccessController : Controller
{
/// <summary>
/// The data context
/// </summary>
private readonly JobsDbContext _db;
/// <summary>
/// The NodaTime clock instance
/// </summary>
private readonly IClock _clock;
/// <summary>
/// Constructor
/// </summary>
/// <param name="db">The data context to use for this request</param>
/// <param name="clock">The clock instance to use for this request</param>
public SuccessController(JobsDbContext db, IClock clock)
{
_db = db;
_clock = clock;
}
/// <summary>
/// The current citizen ID
/// </summary>
private CitizenId CurrentCitizenId => CitizenId.Parse(User.FindFirst(ClaimTypes.NameIdentifier)!.Value);
[HttpGet("{id}")]
public async Task<IActionResult> Retrieve(string id) =>
Ok(await _db.FindSuccessById(SuccessId.Parse(id)));
[HttpPost("save")]
public async Task<IActionResult> Save([FromBody] StoryForm form)
{
if (form.Id == "new")
{
var story = new Success(await SuccessId.Create(), CurrentCitizenId, _clock.GetCurrentInstant(),
form.FromHere, // "profile",
string.IsNullOrWhiteSpace(form.Story) ? null : new MarkdownString(form.Story));
await _db.AddAsync(story);
}
else
{
var story = await _db.FindSuccessById(SuccessId.Parse(form.Id));
if (story == null) return NotFound();
var updated = story with
{
FromHere = form.FromHere,
Story = string.IsNullOrWhiteSpace(form.Story) ? null : new MarkdownString(form.Story)
};
_db.Update(updated);
}
await _db.SaveChangesAsync();
return Ok();
}
[HttpGet("list")]
public async Task<IActionResult> List() =>
Ok(await _db.AllStories());
}
}

View File

@ -1,112 +0,0 @@
using JobsJobsJobs.Server.Models;
using JobsJobsJobs.Shared;
using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Security.Claims;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server
{
/// <summary>
/// Authentication / authorization utility methods
/// </summary>
public static class Auth
{
/// <summary>
/// Verify the authorization code with Mastodon and get the user's profile
/// </summary>
/// <param name="authCode">The code from the authorization flow</param>
/// <param name="config">The authorization configuration section</param>
/// <returns>The Mastodon account (or an error if one is encountered)</returns>
public static async Task<Result<MastodonAccount>> VerifyWithMastodon(string authCode,
IConfigurationSection config)
{
using var http = new HttpClient();
// Use authorization code to get an access token from NAS
using var codeResult = await http.PostAsJsonAsync("https://noagendasocial.com/oauth/token", new
{
client_id = config["ClientId"],
client_secret = config["Secret"],
redirect_uri = $"{config["ReturnHost"]}/citizen/authorized",
grant_type = "authorization_code",
code = authCode,
scope = "read"
});
if (!codeResult.IsSuccessStatusCode)
{
Console.WriteLine($"ERR: {await codeResult.Content.ReadAsStringAsync()}");
return Result<MastodonAccount>.AsError(
$"Could not get token ({codeResult.StatusCode:D}: {codeResult.ReasonPhrase})");
}
using var tokenResponse = JsonSerializer.Deserialize<JsonDocument>(
new ReadOnlySpan<byte>(await codeResult.Content.ReadAsByteArrayAsync()));
if (tokenResponse == null)
{
return Result<MastodonAccount>.AsError("Could not parse authorization code result");
}
var accessToken = tokenResponse.RootElement.GetProperty("access_token").GetString();
// Use access token to get profile from NAS
using var req = new HttpRequestMessage(HttpMethod.Get, $"{config["ApiUrl"]}accounts/verify_credentials");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
using var profileResult = await http.SendAsync(req);
if (!profileResult.IsSuccessStatusCode)
{
return Result<MastodonAccount>.AsError(
$"Could not get profile ({profileResult.StatusCode:D}: {profileResult.ReasonPhrase})");
}
var profileResponse = JsonSerializer.Deserialize<MastodonAccount>(
new ReadOnlySpan<byte>(await profileResult.Content.ReadAsByteArrayAsync()));
if (profileResponse == null)
{
return Result<MastodonAccount>.AsError("Could not parse profile result");
}
if (profileResponse.Username != profileResponse.AccountName)
{
return Result<MastodonAccount>.AsError(
$"Profiles must be from noagendasocial.com; yours is {profileResponse.AccountName}");
}
return Result<MastodonAccount>.AsOk(profileResponse);
}
/// <summary>
/// Create a JSON Web Token for this citizen to use for further requests to this API
/// </summary>
/// <param name="citizen">The citizen for which the token should be generated</param>
/// <param name="config">The authorization configuration section</param>
/// <returns>The JWT</returns>
public static string CreateJwt(Citizen citizen, IConfigurationSection config)
{
var tokenHandler = new JwtSecurityTokenHandler();
var token = tokenHandler.CreateToken(new SecurityTokenDescriptor
{
Subject = new ClaimsIdentity(new[]
{
new Claim(ClaimTypes.NameIdentifier, citizen.Id.ToString()),
new Claim(ClaimTypes.Name, citizen.CitizenName),
}),
Expires = DateTime.UtcNow.AddHours(2),
Issuer = "https://noagendacareers.com",
Audience = "https://noagendacareers.com",
SigningCredentials = new SigningCredentials(
new SymmetricSecurityKey(Encoding.UTF8.GetBytes(config["ServerSecret"])),
SecurityAlgorithms.HmacSha256Signature)
});
return tokenHandler.WriteToken(token);
}
}
}

View File

@ -1,61 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Extensions to JobsDbContext supporting the manipulation of citizens
/// </summary>
public static class CitizenExtensions
{
/// <summary>
/// Retrieve a citizen by their Jobs, Jobs, Jobs ID
/// </summary>
/// <param name="citizenId">The ID of the citizen to retrieve</param>
/// <returns>The citizen, or null if not found</returns>
public static async Task<Citizen?> FindCitizenById(this JobsDbContext db, CitizenId citizenId) =>
await db.Citizens.AsNoTracking()
.SingleOrDefaultAsync(c => c.Id == citizenId)
.ConfigureAwait(false);
/// <summary>
/// Retrieve a citizen by their No Agenda Social user name
/// </summary>
/// <param name="naUser">The NAS user name</param>
/// <returns>The citizen, or null if not found</returns>
public static async Task<Citizen?> FindCitizenByNAUser(this JobsDbContext db, string naUser) =>
await db.Citizens.AsNoTracking()
.SingleOrDefaultAsync(c => c.NaUser == naUser)
.ConfigureAwait(false);
/// <summary>
/// Add a citizen
/// </summary>
/// <param name="citizen">The citizen to be added</param>
public static async Task AddCitizen(this JobsDbContext db, Citizen citizen) =>
await db.Citizens.AddAsync(citizen).ConfigureAwait(false);
/// <summary>
/// Update a citizen after they have logged on (update last seen, sync display name)
/// </summary>
/// <param name="citizen">The updated citizen</param>
public static void UpdateCitizen(this JobsDbContext db, Citizen citizen) =>
db.Entry(citizen).State = EntityState.Modified;
/// <summary>
/// Delete a citizen
/// </summary>
/// <param name="citizenId">The ID of the citizen to be deleted</param>
/// <returns></returns>
public static async Task DeleteCitizen(this JobsDbContext db, CitizenId citizenId)
{
var id = citizenId.ToString();
await db.DeleteProfileByCitizen(citizenId).ConfigureAwait(false);
await db.Database.ExecuteSqlInterpolatedAsync($"DELETE FROM jjj.success WHERE citizen_id = {id}")
.ConfigureAwait(false);
await db.Database.ExecuteSqlInterpolatedAsync($"DELETE FROM jjj.citizen WHERE id = {id}")
.ConfigureAwait(false);
}
}
}

View File

@ -1,31 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Data extensions for manipulation of continent objects
/// </summary>
public static class ContinentExtensions
{
/// <summary>
/// Retrieve all continents
/// </summary>
/// <returns>All continents</returns>
public static async Task<IEnumerable<Continent>> AllContinents(this JobsDbContext db) =>
await db.Continents.AsNoTracking().OrderBy(c => c.Name).ToListAsync().ConfigureAwait(false);
/// <summary>
/// Retrieve a continent by its ID
/// </summary>
/// <param name="continentId">The ID of the continent to retrieve</param>
/// <returns>The continent matching the ID</returns>
public static async Task<Continent> FindContinentById(this JobsDbContext db, ContinentId continentId) =>
await db.Continents.AsNoTracking()
.SingleAsync(c => c.Id == continentId)
.ConfigureAwait(false);
}
}

View File

@ -1,53 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Converters used to translate between database and domain types
/// </summary>
public static class Converters
{
/// <summary>
/// Citizen ID converter
/// </summary>
public static readonly ValueConverter<CitizenId, string> CitizenIdConverter =
new(v => v.ToString(), v => CitizenId.Parse(v));
/// <summary>
/// Continent ID converter
/// </summary>
public static readonly ValueConverter<ContinentId, string> ContinentIdConverter =
new(v => v.ToString(), v => ContinentId.Parse(v));
/// <summary>
/// Job Listing ID converter
/// </summary>
public static readonly ValueConverter<ListingId, string> ListingIdConverter =
new(v => v.ToString(), v => ListingId.Parse(v));
/// <summary>
/// Markdown converter
/// </summary>
public static readonly ValueConverter<MarkdownString, string> MarkdownStringConverter =
new(v => v.Text, v => new MarkdownString(v));
/// <summary>
/// Markdown converter for possibly-null values
/// </summary>
public static readonly ValueConverter<MarkdownString?, string?> OptionalMarkdownStringConverter =
new(v => v == null ? null : v.Text, v => v == null ? null : new MarkdownString(v));
/// <summary>
/// Skill ID converter
/// </summary>
public static readonly ValueConverter<SkillId, string> SkillIdConverter =
new(v => v.ToString(), v => SkillId.Parse(v));
/// <summary>
/// Success ID converter
/// </summary>
public static readonly ValueConverter<SuccessId, string> SuccessIdConverter =
new(v => v.ToString(), v => SuccessId.Parse(v));
}
}

View File

@ -1,152 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.EntityFrameworkCore;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Data context for Jobs, Jobs, Jobs
/// </summary>
public class JobsDbContext : DbContext
{
/// <summary>
/// Citizens (users known to us)
/// </summary>
public DbSet<Citizen> Citizens { get; set; } = default!;
/// <summary>
/// Continents (large land masses - 7 of them!)
/// </summary>
public DbSet<Continent> Continents { get; set; } = default!;
/// <summary>
/// Job listings
/// </summary>
public DbSet<Listing> Listings { get; set; } = default!;
/// <summary>
/// Employment profiles
/// </summary>
public DbSet<Profile> Profiles { get; set; } = default!;
/// <summary>
/// Skills held by citizens of Gitmo Nation
/// </summary>
public DbSet<Skill> Skills { get; set; } = default!;
/// <summary>
/// Success stories from the site
/// </summary>
public DbSet<Success> Successes { get; set; } = default!;
/// <summary>
/// Constructor
/// </summary>
/// <param name="options">The options to use to configure this instance</param>
public JobsDbContext(DbContextOptions<JobsDbContext> options) : base(options) { }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Citizen>(m =>
{
m.ToTable("citizen", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter);
m.Property(e => e.NaUser).HasColumnName("na_user").IsRequired().HasMaxLength(50);
m.Property(e => e.DisplayName).HasColumnName("display_name").HasMaxLength(255);
m.Property(e => e.ProfileUrl).HasColumnName("profile_url").IsRequired().HasMaxLength(1_024);
m.Property(e => e.JoinedOn).HasColumnName("joined_on").IsRequired();
m.Property(e => e.LastSeenOn).HasColumnName("last_seen_on").IsRequired();
m.Property(e => e.RealName).HasColumnName("real_name").HasMaxLength(255);
m.HasIndex(e => e.NaUser).IsUnique();
m.Ignore(e => e.CitizenName);
});
modelBuilder.Entity<Continent>(m =>
{
m.ToTable("continent", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ContinentIdConverter);
m.Property(e => e.Name).HasColumnName("name").IsRequired().HasMaxLength(255);
});
modelBuilder.Entity<Listing>(m =>
{
m.ToTable("listing", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ListingIdConverter);
m.Property(e => e.CitizenId).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter);
m.Property(e => e.CreatedOn).HasColumnName("created_on").IsRequired();
m.Property(e => e.Title).HasColumnName("title").IsRequired().HasMaxLength(100);
m.Property(e => e.ContinentId).HasColumnName("continent_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ContinentIdConverter);
m.Property(e => e.Region).HasColumnName("region").IsRequired().HasMaxLength(255);
m.Property(e => e.RemoteWork).HasColumnName("remote_work").IsRequired();
m.Property(e => e.IsExpired).HasColumnName("expired").IsRequired();
m.Property(e => e.UpdatedOn).HasColumnName("updated_on").IsRequired();
m.Property(e => e.Text).HasColumnName("listing").IsRequired()
.HasConversion(Converters.MarkdownStringConverter);
m.Property(e => e.NeededBy).HasColumnName("needed_by");
m.Property(e => e.WasFilledHere).HasColumnName("filled_here");
m.HasOne(e => e.Citizen)
.WithMany()
.HasForeignKey(e => e.CitizenId);
m.HasOne(e => e.Continent)
.WithMany()
.HasForeignKey(e => e.ContinentId);
});
modelBuilder.Entity<Profile>(m =>
{
m.ToTable("profile", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter);
m.Property(e => e.SeekingEmployment).HasColumnName("seeking_employment").IsRequired();
m.Property(e => e.IsPublic).HasColumnName("is_public").IsRequired();
m.Property(e => e.ContinentId).HasColumnName("continent_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.ContinentIdConverter);
m.Property(e => e.Region).HasColumnName("region").IsRequired().HasMaxLength(255);
m.Property(e => e.RemoteWork).HasColumnName("remote_work").IsRequired();
m.Property(e => e.FullTime).HasColumnName("full_time").IsRequired();
m.Property(e => e.Biography).HasColumnName("biography").IsRequired()
.HasConversion(Converters.MarkdownStringConverter);
m.Property(e => e.LastUpdatedOn).HasColumnName("last_updated_on").IsRequired();
m.Property(e => e.Experience).HasColumnName("experience")
.HasConversion(Converters.OptionalMarkdownStringConverter);
m.HasOne(e => e.Continent)
.WithMany()
.HasForeignKey(e => e.ContinentId);
m.HasMany(e => e.Skills)
.WithOne()
.HasForeignKey(e => e.CitizenId);
});
modelBuilder.Entity<Skill>(m =>
{
m.ToTable("skill", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.SkillIdConverter);
m.Property(e => e.CitizenId).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter);
m.Property(e => e.Description).HasColumnName("skill").IsRequired().HasMaxLength(100);
m.Property(e => e.Notes).HasColumnName("notes").HasMaxLength(100);
});
modelBuilder.Entity<Success>(m =>
{
m.ToTable("success", "jjj").HasKey(e => e.Id);
m.Property(e => e.Id).HasColumnName("id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.SuccessIdConverter);
m.Property(e => e.CitizenId).HasColumnName("citizen_id").IsRequired().HasMaxLength(12)
.HasConversion(Converters.CitizenIdConverter);
m.Property(e => e.RecordedOn).HasColumnName("recorded_on").IsRequired();
m.Property(e => e.FromHere).HasColumnName("from_here").IsRequired();
// m.Property(e => e.Source).HasColumnName("source").IsRequired().HasMaxLength(7);
m.Property(e => e.Story).HasColumnName("story")
.HasConversion(Converters.OptionalMarkdownStringConverter);
});
}
}
}

View File

@ -1,25 +0,0 @@
using JobsJobsJobs.Shared;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Extensions to JobsDbContext to support manipulation of job listings
/// </summary>
public static class ListingExtensions
{
/// <summary>
/// Find all job listings for the given citizen ID
/// </summary>
/// <param name="citizenId">The citizen ID for which job listings should be retrieved</param>
/// <returns>The job listings entered by the given citizen</returns>
public static async Task<IEnumerable<Listing>> FindListingsByCitizen(this JobsDbContext db, CitizenId citizenId)
=> await db.Listings.AsNoTracking()
.Where(l => l.CitizenId == citizenId)
.ToListAsync().ConfigureAwait(false);
}
}

View File

@ -1,206 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Extensions to JobsDbContext to support manipulation of profiles
/// </summary>
public static class ProfileExtensions
{
/// <summary>
/// Retrieve an employment profile by a citizen ID
/// </summary>
/// <param name="citizenId">The ID of the citizen whose profile should be retrieved</param>
/// <returns>The profile, or null if it does not exist</returns>
public static async Task<Profile?> FindProfileByCitizen(this JobsDbContext db, CitizenId citizenId) =>
await db.Profiles.AsNoTracking()
.Include(p => p.Continent)
.Include(p => p.Skills)
.SingleOrDefaultAsync(p => p.Id == citizenId)
.ConfigureAwait(false);
/// <summary>
/// Save a profile
/// </summary>
/// <param name="profile">The profile to be saved</param>
public static async Task SaveProfile(this JobsDbContext db, Profile profile)
{
if (await db.Profiles.CountAsync(p => p.Id == profile.Id).ConfigureAwait(false) == 0)
{
await db.AddAsync(profile).ConfigureAwait(false);
}
else
{
db.Entry(profile).State = EntityState.Modified;
}
}
/// <summary>
/// Save a skill
/// </summary>
/// <param name="skill">The skill to be saved</param>
public static async Task SaveSkill(this JobsDbContext db, Skill skill)
{
if (await db.Skills.CountAsync(s => s.Id == skill.Id).ConfigureAwait(false) == 0)
{
await db.Skills.AddAsync(skill).ConfigureAwait(false);
}
else
{
db.Entry(skill).State = EntityState.Modified;
}
}
/// <summary>
/// Delete any skills that are not in the list of current skill IDs
/// </summary>
/// <param name="citizenId">The ID of the citizen to whom the skills belong</param>
/// <param name="ids">The IDs of their current skills</param>
public static async Task DeleteMissingSkills(this JobsDbContext db, CitizenId citizenId,
IEnumerable<SkillId> ids)
{
if (!ids.Any()) return;
db.Skills.RemoveRange(await db.Skills.AsNoTracking()
.Where(s => s.CitizenId == citizenId && !ids.Contains(s.Id)).ToListAsync()
.ConfigureAwait(false));
}
/// <summary>
/// Get a count of the citizens with profiles
/// </summary>
/// <returns>The number of citizens with profiles</returns>
public static async Task<int> CountProfiles(this JobsDbContext db) =>
await db.Profiles.CountAsync().ConfigureAwait(false);
/// <summary>
/// Count the skills for the given citizen
/// </summary>
/// <param name="citizenId">The ID of the citizen whose skills should be counted</param>
/// <returns>The count of skills for the given citizen</returns>
public static async Task<int> CountSkillsByCitizen(this JobsDbContext db, CitizenId citizenId) =>
await db.Skills.CountAsync(s => s.CitizenId == citizenId).ConfigureAwait(false);
/// <summary>
/// Search profiles by the given criteria
/// </summary>
/// <param name="search">The search parameters</param>
/// <returns>The information for profiles matching the criteria</returns>
public static async Task<IEnumerable<ProfileSearchResult>> SearchProfiles(this JobsDbContext db,
ProfileSearch search)
{
var query = db.Profiles
.Join(db.Citizens, p => p.Id, c => c.Id, (p, c) => new { Profile = p, Citizen = c });
var useIds = false;
var citizenIds = new List<CitizenId>();
if (!string.IsNullOrEmpty(search.ContinentId))
{
query = query.Where(it => it.Profile.ContinentId == ContinentId.Parse(search.ContinentId));
}
if (!string.IsNullOrEmpty(search.RemoteWork))
{
query = query.Where(it => it.Profile.RemoteWork == (search.RemoteWork == "yes"));
}
if (!string.IsNullOrEmpty(search.Skill))
{
useIds = true;
citizenIds.AddRange(await db.Skills
.Where(s => s.Description.ToLower().Contains(search.Skill.ToLower()))
.Select(s => s.CitizenId)
.ToListAsync().ConfigureAwait(false));
}
if (!string.IsNullOrEmpty(search.BioExperience))
{
useIds = true;
citizenIds.AddRange(await db.Profiles
.FromSqlRaw("SELECT citizen_id FROM profile WHERE biography ILIKE {0} OR experience ILIKE {0}",
$"%{search.BioExperience}%")
.Select(p => p.Id)
.ToListAsync().ConfigureAwait(false));
}
if (useIds)
{
query = query.Where(it => citizenIds.Contains(it.Citizen.Id));
}
return await query.Select(x => new ProfileSearchResult(x.Citizen.Id, x.Citizen.CitizenName,
x.Profile.SeekingEmployment, x.Profile.RemoteWork, x.Profile.FullTime, x.Profile.LastUpdatedOn))
.ToListAsync().ConfigureAwait(false);
}
/// <summary>
/// Search public profiles by the given criteria
/// </summary>
/// <param name="search">The search parameters</param>
/// <returns>The information for profiles matching the criteria</returns>
public static async Task<IEnumerable<PublicSearchResult>> SearchPublicProfiles(this JobsDbContext db,
PublicSearch search)
{
var query = db.Profiles
.Include(it => it.Continent)
.Include(it => it.Skills)
.Where(it => it.IsPublic);
var useIds = false;
var citizenIds = new List<CitizenId>();
if (!string.IsNullOrEmpty(search.ContinentId))
{
query = query.Where(it => it.ContinentId == ContinentId.Parse(search.ContinentId));
}
if (!string.IsNullOrEmpty(search.Region))
{
query = query.Where(it => it.Region.ToLower().Contains(search.Region.ToLower()));
}
if (!string.IsNullOrEmpty(search.RemoteWork))
{
query = query.Where(it => it.RemoteWork == (search.RemoteWork == "yes"));
}
if (!string.IsNullOrEmpty(search.Skill))
{
useIds = true;
citizenIds.AddRange(await db.Skills
.Where(s => s.Description.ToLower().Contains(search.Skill.ToLower()))
.Select(s => s.CitizenId)
.ToListAsync().ConfigureAwait(false));
}
if (useIds)
{
query = query.Where(it => citizenIds.Contains(it.Id));
}
return await query.Select(x => new PublicSearchResult(x.Continent!.Name, x.Region, x.RemoteWork,
x.Skills.Select(sk => $"{sk.Description} ({sk.Notes})")))
.ToListAsync().ConfigureAwait(false);
}
/// <summary>
/// Delete skills and profile for the given citizen
/// </summary>
/// <param name="citizenId">The ID of the citizen whose profile should be deleted</param>
public static async Task DeleteProfileByCitizen(this JobsDbContext db, CitizenId citizenId)
{
var id = citizenId.ToString();
await db.Database.ExecuteSqlInterpolatedAsync($"DELETE FROM jjj.skill WHERE citizen_id = {id}")
.ConfigureAwait(false);
await db.Database.ExecuteSqlInterpolatedAsync($"DELETE FROM jjj.profile WHERE citizen_id = {id}")
.ConfigureAwait(false);
}
}
}

View File

@ -1,35 +0,0 @@
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Data
{
/// <summary>
/// Extensions to JobsDbContext to support manipulation of success stories
/// </summary>
public static class SuccessExtensions
{
/// <summary>
/// Get a success story by its ID
/// </summary>
/// <param name="id">The ID of the story to retrieve</param>
/// <returns>The success story, if found</returns>
public static async Task<Success?> FindSuccessById(this JobsDbContext db, SuccessId id) =>
await db.Successes.AsNoTracking().SingleOrDefaultAsync(s => s.Id == id).ConfigureAwait(false);
/// <summary>
/// Get a list of success stories, with the information needed for the list page
/// </summary>
/// <returns>A list of success stories, citizen names, and dates</returns>
public static async Task<IEnumerable<StoryEntry>> AllStories(this JobsDbContext db) =>
await db.Successes
.Join(db.Citizens, s => s.CitizenId, c => c.Id, (s, c) => new { Success = s, Citizen = c })
.OrderByDescending(it => it.Success.RecordedOn)
.Select(it => new StoryEntry(it.Success.Id, it.Citizen.Id, it.Citizen.CitizenName,
it.Success.RecordedOn, it.Success.FromHere, it.Success.Story != null))
.ToListAsync().ConfigureAwait(false);
}
}

View File

@ -1,27 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<UserSecretsId>553960ef-0c79-47d4-98d8-9ca1708e558f</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.1" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.0.0" />
<PackageReference Include="Npgsql" Version="5.0.1.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="5.0.1" />
<PackageReference Include="Npgsql.NodaTime" Version="5.0.1.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Client\JobsJobsJobs.Client.csproj" />
<ProjectReference Include="..\Shared\JobsJobsJobs.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RazorPage_SelectedScaffolderID>RazorPageScaffolder</RazorPage_SelectedScaffolderID>
<RazorPage_SelectedScaffolderCategoryPath>root/Common/RazorPage</RazorPage_SelectedScaffolderCategoryPath>
<ActiveDebugProfile>JobsJobsJobs.Server</ActiveDebugProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>C:\Users\danie\Documents\sandbox\jobs-jobs-jobs\src\JobsJobsJobs\Server\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

@ -1,34 +0,0 @@
using System.Text.Json.Serialization;
namespace JobsJobsJobs.Server.Models
{
/// <summary>
/// The variables we need from the account information we get from No Agenda Social
/// </summary>
public class MastodonAccount
{
/// <summary>
/// The user name (what we store as naUser)
/// </summary>
[JsonPropertyName("username")]
public string Username { get; set; } = "";
/// <summary>
/// The account name; will be the same as username for local (non-federated) accounts
/// </summary>
[JsonPropertyName("acct")]
public string AccountName { get; set; } = "";
/// <summary>
/// The user's display name as it currently shows on No Agenda Social
/// </summary>
[JsonPropertyName("display_name")]
public string DisplayName { get; set; } = "";
/// <summary>
/// The user's profile URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; } = "";
}
}

View File

@ -1,42 +0,0 @@
@page
@model JobsJobsJobs.Server.Pages.ErrorModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Error</title>
<link href="~/css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="~/css/app.css" rel="stylesheet" />
</head>
<body>
<div class="main">
<div class="content px-4">
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
</div>
</div>
</body>
</html>

View File

@ -1,32 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
public string RequestId { get; set; } = default!;
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

View File

@ -1,45 +0,0 @@
@page
@model JobsJobsJobs.Server.Pages._HostModel
@{
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Jobs, Jobs, Jobs</title>
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="JobsJobsJobs.Client.styles.css" rel="stylesheet" />
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet">
</head>
<body>
<div id="app">
<component type="typeof(JobsJobsJobs.Client.App)" render-mode="WebAssemblyPrerendered" />
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script>
var Audio = {
play(audio) {
document.getElementById(audio).play()
}
}
function setPageTitle(theTitle) {
document.title = theTitle
}
function getTimeZone() {
return Intl.DateTimeFormat().resolvedOptions().timeZone
}
</script>
</body>
</html>

View File

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace JobsJobsJobs.Server.Pages
{
public class _HostModel : PageModel
{
public void OnGet()
{
}
}
}

View File

@ -1,26 +0,0 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace JobsJobsJobs.Server
{
public 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<Startup>();
});
}
}

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net5.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishSingleFile>True</PublishSingleFile>
<PublishTrimmed>True</PublishTrimmed>
<ProjectGuid>35aeecbf-489d-41c5-9ba3-6e43ad7a8196</ProjectGuid>
<SelfContained>true</SelfContained>
</PropertyGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More