Compare commits

..

No commits in common. "main" and "v1.0.1" have entirely different histories.
main ... v1.0.1

165 changed files with 6293 additions and 6574 deletions

View File

@ -1,5 +0,0 @@
{
"version": 1,
"isRoot": true,
"tools": {}
}

5
.gitignore vendored
View File

@ -1,9 +1,6 @@
.ionide .ionide
.idea .fake
src/**/bin src/**/bin
src/**/obj src/**/obj
src/**/appsettings.*.json src/**/appsettings.*.json
src/.vs src/.vs
src/.idea
.fake

View File

@ -1,3 +0,0 @@
{
"editor.inlayHints.enabled": "offUnlessPressed"
}

View File

@ -1,29 +0,0 @@
# Jobs, Jobs, Jobs Version 3
Version 3 of Jobs, Jobs, Jobs is now available! This major release covers:
- Separating accounts from their Mastodon dependence
- Supporting chronological employment history in profiles
- Allowing profiles to be shared publicly
- Printing employment profiles
- Simplifying the infrastructure on which it runs
## Come One, Come All, Human Resources!
Previous versions utilized Mastodon and its API to authorize users with No Agenda-affiliated instances. This ended up being both too restrictive and unreliable. Version 3 handles user accounts itself, so registration is not tied to another service.
## Migrating Your Information from v2
The content from v2 is available in v3, but will not be visible until it is associated with a v3-created account. If you had content in v2, you should have received a message from @danieljsummers on No Agenda Social with instructions. _(NOTE: ITM, Slaves! and Liberty Woof have closed, so these people could not be reached directly.)_ The process is:
- [Create an account](https://noagendacareers.com/citizen/register)
- Verify that account
- Reply to the private message on Mastodon with the information requested
v2 data will be removed at some point after June 1st, 2023.
## How Does It Work?
Jobs, Jobs, Jobs is a job site that supports both employment profiles and job listings, allowing its users to either look for or recruit qualified people from the No Agenda tribe. The best way to get started would be to [look over the help files](https://noagendacareers.com/how-it-works). Then, register for an account, copy/paste your résumé there, or take a bit more time and fill out a full employment profile. If you are a person who hires or recruits, post your open positions.
In short - **use it**; a site like this only works if it provides value, and it has no value without your participation.

View File

@ -1,26 +1,10 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /jjj WORKDIR /jjj
COPY ./JobsJobsJobs.sln ./
COPY ./JobsJobsJobs/Directory.Build.props ./JobsJobsJobs/
COPY ./JobsJobsJobs/Application/JobsJobsJobs.Application.fsproj ./JobsJobsJobs/Application/
COPY ./JobsJobsJobs/Citizens/JobsJobsJobs.Citizens.fsproj ./JobsJobsJobs/Citizens/
COPY ./JobsJobsJobs/Common/JobsJobsJobs.Common.fsproj ./JobsJobsJobs/Common/
COPY ./JobsJobsJobs/Home/JobsJobsJobs.Home.fsproj ./JobsJobsJobs/Home/
COPY ./JobsJobsJobs/Listings/JobsJobsJobs.Listings.fsproj ./JobsJobsJobs/Listings/
COPY ./JobsJobsJobs/Profiles/JobsJobsJobs.Profiles.fsproj ./JobsJobsJobs/Profiles/
COPY ./JobsJobsJobs/SuccessStories/JobsJobsJobs.SuccessStories.fsproj ./JobsJobsJobs/SuccessStories/
RUN dotnet restore
COPY . ./ COPY . ./
WORKDIR /jjj/JobsJobsJobs/Application WORKDIR /jjj/JobsJobsJobs/Server
RUN dotnet publish -c Release -r linux-x64 RUN dotnet publish JobsJobsJobs.Server.csproj -c Release /p:PublishProfile=Properties/PublishProfiles/FolderProfile.xml
RUN rm bin/Release/net8.0/linux-x64/publish/appsettings.*.json
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as final FROM mcr.microsoft.com/dotnet/aspnet:5.0
WORKDIR /app WORKDIR /jjj
RUN apk add --no-cache icu-libs COPY --from=build /jjj/JobsJobsJobs/Server/bin/Release/net5.0/linux-x64/publish/ ./
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false ENTRYPOINT [ "/jjj/JobsJobsJobs.Server" ]
COPY --from=build /jjj/JobsJobsJobs/Application/bin/Release/net8.0/linux-x64/publish/ ./
EXPOSE 80
CMD [ "dotnet", "/app/JobsJobsJobs.Application.dll" ]

View File

@ -3,64 +3,39 @@ 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 database\12-add-real-name.sql = database\12-add-real-name.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}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Application", "JobsJobsJobs\Application\JobsJobsJobs.Application.fsproj", "{8F5A3D1E-562B-4F27-9787-6CB14B35E69E}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Citizens", "JobsJobsJobs\Citizens\JobsJobsJobs.Citizens.fsproj", "{4C184AB8-DDA7-4545-BC84-A4ACCBE29764}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Common", "JobsJobsJobs\Common\JobsJobsJobs.Common.fsproj", "{D6E4A943-5113-41ED-A547-8D3BE5516DC0}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Home", "JobsJobsJobs\Home\JobsJobsJobs.Home.fsproj", "{974AC330-FA47-479D-8927-D40E82EFE223}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Listings", "JobsJobsJobs\Listings\JobsJobsJobs.Listings.fsproj", "{0BE66D08-95AC-4E0F-8A79-0A97602A3E08}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Profiles", "JobsJobsJobs\Profiles\JobsJobsJobs.Profiles.fsproj", "{0B89D606-A094-4E82-8F8A-9D72D6A0E805}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SuccessStories", "JobsJobsJobs\SuccessStories\JobsJobsJobs.SuccessStories.fsproj", "{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8F5A3D1E-562B-4F27-9787-6CB14B35E69E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F5A3D1E-562B-4F27-9787-6CB14B35E69E}.Debug|Any CPU.Build.0 = Debug|Any CPU {35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F5A3D1E-562B-4F27-9787-6CB14B35E69E}.Release|Any CPU.ActiveCfg = Release|Any CPU {35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F5A3D1E-562B-4F27-9787-6CB14B35E69E}.Release|Any CPU.Build.0 = Release|Any CPU {35AEECBF-489D-41C5-9BA3-6E43AD7A8196}.Release|Any CPU.Build.0 = Release|Any CPU
{D6E4A943-5113-41ED-A547-8D3BE5516DC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6E4A943-5113-41ED-A547-8D3BE5516DC0}.Debug|Any CPU.Build.0 = Debug|Any CPU {16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6E4A943-5113-41ED-A547-8D3BE5516DC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6E4A943-5113-41ED-A547-8D3BE5516DC0}.Release|Any CPU.Build.0 = Release|Any CPU {16771650-F0F4-4B9C-8C63-D9BFFC94F90A}.Release|Any CPU.Build.0 = Release|Any CPU
{4C184AB8-DDA7-4545-BC84-A4ACCBE29764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AE329284-47DA-4E76-B542-47489B271130}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C184AB8-DDA7-4545-BC84-A4ACCBE29764}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE329284-47DA-4E76-B542-47489B271130}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C184AB8-DDA7-4545-BC84-A4ACCBE29764}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE329284-47DA-4E76-B542-47489B271130}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C184AB8-DDA7-4545-BC84-A4ACCBE29764}.Release|Any CPU.Build.0 = Release|Any CPU {AE329284-47DA-4E76-B542-47489B271130}.Release|Any CPU.Build.0 = Release|Any CPU
{0B89D606-A094-4E82-8F8A-9D72D6A0E805}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B89D606-A094-4E82-8F8A-9D72D6A0E805}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B89D606-A094-4E82-8F8A-9D72D6A0E805}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B89D606-A094-4E82-8F8A-9D72D6A0E805}.Release|Any CPU.Build.0 = Release|Any CPU
{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7}.Release|Any CPU.Build.0 = Release|Any CPU
{974AC330-FA47-479D-8927-D40E82EFE223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{974AC330-FA47-479D-8927-D40E82EFE223}.Debug|Any CPU.Build.0 = Debug|Any CPU
{974AC330-FA47-479D-8927-D40E82EFE223}.Release|Any CPU.ActiveCfg = Release|Any CPU
{974AC330-FA47-479D-8927-D40E82EFE223}.Release|Any CPU.Build.0 = Release|Any CPU
{0BE66D08-95AC-4E0F-8A79-0A97602A3E08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BE66D08-95AC-4E0F-8A79-0A97602A3E08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BE66D08-95AC-4E0F-8A79-0A97602A3E08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BE66D08-95AC-4E0F-8A79-0A97602A3E08}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -68,13 +43,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5E9ECDBF-634E-43A9-8F89-625A2213831C} SolutionGuid = {5E9ECDBF-634E-43A9-8F89-625A2213831C}
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8F5A3D1E-562B-4F27-9787-6CB14B35E69E} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{D6E4A943-5113-41ED-A547-8D3BE5516DC0} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{4C184AB8-DDA7-4545-BC84-A4ACCBE29764} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{0B89D606-A094-4E82-8F8A-9D72D6A0E805} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{8DAFA6F6-0415-4507-B31C-7FEBE0D2E9D7} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{974AC330-FA47-479D-8927-D40E82EFE223} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
{0BE66D08-95AC-4E0F-8A79-0A97602A3E08} = {FA833B24-B8F6-4CE6-A044-99257EAC02FF}
EndGlobalSection
EndGlobal EndGlobal

View File

@ -1,24 +0,0 @@
/// Route handlers for Giraffe endpoints
module JobsJobsJobs.Api.Handlers
open System.IO
open Giraffe
open JobsJobsJobs.Common.Handlers
open JobsJobsJobs.Domain
// POST: /api/markdown-preview
let markdownPreview : HttpHandler = requireUser >=> fun next ctx -> task {
let _ = ctx.Request.Body.Seek(0L, SeekOrigin.Begin)
use reader = new StreamReader (ctx.Request.Body)
let! preview = reader.ReadToEndAsync ()
return! htmlString (MarkdownString.toHtml (Text preview)) next ctx
}
open Giraffe.EndpointRouting
/// All API endpoints
let endpoints =
subRoute "/api" [
POST [ route "/markdown-preview" markdownPreview ]
]

View File

@ -1,91 +0,0 @@
/// The main web server application for Jobs, Jobs, Jobs
module JobsJobsJobs.App
open System
open System.Text
open BitBadger.AspNetCore.CanonicalDomains
open Giraffe
open Giraffe.EndpointRouting
open JobsJobsJobs.Common.Data
open Microsoft.AspNetCore.Authentication.Cookies
open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Http
open Microsoft.AspNetCore.HttpOverrides
open Microsoft.Extensions.Caching.Distributed
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Hosting
open NodaTime
/// Enable buffering on the request body
type BufferedBodyMiddleware (next : RequestDelegate) =
member _.InvokeAsync (ctx : HttpContext) = task {
ctx.Request.EnableBuffering ()
return! next.Invoke ctx
}
[<EntryPoint>]
let main args =
let builder = WebApplication.CreateBuilder args
let _ = builder.Configuration.AddEnvironmentVariables "JJJ_"
let svc = builder.Services
let _ = svc.AddGiraffe ()
let _ = svc.AddSingleton<IClock> SystemClock.Instance
let _ = svc.AddLogging ()
let _ = svc.AddCors ()
let _ = svc.AddSingleton<Json.ISerializer> (SystemTextJson.Serializer Json.options)
let _ = svc.Configure<ForwardedHeadersOptions>(fun (opts : ForwardedHeadersOptions) ->
opts.ForwardedHeaders <- ForwardedHeaders.XForwardedFor ||| ForwardedHeaders.XForwardedProto)
let _ = svc.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(fun o ->
o.ExpireTimeSpan <- TimeSpan.FromMinutes 60
o.SlidingExpiration <- true
o.AccessDeniedPath <- "/error/not-authorized"
o.ClaimsIssuer <- "https://noagendacareers.com")
let _ = svc.AddAuthorization ()
let _ = svc.AddAntiforgery ()
// Set up the data store
let cfg = svc.BuildServiceProvider().GetRequiredService<IConfiguration> ()
let _ = setUp cfg |> Async.AwaitTask |> Async.RunSynchronously
let _ = svc.AddSingleton<IDistributedCache> (fun _ -> DistributedCache () :> IDistributedCache)
let _ = svc.AddSession(fun opts ->
opts.IdleTimeout <- TimeSpan.FromMinutes 60
opts.Cookie.HttpOnly <- true
opts.Cookie.IsEssential <- true)
let emailCfg = cfg.GetSection "Email"
if (emailCfg.GetChildren >> Seq.isEmpty >> not) () then ConfigurationBinder.Bind(emailCfg, Email.options)
let app = builder.Build ()
// Unify the endpoints from all features
let endpoints = [
Citizens.Handlers.endpoints
yield! Home.Handlers.endpoints
yield! Listings.Handlers.endpoints
Profiles.Handlers.endpoints
SuccessStories.Handlers.endpoints
Api.Handlers.endpoints
]
let _ = app.UseForwardedHeaders ()
let _ = app.UseCanonicalDomains ()
let _ = app.UseCookiePolicy (CookiePolicyOptions (MinimumSameSitePolicy = SameSiteMode.Strict))
let _ = app.UseStaticFiles ()
let _ = app.UseRouting ()
let _ = app.UseMiddleware<BufferedBodyMiddleware> ()
let _ = app.UseAuthentication ()
let _ = app.UseAuthorization ()
let _ = app.UseSession ()
let _ = app.UseGiraffeErrorHandler Common.Handlers.Error.unexpectedError
let _ = app.UseEndpoints (fun e -> e.MapGiraffeEndpoints endpoints |> ignore)
app.Run ()
0

View File

@ -1,36 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<PublishSingleFile>false</PublishSingleFile>
<SelfContained>false</SelfContained>
<WarnOn>3390;$(WarnOn)</WarnOn>
</PropertyGroup>
<ItemGroup>
<Compile Include="ApiHandlers.fs" />
<Compile Include="App.fs" />
</ItemGroup>
<ItemGroup>
<Folder Include=".\wwwroot" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Citizens\JobsJobsJobs.Citizens.fsproj" />
<ProjectReference Include="..\Common\JobsJobsJobs.Common.fsproj" />
<ProjectReference Include="..\Home\JobsJobsJobs.Home.fsproj" />
<ProjectReference Include="..\Listings\JobsJobsJobs.Listings.fsproj" />
<ProjectReference Include="..\Profiles\JobsJobsJobs.Profiles.fsproj" />
<ProjectReference Include="..\SuccessStories\JobsJobsJobs.SuccessStories.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="8.0.300" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BitBadger.AspNetCore.CanonicalDomains" Version="1.0.0" />
</ItemGroup>
</Project>

View File

@ -1,15 +0,0 @@
{
"Logging": {
"LogLevel": {
"JobsJobsJobs.Api.Handlers.Citizen": "Information",
"Microsoft.AspNetCore.StaticFiles": "Warning"
}
},
"Kestrel": {
"EndPoints": {
"Http": {
"Url": "http://0.0.0.0:80"
}
}
}
}

View File

@ -1,303 +0,0 @@
/** Script for Jobs, Jobs, Jobs */
this.jjj = {
/**
* Play an audio file
* @param {HTMLElement} elt The element which was clicked
*/
playFile(elt) {
elt.querySelector("audio").play()
},
/**
* Hide the offcanvas menu if it displayed
*/
hideMenu() {
/** @type {HTMLElement} */
const menu = document.querySelector(".jjj-mobile-menu")
if (menu.style.display !== "none") bootstrap.Offcanvas.getOrCreateInstance(menu).hide()
},
/**
* Show a message via an alert
* @param {string} message The message to show
*/
showAlert (message) {
const [level, msg] = message.split("|||")
/** @type {HTMLTemplateElement} */
const alertTemplate = document.getElementById("alertTemplate")
/** @type {HTMLDivElement} */
const alert = alertTemplate.content.firstElementChild.cloneNode(true)
alert.classList.add(`alert-${level === "error" ? "danger" : level}`)
const prefix = level === "success" ? "" : `<strong>${level.toUpperCase()}: </strong>`
alert.querySelector("p").innerHTML = `${prefix}${msg}`
const alerts = document.getElementById("alerts")
alerts.appendChild(alert)
alerts.scrollIntoView()
},
/**
* The time zone of the current browser
* @type {string}
*/
timeZone: undefined,
/**
* Derive the time zone from the current browser
*/
deriveTimeZone () {
try {
this.timeZone = (new Intl.DateTimeFormat()).resolvedOptions().timeZone
} catch (_) { }
},
/**
* Set up the onClick event for the preview button
* @param {string} editorId The ID of the editor to wire up
*/
markdownOnLoad(editorId) {
document.getElementById(`${editorId}PreviewButton`).addEventListener("click", () => { this.showPreview(editorId) })
},
/**
* Show a preview of the Markdown in the given editor
* @param {string} editorId The ID of the Markdown editor whose preview should be shown
*/
async showPreview(editorId) {
/** @type {HTMLButtonElement} */
const editBtn = document.getElementById(`${editorId}EditButton`)
/** @type {HTMLDivElement} */
const editDiv = document.getElementById(`${editorId}Edit`)
/** @type {HTMLTextAreaElement} */
const editor = document.getElementById(editorId)
/** @type {HTMLButtonElement} */
const previewBtn = document.getElementById(`${editorId}PreviewButton`)
/** @type {HTMLDivElement} */
const previewDiv = document.getElementById(`${editorId}Preview`)
editBtn.classList.remove("btn-primary")
editBtn.classList.add("btn-outline-secondary")
editBtn.addEventListener("click", () => { this.showEditor(editorId) })
previewBtn.classList.remove("btn-outline-secondary")
previewBtn.classList.add("btn-primary")
previewBtn.removeEventListener("click", () => { this.showPreview(editorId) })
const preview = await fetch("/api/markdown-preview", { method: "POST", body: editor.value })
let text
if (preview.ok) {
text = await preview.text()
} else {
text = `<p class="text-danger"><strong> ERROR ${preview.status}</strong> &ndash; ${preview.statusText}`
}
previewDiv.innerHTML = text
editDiv.classList.remove("jjj-shown")
editDiv.classList.add("jjj-not-shown")
previewDiv.classList.remove("jjj-not-shown")
previewDiv.classList.add("jjj-shown")
},
/**
* Show the Markdown editor (hides preview)
* @param {string} editorId The ID of the Markdown editor to show
*/
showEditor(editorId) {
/** @type {HTMLButtonElement} */
const editBtn = document.getElementById(`${editorId}EditButton`)
/** @type {HTMLDivElement} */
const editDiv = document.getElementById(`${editorId}Edit`)
/** @type {HTMLTextAreaElement} */
const editor = document.getElementById(editorId)
/** @type {HTMLButtonElement} */
const previewBtn = document.getElementById(`${editorId}PreviewButton`)
/** @type {HTMLDivElement} */
const previewDiv = document.getElementById(`${editorId}Preview`)
previewBtn.classList.remove("btn-primary")
previewBtn.classList.add("btn-outline-secondary")
this.markdownOnLoad(editorId)
editBtn.classList.remove("btn-outline-secondary")
editBtn.classList.add("btn-primary")
editBtn.removeEventListener("click", () => { this.showEditor(editorId) })
previewDiv.classList.remove("jjj-shown")
previewDiv.classList.add("jjj-not-shown")
previewDiv.innerHTML = ""
editDiv.classList.remove("jjj-not-shown")
editDiv.classList.add("jjj-shown")
},
citizen: {
/**
* The next index for a newly-added contact
* @type {number}
*/
nextIndex: 0,
/**
* Add a contact to the account form
*/
addContact() {
const next = this.nextIndex
/** @type {HTMLTemplateElement} */
const newContactTemplate = document.getElementById("newContact")
/** @type {HTMLDivElement} */
const newContact = newContactTemplate.content.firstElementChild.cloneNode(true)
newContact.setAttribute("id", `contactRow${next}`)
const cols = newContact.children
// Button column
cols[0].querySelector("button").setAttribute("onclick", `jjj.citizen.removeContact(${next})`)
// Contact Type column
const typeField = cols[1].querySelector("select")
typeField.setAttribute("id", `contactType${next}`)
typeField.setAttribute("name", `Contacts[${this.nextIndex}].ContactType`)
cols[1].querySelector("label").setAttribute("for", `contactType${next}`)
// Name column
const nameField = cols[2].querySelector("input")
nameField.setAttribute("id", `contactName${next}`)
nameField.setAttribute("name", `Contacts[${this.nextIndex}].Name`)
cols[2].querySelector("label").setAttribute("for", `contactName${next}`)
if (next > 0) cols[2].querySelector("div.form-text").remove()
// Value column
const valueField = cols[3].querySelector("input")
valueField.setAttribute("id", `contactValue${next}`)
valueField.setAttribute("name", `Contacts[${this.nextIndex}].Value`)
cols[3].querySelector("label").setAttribute("for", `contactName${next}`)
if (next > 0) cols[3].querySelector("div.form-text").remove()
// Is Public column
const isPublicField = cols[4].querySelector("input")
isPublicField.setAttribute("id", `contactIsPublic${next}`)
isPublicField.setAttribute("name", `Contacts[${this.nextIndex}].IsPublic`)
cols[4].querySelector("label").setAttribute("for", `contactIsPublic${next}`)
// Add the row
const contacts = document.querySelectorAll("div[id^=contactRow]")
const sibling = contacts.length > 0 ? contacts[contacts.length - 1] : newContactTemplate
sibling.insertAdjacentElement('afterend', newContact)
this.nextIndex++
},
/**
* Remove a contact row from the profile form
* @param {number} idx The index of the contact row to remove
*/
removeContact(idx) {
document.getElementById(`contactRow${idx}`).remove()
},
/**
* Register a comparison validation between a password and a "confirm password" field
* @param {string} pwId The ID for the password field
* @param {string} confirmId The ID for the "confirm password" field
* @param {boolean} isRequired Whether these fields are required
*/
validatePasswords(pwId, confirmId, isRequired) {
const pw = document.getElementById(pwId)
const pwConfirm = document.getElementById(confirmId)
pwConfirm.addEventListener("input", () => {
if (!pw.validity.valid) {
pwConfirm.setCustomValidity("")
} else if ((!pwConfirm.validity.valueMissing || !isRequired) && pw.value !== pwConfirm.value) {
pwConfirm.setCustomValidity("Confirmation password does not match")
} else {
pwConfirm.setCustomValidity("")
}
})
}
},
/**
* Script for listing pages
*/
listing: {
/**
* Show or hide the success story prompt based on whether a job was filled here
*/
toggleFromHere() {
/** @type {HTMLInputElement} */
const isFromHere = document.getElementById("FromHere")
const display = isFromHere.checked ? "unset" : "none"
document.getElementById("successRow").style.display = display
document.getElementById("SuccessStoryEditRow").style.display = display
}
},
/**
* Script for profile pages
*/
profile: {
/**
* The next index for a newly-added skill
* @type {number}
*/
nextIndex: 0,
/**
* Add a skill to the profile form
*/
addSkill() {
const next = this.nextIndex
/** @type {HTMLTemplateElement} */
const newSkillTemplate = document.getElementById("newSkill")
/** @type {HTMLDivElement} */
const newSkill = newSkillTemplate.content.firstElementChild.cloneNode(true)
newSkill.setAttribute("id", `skillRow${next}`)
const cols = newSkill.children
// Button column
cols[0].querySelector("button").setAttribute("onclick", `jjj.profile.removeSkill(${next})`)
// Skill column
const skillField = cols[1].querySelector("input")
skillField.setAttribute("id", `skillDesc${next}`)
skillField.setAttribute("name", `Skills[${this.nextIndex}].Description`)
cols[1].querySelector("label").setAttribute("for", `skillDesc${next}`)
if (this.nextIndex > 0) cols[1].querySelector("div.form-text").remove()
// Notes column
const notesField = cols[2].querySelector("input")
notesField.setAttribute("id", `skillNotes${next}`)
notesField.setAttribute("name", `Skills[${this.nextIndex}].Notes`)
cols[2].querySelector("label").setAttribute("for", `skillNotes${next}`)
if (this.nextIndex > 0) cols[2].querySelector("div.form-text").remove()
// Add the row
const skills = document.querySelectorAll("div[id^=skillRow]")
const sibling = skills.length > 0 ? skills[skills.length - 1] : newSkillTemplate
sibling.insertAdjacentElement('afterend', newSkill)
this.nextIndex++
},
/**
* Remove a skill row from the profile form
* @param {number} idx The index of the skill row to remove
*/
removeSkill(idx) {
document.getElementById(`skillRow${idx}`).remove()
}
}
}
htmx.on("htmx:configRequest", function (evt) {
// Send the user's current time zone so that we can display local time
if (jjj.timeZone) {
evt.detail.headers["X-Time-Zone"] = jjj.timeZone
}
})
htmx.on("htmx:responseError", function (evt) {
/** @type {XMLHttpRequest} */
const xhr = evt.detail.xhr
jjj.showAlert(`error|||${xhr.status}: ${xhr.statusText}`)
})
jjj.deriveTimeZone()

View File

@ -1,248 +0,0 @@
/* Overall styling */
html {
scroll-behavior: smooth;
}
a:link,
a:visited {
text-decoration: none;
}
a:not(.btn):hover {
text-decoration: underline;
}
label.jjj-required::after {
color: red;
content: ' *';
}
label[for]:hover {
cursor: pointer;
}
.jjj-heading-label {
display: inline-block;
font-size: 1rem;
text-transform: uppercase;
}
.material-icons {
vertical-align: bottom;
}
@media print {
.jjj-hide-from-printer {
display: none;
}
}
/* Material Design Icon / Bootstrap styling */
.mdi::before {
font-size: 24px;
line-height: 14px;
}
.btn .mdi::before {
position: relative;
top: 4px;
}
.btn-xs .mdi::before {
font-size: 18px;
top: 3px;
}
.btn-sm .mdi::before {
font-size: 18px;
top: 3px;
}
.dropdown-menu .mdi {
width: 18px;
}
.dropdown-menu .mdi::before {
position: relative;
top: 4px;
left: -8px;
}
.nav .mdi::before {
position: relative;
top: 4px;
}
.navbar .navbar-toggle .mdi::before {
position: relative;
top: 4px;
color: #FFF;
}
.breadcrumb .mdi::before {
position: relative;
top: 4px;
}
.breadcrumb a:hover {
text-decoration: none;
}
.breadcrumb a:hover span {
text-decoration: underline;
}
.alert .mdi::before {
position: relative;
top: 4px;
margin-right: 2px;
}
.input-group-addon .mdi::before {
position: relative;
top: 3px;
}
.navbar-brand .mdi::before {
position: relative;
top: 2px;
margin-right: 2px;
}
.list-group-item .mdi::before {
position: relative;
top: 3px;
left: -3px
}
.mdi-sm::before {
font-size: 1rem;
line-height: unset;
}
/* Layout styling */
.jjj-app {
display: flex;
flex-direction: row;
}
.jjj-main {
flex-grow: 1;
display: flex;
flex-flow: column;
min-height: 100vh;
}
.jjj-content {
flex-grow: 2;
}
/* Menu styling */
.jjj-full-menu,
.jjj-mobile-menu {
background-image: linear-gradient(180deg, darkgreen 0%, green 70%);
color: white;
font-size: 1.2rem;
}
.jjj-full-menu {
min-height: 100vh;
width: 250px;
min-width: 250px;
position: sticky;
top: 0;
display: none;
}
.jjj-full-menu .home-link {
font-size: 1.2rem;
text-align: center;
background-color: rgba(0, 0, 0, .4);
margin: -1rem;
padding: 1rem;
}
.jjj-full-menu a:link,
.jjj-full-menu a:visited {
text-decoration: none;
color: white;
}
#jjjMenu {
flex-direction: column;
flex-grow: 1;
}
@media (min-width: 768px) {
.jjj-full-menu {
display: unset;
}
.jjj-mobile-menu {
display: none;
}
.navbar-expand-md .navbar-nav {
flex-direction: column;
}
}
.jjj-nav a:link,
.jjj-nav a:visited {
text-decoration: none;
color: white;
}
nav.jjj-nav > a {
display: block;
width: 100%;
border-radius: .25rem;
padding: .5rem;
margin: .5rem 0;
font-size: 1rem;
}
nav.jjj-nav > a > i {
vertical-align: top;
margin-right: .25rem;
}
nav.jjj-nav > a > i.mdi::before {
line-height: 24px;
}
nav.jjj-nav > a.jjj-current-page {
background-color: rgba(255, 255, 255, .2);
}
nav.jjj-nav > a:hover {
background-color: rgba(255, 255, 255, .5);
color: black;
text-decoration: none;
}
nav.jjj-nav > div.separator {
border-bottom: solid 1px rgba(255, 255, 255, .75);
height: 1px;
}
/* Title bar styling */
.jjj-main .navbar-dark {
background-image: linear-gradient(0deg, green 0%, darkgreen 70%);
padding-left: 1rem;
padding-right: 1rem;
}
.jjj-main .navbar-dark button {
padding: 0;
}
.jjj-main .navbar-dark .navbar-text {
font-weight: bold;
color: white;
}
.jjj-main .navbar-light .navbar-text {
font-style: italic;
padding: 0 1rem 0 0;
}
/* Audio Clip styling */
.jjj-audio-clip audio {
display: none;
}
span.jjj-audio-clip {
border-bottom: dotted 1px lightgray;
}
span.jjj-audio-clip:hover {
cursor: pointer;
}
/* Markdown Editor styling */
.jjj-not-shown {
display: none;
}
.jjj-shown {
display: inherit;
}
.jjj-markdown-editor {
width: 100%;
/* When wrapping this with Bootstrap's floating label, it shrinks the input down to what a normal one-line input
would be; this overrides that for this textarea specifically */
height: inherit !important;
}
.jjj-markdown-preview {
border: solid 1px lightgray;
border-radius: .5rem;
}
/* Collapse Panel styling */
a[data-bs-toggle] {
color: var(--bs-body-color);
}
a[data-bs-toggle]:hover {
text-decoration: none;
}
/* Footer styling */
footer {
display: flex;
flex-direction: row-reverse;
}
footer p {
padding-top: 2rem;
padding-right: .5rem;
font-style: italic;
font-size: .8rem;
}

View File

@ -1,150 +0,0 @@
module JobsJobsJobs.Citizens.Data
open BitBadger.Npgsql.FSharp.Documents
open JobsJobsJobs.Common.Data
open JobsJobsJobs.Domain
open NodaTime
open Npgsql.FSharp
/// The last time a token purge check was run
let mutable private lastPurge = Instant.MinValue
/// Lock access to the above
let private locker = obj ()
/// Delete a citizen by their ID
let deleteById citizenId = backgroundTask {
let citId = CitizenId.toString citizenId
do! Custom.nonQuery
$"{Query.Delete.byContains Table.Success};
{Query.Delete.byContains Table.Listing};
{Query.Delete.byId Table.Citizen}"
[ "@criteria", Query.jsonbDocParam {| citizenId = citId |}; "@id", Sql.string citId ]
}
/// Save a citizen
let private saveCitizen (citizen : Citizen) =
save Table.Citizen (CitizenId.toString citizen.Id) citizen
/// Save security information for a citizen
let saveSecurityInfo (security : SecurityInfo) =
save Table.SecurityInfo (CitizenId.toString security.Id) security
/// Purge expired tokens
let private purgeExpiredTokens now = backgroundTask {
let! info =
Custom.list $"{Query.selectFromTable Table.SecurityInfo} WHERE data ->> 'tokenExpires' IS NOT NULL" []
fromData<SecurityInfo>
for expired in info |> List.filter (fun it -> it.TokenExpires.Value < now) do
if expired.TokenUsage.Value = "confirm" then
// Unconfirmed account; delete the entire thing
do! deleteById expired.Id
else
// Some other use; just clear the token
do! saveSecurityInfo { expired with Token = None; TokenUsage = None; TokenExpires = None }
}
/// Check for tokens to purge if it's been more than 10 minutes since we last checked
let private checkForPurge skipCheck =
lock locker (fun () -> backgroundTask {
let now = SystemClock.Instance.GetCurrentInstant ()
if skipCheck || (now - lastPurge).TotalMinutes >= 10 then
do! purgeExpiredTokens now
lastPurge <- now
})
/// Find a citizen by their ID
let findById citizenId =
Find.byId Table.Citizen (CitizenId.toString citizenId)
/// Save a citizen
let save citizen =
saveCitizen citizen
/// Register a citizen (saves citizen and security settings); returns false if the e-mail is already taken
let register (citizen : Citizen) (security : SecurityInfo) = backgroundTask {
try
let! _ =
Configuration.dataSource ()
|> Sql.fromDataSource
|> Sql.executeTransactionAsync
[ Query.save Table.Citizen, [ Query.docParameters (CitizenId.toString citizen.Id) citizen ]
Query.save Table.SecurityInfo, [ Query.docParameters (CitizenId.toString citizen.Id) security ]
]
return true
with
| :? Npgsql.PostgresException as ex when ex.SqlState = "23505" && ex.ConstraintName = "uk_citizen_email" ->
return false
}
/// Try to find the security information matching a confirmation token
let private tryConfirmToken (token : string) =
Find.firstByContains<SecurityInfo> Table.SecurityInfo {| token = token; tokenUsage = "confirm" |}
/// Confirm a citizen's account
let confirmAccount token = backgroundTask {
do! checkForPurge true
match! tryConfirmToken token with
| Some info ->
do! saveSecurityInfo { info with AccountLocked = false; Token = None; TokenUsage = None; TokenExpires = None }
return true
| None -> return false
}
/// Deny a citizen's account (user-initiated; used if someone used their e-mail address without their consent)
let denyAccount token = backgroundTask {
do! checkForPurge true
match! tryConfirmToken token with
| Some info ->
do! deleteById info.Id
return true
| None -> return false
}
/// Attempt a user log on
let tryLogOn (email : string) password (pwVerify : Citizen -> string -> bool option)
(pwHash : Citizen -> string -> string) now = backgroundTask {
do! checkForPurge false
match! Find.firstByContains<Citizen> Table.Citizen {| email = email |} with
| Some citizen ->
let citizenId = CitizenId.toString citizen.Id
let! tryInfo = Find.byId<SecurityInfo> Table.SecurityInfo citizenId
let! info = backgroundTask {
match tryInfo with
| Some it -> return it
| None ->
let it = { SecurityInfo.empty with Id = citizen.Id }
do! saveSecurityInfo it
return it
}
if info.AccountLocked then return Error "Log on unsuccessful (Account Locked)"
else
match pwVerify citizen password with
| Some rehash ->
let hash = if rehash then pwHash citizen password else citizen.PasswordHash
do! saveSecurityInfo { info with FailedLogOnAttempts = 0 }
do! saveCitizen { citizen with LastSeenOn = now; PasswordHash = hash }
return Ok { citizen with LastSeenOn = now }
| None ->
let locked = info.FailedLogOnAttempts >= 4
do! { info with FailedLogOnAttempts = info.FailedLogOnAttempts + 1; AccountLocked = locked }
|> saveSecurityInfo
return Error $"""Log on unsuccessful{if locked then " - Account is now locked" else ""}"""
| None -> return Error "Log on unsuccessful"
}
/// Try to retrieve a citizen and their security information by their e-mail address
let tryByEmailWithSecurity email =
Custom.single
$"SELECT c.*, s.data AS sec_data
FROM {Table.Citizen} c
INNER JOIN {Table.SecurityInfo} s ON s.id = c.id
WHERE c.data @> @criteria"
[ "@criteria", Query.jsonbDocParam {| email = email |} ]
(fun row -> (fromData<Citizen> row, fromDocument<SecurityInfo> "sec_data" row))
/// Try to retrieve security information by the given token
let trySecurityByToken (token : string) = backgroundTask {
do! checkForPurge false
return! Find.firstByContains<SecurityInfo> Table.SecurityInfo {| token = token |}
}

View File

@ -1,153 +0,0 @@
module JobsJobsJobs.Citizens.Domain
open JobsJobsJobs.Domain
/// The data to add or update an other contact
[<CLIMutable; NoComparison; NoEquality>]
type OtherContactForm =
{ /// The type of the contact
ContactType : string
/// The name of the contact
Name : string
/// The value of the contact (URL, e-mail address, phone, etc.)
Value : string
/// Whether this contact is displayed for public employment profiles and job listings
IsPublic : bool
}
/// Support functions for the contact form
module OtherContactForm =
/// Create a contact form from a contact
let fromContact (contact : OtherContact) =
{ ContactType = ContactType.toString contact.ContactType
Name = defaultArg contact.Name ""
Value = contact.Value
IsPublic = contact.IsPublic
}
/// The data available to update an account profile
[<CLIMutable; NoComparison; NoEquality>]
type AccountProfileForm =
{ /// The first name of the citizen
FirstName : string
/// The last name of the citizen
LastName : string
/// The display name for the citizen
DisplayName : string
/// The citizen's new password
NewPassword : string
/// Confirmation of the citizen's new password
NewPasswordConfirm : string
/// The contacts for this profile
Contacts : OtherContactForm array
}
/// Support functions for the account profile form
module AccountProfileForm =
/// Create an account profile form from a citizen
let fromCitizen (citizen : Citizen) =
{ FirstName = citizen.FirstName
LastName = citizen.LastName
DisplayName = defaultArg citizen.DisplayName ""
NewPassword = ""
NewPasswordConfirm = ""
Contacts = citizen.OtherContacts |> List.map OtherContactForm.fromContact |> Array.ofList
}
/// Form for the forgot / reset password page
[<CLIMutable; NoComparison; NoEquality>]
type ForgotPasswordForm =
{ /// The e-mail address for the account wishing to reset their password
Email : string
}
/// Form for the log on page
[<CLIMutable; NoComparison; NoEquality>]
type LogOnForm =
{ /// A message regarding an error encountered during a log on attempt
ErrorMessage : string option
/// The e-mail address for the user attempting to log on
Email : string
/// The password of the user attempting to log on
Password : string
/// The URL where the user should be redirected after logging on
ReturnTo : string option
}
/// Form for the registration page
[<CLIMutable; NoComparison; NoEquality>]
type RegisterForm =
{ /// The user's first name
FirstName : string
/// The user's last name
LastName : string
/// The user's display name
DisplayName : string option
/// The user's e-mail address
Email : string
/// The user's desired password
Password : string
/// The index of the first question asked
Question1Index : int
/// The answer for the first question asked
Question1Answer : string
/// The index of the second question asked
Question2Index : int
/// The answer for the second question asked
Question2Answer : string
}
/// Support for the registration page view model
module RegisterForm =
/// An empty view model
let empty =
{ FirstName = ""
LastName = ""
DisplayName = None
Email = ""
Password = ""
Question1Index = 0
Question1Answer = ""
Question2Index = 0
Question2Answer = ""
}
/// The form for a user resetting their password
[<CLIMutable; NoComparison; NoEquality>]
type ResetPasswordForm =
{ /// The ID of the citizen whose password is being reset
Id : string
/// The verification token for the password reset
Token : string
/// The new password for the account
Password : string
}

View File

@ -1,355 +0,0 @@
module JobsJobsJobs.Citizens.Handlers
open System
open System.Security.Claims
open Giraffe
open JobsJobsJobs
open JobsJobsJobs.Citizens.Domain
open JobsJobsJobs.Common.Handlers
open JobsJobsJobs.Domain
open Microsoft.AspNetCore.Authentication
open Microsoft.AspNetCore.Authentication.Cookies
open Microsoft.Extensions.Logging
open NodaTime
/// Authorization functions
module private Auth =
open System.Text
/// Create a confirmation or password reset token for a user
let createToken (citizen : Citizen) =
Convert.ToBase64String (Guid.NewGuid().ToByteArray () |> Array.append (Encoding.UTF8.GetBytes citizen.Email))
/// The challenge questions and answers from the configuration
let mutable private challenges : (string * string)[] option = None
/// The challenge questions and answers
let questions ctx =
match challenges with
| Some it -> it
| None ->
let qs = (config ctx).GetSection "ChallengeQuestions"
let qAndA =
seq {
for idx in 0..4 do
let section = qs.GetSection(string idx)
yield section["Question"], (section["Answer"].ToLowerInvariant ())
}
|> Array.ofSeq
challenges <- Some qAndA
qAndA
/// Password hashing and verification
module Passwords =
open Microsoft.AspNetCore.Identity
/// The password hasher to use for the application
let private hasher = PasswordHasher<Citizen> ()
/// Hash a password for a user
let hash citizen password =
hasher.HashPassword (citizen, password)
/// Verify a password (returns true if the password needs to be rehashed)
let verify citizen password =
match hasher.VerifyHashedPassword (citizen, citizen.PasswordHash, password) with
| PasswordVerificationResult.Success -> Some false
| PasswordVerificationResult.SuccessRehashNeeded -> Some true
| _ -> None
// GET: /citizen/account
let account : HttpHandler = fun next ctx -> task {
match! Data.findById (currentCitizenId ctx) with
| Some citizen ->
return!
Views.account (AccountProfileForm.fromCitizen citizen) (isHtmx ctx) (csrf ctx)
|> render "Account Profile" next ctx
| None -> return! Error.notFound next ctx
}
// GET: /citizen/cancel-reset/[token]
let cancelReset token : HttpHandler = fun next ctx -> task {
let! wasCanceled = task {
match! Data.trySecurityByToken token with
| Some security ->
do! Data.saveSecurityInfo { security with Token = None; TokenUsage = None; TokenExpires = None }
return true
| None -> return false
}
return! Views.resetCanceled wasCanceled |> render "Password Reset Cancellation" next ctx
}
// GET: /citizen/confirm/[token]
let confirm token : HttpHandler = fun next ctx -> task {
let! isConfirmed = Data.confirmAccount token
return! Views.confirmAccount isConfirmed |> render "Account Confirmation" next ctx
}
// GET: /citizen/dashboard
let dashboard : HttpHandler = requireUser >=> fun next ctx -> task {
let citizenId = currentCitizenId ctx
let! citizen = Data.findById citizenId
let! profile = Profiles.Data.findById citizenId
let! prfCount = Profiles.Data.count ()
return! Views.dashboard citizen.Value profile prfCount (timeZone ctx) |> render "Dashboard" next ctx
}
// POST: /citizen/delete
let delete : HttpHandler = requireUser >=> validateCsrf >=> fun next ctx -> task {
do! Data.deleteById (currentCitizenId ctx)
do! ctx.SignOutAsync ()
return! render "Account Deleted Successfully" next ctx Views.deleted
}
// GET: /citizen/deny/[token]
let deny token : HttpHandler = fun next ctx -> task {
let! wasDeleted = Data.denyAccount token
return! Views.denyAccount wasDeleted |> render "Account Deletion" next ctx
}
// GET: /citizen/forgot-password
let forgotPassword : HttpHandler = fun next ctx ->
Views.forgotPassword (csrf ctx) |> render "Forgot Password" next ctx
// POST: /citizen/forgot-password
let doForgotPassword : HttpHandler = validateCsrf >=> fun next ctx -> task {
let! form = ctx.BindFormAsync<ForgotPasswordForm> ()
match! Data.tryByEmailWithSecurity form.Email with
| Some (citizen, security) ->
let withToken =
{ security with
Token = Some (Auth.createToken citizen)
TokenUsage = Some "reset"
TokenExpires = Some (now ctx + (Duration.FromDays 3))
}
do! Data.saveSecurityInfo withToken
let! emailResponse = Email.sendPasswordReset citizen withToken
let logFac = logger ctx
let log = logFac.CreateLogger "JobsJobsJobs.Handlers.Citizen"
log.LogInformation $"Password reset e-mail for {citizen.Email} received {emailResponse}"
| None -> ()
return! Views.forgotPasswordSent form |> render "Reset Request Processed" next ctx
}
// GET: /citizen/log-off
let logOff : HttpHandler = requireUser >=> fun next ctx -> task {
do! ctx.SignOutAsync CookieAuthenticationDefaults.AuthenticationScheme
do! addSuccess "Log off successful" ctx
return! redirectToGet "/" next ctx
}
// GET: /citizen/log-on
let logOn : HttpHandler = fun next ctx ->
let returnTo =
if ctx.Request.Query.ContainsKey "returnUrl" then Some ctx.Request.Query["returnUrl"].[0] else None
Views.logOn { ErrorMessage = None; Email = ""; Password = ""; ReturnTo = returnTo } (csrf ctx)
|> render "Log On" next ctx
// POST: /citizen/log-on
let doLogOn : HttpHandler = validateCsrf >=> fun next ctx -> task {
let! form = ctx.BindFormAsync<LogOnForm> ()
match! Data.tryLogOn form.Email form.Password Auth.Passwords.verify Auth.Passwords.hash (now ctx) with
| Ok citizen ->
let claims = seq {
Claim (ClaimTypes.NameIdentifier, CitizenId.toString citizen.Id)
Claim (ClaimTypes.Name, Citizen.name citizen)
}
let identity = ClaimsIdentity (claims, CookieAuthenticationDefaults.AuthenticationScheme)
do! ctx.SignInAsync (identity.AuthenticationType, ClaimsPrincipal identity,
AuthenticationProperties (IssuedUtc = DateTimeOffset.UtcNow))
do! addSuccess "Log on successful" ctx
return! redirectToGet (defaultArg form.ReturnTo "/citizen/dashboard") next ctx
| Error msg ->
do! addError msg ctx
return! Views.logOn { form with Password = "" } (csrf ctx) |> render "Log On" next ctx
}
// GET: /citizen/register
let register next ctx =
// Get two different indexes for NA-knowledge challenge questions
let q1Index = System.Random.Shared.Next(0, 5)
let mutable q2Index = System.Random.Shared.Next(0, 5)
while q1Index = q2Index do
q2Index <- System.Random.Shared.Next(0, 5)
let qAndA = Auth.questions ctx
Views.register (fst qAndA[q1Index]) (fst qAndA[q2Index])
{ RegisterForm.empty with Question1Index = q1Index; Question2Index = q2Index } (isHtmx ctx) (csrf ctx)
|> render "Register" next ctx
// POST: /citizen/register
#nowarn "3511"
let doRegistration : HttpHandler = validateCsrf >=> fun next ctx -> task {
let! form = ctx.BindFormAsync<RegisterForm> ()
let qAndA = Auth.questions ctx
let mutable badForm = false
let errors = [
if form.FirstName.Length < 1 then "First name is required"
if form.LastName.Length < 1 then "Last name is required"
if form.Email.Length < 1 then "E-mail address is required"
if form.Password.Length < 8 then "Password is too short"
if form.Question1Index < 0 || form.Question1Index > 4
|| form.Question2Index < 0 || form.Question2Index > 4
|| form.Question1Index = form.Question2Index then
badForm <- true
else if (snd qAndA[form.Question1Index]) <> (form.Question1Answer.Trim().ToLowerInvariant ())
|| (snd qAndA[form.Question2Index]) <> (form.Question2Answer.Trim().ToLowerInvariant ()) then
"Question answers are incorrect"
]
let refreshPage () =
Views.register (fst qAndA[form.Question1Index]) (fst qAndA[form.Question2Index]) { form with Password = "" }
(isHtmx ctx) (csrf ctx)
|> renderHandler "Register"
if badForm then
do! addError "The form posted was invalid; please complete it again" ctx
return! register next ctx
else if List.isEmpty errors then
let now = now ctx
let noPass =
{ Citizen.empty with
Id = CitizenId.create ()
Email = form.Email
FirstName = form.FirstName
LastName = form.LastName
DisplayName = noneIfBlank form.DisplayName
JoinedOn = now
LastSeenOn = now
}
let citizen = { noPass with PasswordHash = Auth.Passwords.hash noPass form.Password }
let security =
{ SecurityInfo.empty with
Id = citizen.Id
AccountLocked = true
Token = Some (Auth.createToken citizen)
TokenUsage = Some "confirm"
TokenExpires = Some (now + (Duration.FromDays 3))
}
let! success = Data.register citizen security
if success then
let! emailResponse = Email.sendAccountConfirmation citizen security
let logFac = logger ctx
let log = logFac.CreateLogger "JobsJobsJobs.Handlers.Citizen"
log.LogInformation $"Confirmation e-mail for {citizen.Email} received {emailResponse}"
return! Views.registered |> render "Registration Successful" next ctx
else
do! addError "There is already an account registered to the e-mail address provided" ctx
return! refreshPage () next ctx
else
do! addErrors errors ctx
return! refreshPage () next ctx
}
// GET: /citizen/reset-password/[token]
let resetPassword token : HttpHandler = fun next ctx -> task {
match! Data.trySecurityByToken token with
| Some security ->
return!
Views.resetPassword { Id = CitizenId.toString security.Id; Token = token; Password = "" } (isHtmx ctx)
(csrf ctx)
|> render "Reset Password" next ctx
| None -> return! Error.notFound next ctx
}
// POST: /citizen/reset-password
let doResetPassword : HttpHandler = validateCsrf >=> fun next ctx -> task {
let! form = ctx.BindFormAsync<ResetPasswordForm> ()
let errors = [
if form.Id = "" then "Request invalid; please return to the link in your e-mail and try again"
if form.Token = "" then "Request invalid; please return to the link in your e-mail and try again"
if form.Password.Length < 8 then "Password too short"
]
if List.isEmpty errors then
match! Data.trySecurityByToken form.Token with
| Some security when security.Id = CitizenId.ofString form.Id ->
match! Data.findById security.Id with
| Some citizen ->
do! Data.saveSecurityInfo { security with Token = None; TokenUsage = None; TokenExpires = None }
do! Data.save { citizen with PasswordHash = Auth.Passwords.hash citizen form.Password }
do! addSuccess "Password reset successfully; you may log on with your new credentials" ctx
return! redirectToGet "/citizen/log-on" next ctx
| None -> return! Error.notFound next ctx
| Some _
| None -> return! Error.notFound next ctx
else
do! addErrors errors ctx
return! Views.resetPassword form (isHtmx ctx) (csrf ctx) |> render "Reset Password" next ctx
}
// POST: /citizen/save-account
let saveAccount : HttpHandler = requireUser >=> validateCsrf >=> fun next ctx -> task {
let! theForm = ctx.BindFormAsync<AccountProfileForm> ()
let form = { theForm with Contacts = theForm.Contacts |> Array.filter (box >> isNull >> not) }
let errors = [
if form.FirstName = "" then "First Name is required"
if form.LastName = "" then "Last Name is required"
if form.NewPassword <> form.NewPassword then "New passwords do not match"
if form.Contacts |> Array.exists (fun c -> c.ContactType = "") then "All Contact Types are required"
if form.Contacts |> Array.exists (fun c -> c.Value = "") then "All Contacts are required"
]
if List.isEmpty errors then
match! Data.findById (currentCitizenId ctx) with
| Some citizen ->
let password =
if form.NewPassword = "" then citizen.PasswordHash
else Auth.Passwords.hash citizen form.NewPassword
do! Data.save
{ citizen with
FirstName = form.FirstName
LastName = form.LastName
DisplayName = noneIfEmpty form.DisplayName
PasswordHash = password
OtherContacts = form.Contacts
|> Array.map (fun c ->
{ OtherContact.Name = noneIfEmpty c.Name
ContactType = ContactType.parse c.ContactType
Value = c.Value
IsPublic = c.IsPublic
})
|> List.ofArray
}
let extraMsg = if form.NewPassword = "" then "" else " and password changed"
do! addSuccess $"Account profile updated{extraMsg} successfully" ctx
return! redirectToGet "/citizen/account" next ctx
| None -> return! Error.notFound next ctx
else
do! addErrors errors ctx
return! Views.account form (isHtmx ctx) (csrf ctx) |> render "Account Profile" next ctx
}
// GET: /citizen/so-long
let soLong : HttpHandler = requireUser >=> fun next ctx ->
Views.deletionOptions (csrf ctx) |> render "Account Deletion Options" next ctx
open Giraffe.EndpointRouting
/// All endpoints for this feature
let endpoints =
subRoute "/citizen" [
GET_HEAD [
route "/account" account
routef "/cancel-reset/%s" cancelReset
routef "/confirm/%s" confirm
route "/dashboard" dashboard
routef "/deny/%s" deny
route "/forgot-password" forgotPassword
route "/log-off" logOff
route "/log-on" logOn
route "/register" register
routef "/reset-password/%s" resetPassword
route "/so-long" soLong
]
POST [
route "/delete" delete
route "/forgot-password" doForgotPassword
route "/log-on" doLogOn
route "/register" doRegistration
route "/reset-password" doResetPassword
route "/save-account" saveAccount
]
]

View File

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Domain.fs" />
<Compile Include="Data.fs" />
<Compile Include="Views.fs" />
<Compile Include="Handlers.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\JobsJobsJobs.Common.fsproj" />
<ProjectReference Include="..\Profiles\JobsJobsJobs.Profiles.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="8.0.300" />
</ItemGroup>
</Project>

View File

@ -1,395 +0,0 @@
/// Views for URLs beginning with /citizen
module JobsJobsJobs.Citizens.Views
open Giraffe.ViewEngine
open Giraffe.ViewEngine.Htmx
open JobsJobsJobs.Citizens.Domain
open JobsJobsJobs.Common.Views
open JobsJobsJobs.Domain
/// The form to add or edit a means of contact
let contactEdit (contacts : OtherContactForm array) =
let mapToInputs (idx : int) (contact : OtherContactForm) =
div [ _id $"contactRow{idx}"; _class "row pb-3" ] [
div [ _class "col-2 col-md-1" ] [
button [ _type "button"; _class "btn btn-sm btn-outline-danger rounded-pill mt-3"; _title "Delete"
_onclick $"jjj.citizen.removeContact({idx})" ] [ txt " &minus; " ]
]
div [ _class "col-10 col-md-4 col-xl-3" ] [
div [ _class "form-floating" ] [
select [ _id $"contactType{idx}"; _name $"Contacts[{idx}].ContactType"; _class "form-control"
_value contact.ContactType; _placeholder "Type"; _required ] [
let optionFor value label =
let typ = ContactType.toString value
option [ _value typ; if contact.ContactType = typ then _selected ] [ txt label ]
optionFor Website "Website"
optionFor Email "E-mail Address"
optionFor Phone "Phone Number"
]
label [ _class "jjj-required"; _for $"contactType{idx}" ] [ txt "Type" ]
]
]
div [ _class "col-12 col-md-4 col-xl-3" ] [
div [ _class "form-floating" ] [
input [ _type "text"; _id $"contactName{idx}"; _name $"Contacts[{idx}].Name"; _class "form-control"
_maxlength "1000"; _value contact.Name; _placeholder "Name" ]
label [ _class "jjj-label"; _for $"contactName{idx}" ] [ txt "Name" ]
]
if idx < 1 then
div [ _class "form-text" ] [ txt "Optional; will link sites and e-mail, qualify phone numbers" ]
]
div [ _class "col-12 col-md-7 offset-md-1 col-xl-4 offset-xl-0" ] [
div [ _class "form-floating" ] [
input [ _type "text"; _id $"contactValue{idx}"; _name $"Contacts[{idx}].Value"
_class "form-control"; _maxlength "1000"; _value contact.Value; _placeholder "Contact"
_required ]
label [ _class "jjj-required"; _for "contactValue{idx}" ] [ txt "Contact" ]
]
if idx < 1 then div [ _class "form-text"] [ txt "The URL, e-mail address, or phone number" ]
]
div [ _class "col-12 col-md-3 offset-md-1 col-xl-1 offset-xl-0" ] [
div [ _class "form-check mt-3" ] [
input [ _type "checkbox"; _id $"contactIsPublic{idx}"; _name $"Contacts[{idx}].IsPublic";
_class "form-check-input"; _value "true"; if contact.IsPublic then _checked ]
label [ _class "form-check-label"; _for $"contactIsPublic{idx}" ] [ txt "Public" ]
]
]
]
template [ _id "newContact" ] [
mapToInputs -1 { ContactType = "Website"; Name = ""; Value = ""; IsPublic = false }
]
:: (contacts |> Array.mapi mapToInputs |> List.ofArray)
/// The account edit page
let account (m : AccountProfileForm) isHtmx csrf =
pageWithTitle "Account Profile" [
p [] [
txt "This information is visible to all fellow logged-on citizens. For publicly-visible employment "
txt "profiles and job listings, the &ldquo;Display Name&rdquo; fields and any public contacts will be "
txt "displayed."
]
form [ _class "row g-3"; _method "POST"; _action "/citizen/save-account" ] [
antiForgery csrf
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text"; _autofocus ] (nameof m.FirstName) m.FirstName "First Name" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text" ] (nameof m.LastName) m.LastName "Last Name" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text" ] (nameof m.DisplayName) m.DisplayName "Display Name" false
div [ _class "form-text" ] [ em [] [ txt "Optional; overrides first/last for display" ] ]
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "password"; _minlength "8" ] (nameof m.NewPassword) "" "New Password" false
div [ _class "form-text" ] [ txt "Leave blank to keep your current password" ]
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "password"; _minlength "8" ] (nameof m.NewPasswordConfirm) "" "Confirm New Password"
false
div [ _class "form-text" ] [ txt "Leave blank to keep your current password" ]
]
div [ _class "col-12" ] [
hr []
h4 [ _class "pb-2" ] [
txt "Ways to Be Contacted &nbsp; "
button [ _type "button"; _class "btn btn-sm btn-outline-primary rounded-pill"
_onclick "jjj.citizen.addContact()" ] [ txt "Add a Contact Method" ]
]
]
yield! contactEdit m.Contacts
div [ _class "col-12" ] [ submitButton "content-save-outline" "Save" ]
]
hr []
p [ _class "text-muted fst-italic" ] [
txt "(If you want to delete your profile, or your entire account, "
a [ _href "/citizen/so-long" ] [ rawText "see your deletion options here" ]; txt ".)"
]
jsOnLoad $"
jjj.citizen.nextIndex = {m.Contacts.Length}
jjj.citizen.validatePasswords('{nameof m.NewPassword}', '{nameof m.NewPasswordConfirm}', false)" isHtmx
]
/// The account confirmation page
let confirmAccount isConfirmed =
pageWithTitle "Account Confirmation" [
p [] [
if isConfirmed then
txt "Your account was confirmed successfully! You may "
a [ _href "/citizen/log-on" ] [ rawText "log on here" ]; txt "."
else
txt "The confirmation token did not match any pending accounts. Confirmation tokens are only valid for "
txt "3 days; if the token expired, you will need to re-register, which "
a [ _href "/citizen/register" ] [ txt "you can do here" ]; txt "."
]
]
/// The citizen's dashboard page
let dashboard (citizen : Citizen) (profile : Profile option) profileCount tz =
article [ _class "container" ] [
h3 [ _class "pb-4" ] [ str $"ITM, {citizen.FirstName}!" ]
div [ _class "row row-cols-1 row-cols-md-2" ] [
div [ _class "col" ] [
div [ _class "card h-100" ] [
h5 [ _class "card-header" ] [ txt "Your Profile" ]
div [ _class "card-body" ] [
match profile with
| Some prfl ->
h6 [ _class "card-subtitle mb-3 text-muted fst-italic" ] [
str $"Last updated {fullDateTime prfl.LastUpdatedOn tz}"
]
p [ _class "card-text" ] [
txt $"Your profile currently lists {List.length prfl.Skills} skill"
txt (if List.length prfl.Skills <> 1 then "s" else ""); txt "."
if prfl.IsSeekingEmployment then
br []; br []
txt "Your profile indicates that you are seeking employment. Once you find it, "
a [ _href "/success-story/add" ] [ txt "tell your fellow citizens about it!" ]
]
| None ->
p [ _class "card-text" ] [
txt "You do not have an employment profile established; click below (or &ldquo;Edit "
txt "Profile&rdquo; in the menu) to get started!"
]
]
div [ _class "card-footer" ] [
match profile with
| Some _ ->
a [ _href $"/profile/{CitizenId.toString citizen.Id}/view"
_class "btn btn-outline-secondary" ] [ txt "View Profile" ]; txt "&nbsp; &nbsp;"
a [ _href "/profile/edit"; _class "btn btn-outline-secondary" ] [ txt "Edit Profile" ]
| None ->
a [ _href "/profile/edit"; _class "btn btn-primary" ] [ txt "Create Profile" ]
]
]
]
div [ _class "col" ] [
div [ _class "card h-100" ] [
h5 [ _class "card-header" ] [ txt "Other Citizens" ]
div [ _class "card-body" ] [
h6 [ _class "card-subtitle mb-3 text-muted fst-italic" ] [
txt (if profileCount = 0L then "No" else $"{profileCount} Total")
txt " Employment Profile"; txt (if profileCount <> 1 then "s" else "")
]
p [ _class "card-text" ] [
if profileCount = 1 && Option.isSome profile then
"It looks like, for now, it&rsquo;s just you&hellip;"
else if profileCount > 0 then "Take a look around and see if you can help them find work!"
else "You can click below, but you will not find anything&hellip;"
|> txt
]
]
div [ _class "card-footer" ] [
a [ _href "/profile/search"; _class "btn btn-outline-secondary" ] [ txt "Search Profiles" ]
]
]
]
]
emptyP
p [] [
txt "To see how this application works, check out &ldquo;How It Works&rdquo; in the sidebar (last updated "
txt "February 2<sup>nd</sup>, 2023)."
]
]
/// The account deletion success page
let deleted =
pageWithTitle "Account Deletion Success" [
emptyP; p [] [ txt "Your account has been successfully deleted." ]
emptyP; p [] [ txt "Thank you for participating, and thank you for your courage. #GitmoNation" ]
]
/// The profile or account deletion page
let deletionOptions csrf =
pageWithTitle "Account Deletion Options" [
h4 [ _class "pb-3" ] [ txt "Option 1 &ndash; Delete Your Profile" ]
p [] [
txt "Utilizing this option will remove your current employment profile and skills. This will preserve any "
txt "job listings you may have posted, or any success stories you may have written, and preserves this "
txt "this application&rsquo;s knowledge of you. This is what you want to use if you want to clear out your "
txt "profile and start again (and remove the current one from others&rsquo; view)."
]
form [ _class "text-center"; _method "POST"; _action "/profile/delete" ] [
antiForgery csrf
button [ _type "submit"; _class "btn btn-danger" ] [ txt "Delete Your Profile" ]
]
hr []
h4 [ _class "pb-3" ] [ txt "Option 2 &ndash; Delete Your Account" ]
p [] [
txt "This option will make it like you never visited this site. It will delete your profile, skills, job "
txt "listings, success stories, and account. This is what you want to use if you want to disappear from "
txt "this application."
]
form [ _class "text-center"; _method "POST"; _action "/citizen/delete" ] [
antiForgery csrf
button [ _type "submit"; _class "btn btn-danger" ] [ txt "Delete Your Entire Account" ]
]
]
/// The account denial page
let denyAccount wasDeleted =
pageWithTitle "Account Deletion" [
p [] [
if wasDeleted then txt "The account was deleted successfully; sorry for the trouble."
else
txt "The confirmation token did not match any pending accounts; if this was an inadvertently created "
txt "account, it has likely already been deleted."
]
]
/// The forgot / reset password page
let forgotPassword csrf =
let m = { Email = "" }
pageWithTitle "Forgot Password" [
p [] [
txt "Enter your e-mail address below; if it matches the e-mail address of an account, we will send a "
txt "password reset link."
]
form [ _class "row g-3 pb-3"; _method "POST"; _action "/citizen/forgot-password" ] [
antiForgery csrf
div [ _class "col-12 col-md-6 offset-md-3" ] [
textBox [ _type "email"; _autofocus ] (nameof m.Email) m.Email "E-mail Address" true
]
div [ _class "col-12" ] [ submitButton "send-lock-outline" "Send Reset Link" ]
]
]
/// The page displayed after a forgotten / reset request has been processed
let forgotPasswordSent (m : ForgotPasswordForm) =
pageWithTitle "Reset Request Processed" [
p [] [
txt $"The reset link request has been processed. If the e-mail address {m.Email} matched an account, "
txt "further instructions were sent to that address."
]
]
/// The log on page
let logOn (m : LogOnForm) csrf =
pageWithTitle "Log On" [
match m.ErrorMessage with
| Some msg ->
p [ _class "pb-3 text-center" ] [
span [ _class "text-danger" ] [ txt msg ]; br []
if msg.IndexOf("ocked") > -1 then
txt "If this is a new account, it must be confirmed before it can be used; otherwise, you need to "
a [ _href "/citizen/forgot-password" ] [ txt "request an unlock code" ]
txt " before you may log on."
]
| None -> ()
form [ _class "row g-3 pb-3"; _hxPost "/citizen/log-on" ] [
antiForgery csrf
match m.ReturnTo with
| Some returnTo -> input [ _type "hidden"; _name (nameof m.ReturnTo); _value returnTo ]
| None -> ()
div [ _class "col-12 col-md-6" ] [
textBox [ _type "email"; _autofocus ] (nameof m.Email) m.Email "E-mail Address" true
]
div [ _class "col-12 col-md-6" ] [
textBox [ _type "password" ] (nameof m.Password) "" "Password" true
]
div [ _class "col-12" ] [ submitButton "login" "Log On" ]
]
p [ _class "text-center" ] [
txt "Need an account? "; a [ _href "/citizen/register" ] [ txt "Register for one!" ]
]
p [ _class "text-center" ] [
txt "Forgot your password? "; a [ _href "/citizen/forgot-password" ] [ txt "Request a reset." ]
]
]
/// The registration page
let register q1 q2 (m : RegisterForm) isHtmx csrf =
pageWithTitle "Register" [
form [ _class "row g-3"; _hxPost "/citizen/register" ] [
antiForgery csrf
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text"; _autofocus ] (nameof m.FirstName) m.FirstName "First Name" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text" ] (nameof m.LastName) m.LastName "Last Name" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text" ] (nameof m.DisplayName) (defaultArg m.DisplayName "") "Display Name" false
div [ _class "form-text fst-italic" ] [ txt "Optional; overrides first/last for display" ]
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "text" ] (nameof m.Email) m.Email "E-mail Address" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "password"; _minlength "8" ] (nameof m.Password) "" "Password" true
]
div [ _class "col-6 col-xl-4" ] [
textBox [ _type "password"; _minlength "8" ] "ConfirmPassword" "" "Confirm Password" true
]
div [ _class "col-12" ] [
hr []
p [ _class "mb-0 text-muted fst-italic" ] [
txt "Before your account request is through, you must answer these questions two&hellip;"
]
]
div [ _class "col-12 col-xl-6" ] [
textBox [ _type "text"; _maxlength "30" ] (nameof m.Question1Answer) m.Question1Answer q1 true
input [ _type "hidden"; _name (nameof m.Question1Index); _value (string m.Question1Index ) ]
]
div [ _class "col-12 col-xl-6" ] [
textBox [ _type "text"; _maxlength "30" ] (nameof m.Question2Answer) m.Question2Answer q2 true
input [ _type "hidden"; _name (nameof m.Question2Index); _value (string m.Question2Index ) ]
]
div [ _class "col-12" ] [ submitButton "content-save-outline" "Save" ]
jsOnLoad $"jjj.citizen.validatePasswords('{nameof m.Password}', 'ConfirmPassword', true)" isHtmx
]
]
/// The confirmation page for user registration
let registered =
pageWithTitle "Registration Successful" [
p [] [
txt "You have been successfully registered with Jobs, Jobs, Jobs. Check your e-mail for a confirmation "
txt "link; it will be valid for the next 72 hours (3 days). Once you confirm your account, you will be "
txt "able to log on using the e-mail address and password you provided."
]
p [] [
txt "If the account is not confirmed within the 72-hour window, it will be deleted, and you will need to "
txt "register again."
]
p [] [
txt "If you encounter issues, feel free to reach out to @daniel@fedi.summershome.org for assistance."
]
]
/// The confirmation page for canceling a reset request
let resetCanceled wasCanceled =
let pgTitle = if wasCanceled then "Password Reset Request Canceled" else "Reset Request Not Found"
pageWithTitle pgTitle [
p [] [
if wasCanceled then txt "Your password reset request has been canceled."
else txt "There was no active password reset request found; it may have already expired."
]
]
/// The password reset page
let resetPassword (m : ResetPasswordForm) isHtmx csrf =
pageWithTitle "Reset Password" [
p [] [ txt "Enter your new password in the fields below" ]
form [ _class "row g-3"; _method "POST"; _action "/citizen/reset-password" ] [
antiForgery csrf
input [ _type "hidden"; _name (nameof m.Id); _value m.Id ]
input [ _type "hidden"; _name (nameof m.Token); _value m.Token ]
div [ _class "col-12 col-md-6 col-xl-4 offset-xl-2" ] [
textBox [ _type "password"; _minlength "8"; _autofocus ] (nameof m.Password) "" "New Password" true
]
div [ _class "col-12 col-md-6 col-xl-4" ] [
textBox [ _type "password"; _minlength "8" ] "ConfirmPassword" "" "Confirm New Password" true
]
div [ _class "col-12" ] [ submitButton "lock-reset" "Reset Password" ]
jsOnLoad $"jjj.citizen.validatePasswords('{nameof m.Password}', 'ConfirmPassword', true)" isHtmx
]
]

View File

@ -0,0 +1,10 @@
<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

@ -0,0 +1,122 @@
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

@ -0,0 +1,29 @@
<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

@ -0,0 +1,11 @@
<?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>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

View File

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

View File

@ -0,0 +1,40 @@
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

@ -0,0 +1,46 @@
@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

@ -0,0 +1,58 @@
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

@ -0,0 +1,132 @@
@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

@ -0,0 +1,134 @@
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

@ -0,0 +1,13 @@
@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

@ -0,0 +1,81 @@
@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

@ -0,0 +1,23 @@
@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

@ -0,0 +1,413 @@
@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

@ -0,0 +1,57 @@
@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

@ -0,0 +1,139 @@
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

@ -0,0 +1,62 @@
@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

@ -0,0 +1,134 @@
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

@ -0,0 +1,45 @@
@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

@ -0,0 +1,90 @@
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

@ -0,0 +1,39 @@
@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

@ -0,0 +1,54 @@
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

@ -0,0 +1,15 @@
@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

@ -0,0 +1,49 @@
@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

@ -0,0 +1,124 @@
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

@ -0,0 +1,59 @@
@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

@ -0,0 +1,34 @@
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

@ -0,0 +1,19 @@
@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

@ -0,0 +1,69 @@
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

@ -0,0 +1,38 @@
@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

@ -0,0 +1,27 @@
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

@ -0,0 +1,30 @@
{
"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

@ -0,0 +1,181 @@
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

@ -0,0 +1,25 @@
<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

@ -0,0 +1,16 @@
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

@ -0,0 +1,22 @@
@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 IList<string> Errors { get; set; } = default!;
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
}

View File

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

View File

@ -0,0 +1,30 @@
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

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

View File

@ -0,0 +1,30 @@
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

@ -0,0 +1,18 @@
@if (IsLoading)
{
<p>@Message</p>
}
else if (ErrorMessages.Count > 0)
{
<p>The following error@(ErrorMessages.Count == 1 ? "" : "s") occurred:</p>
<ul>
@foreach (var msg in ErrorMessages)
{
<li><pre>@msg</pre></li>
}
</ul>
}
else
{
@ChildContent
}

View File

@ -0,0 +1,56 @@
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

@ -0,0 +1,43 @@
@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

@ -0,0 +1,86 @@
.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

@ -0,0 +1,15 @@
<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

@ -0,0 +1,88 @@
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

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

View File

@ -0,0 +1,111 @@
@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> Edit Your Profile
</NavLink>
</li>
<li class="nav-item 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="/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-plus" 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

@ -0,0 +1,62 @@
.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;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
}

View File

@ -0,0 +1,11 @@
@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

@ -0,0 +1,60 @@
@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

@ -0,0 +1,60 @@
@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

@ -0,0 +1,22 @@
<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

@ -0,0 +1,29 @@
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

@ -0,0 +1,14 @@
@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

@ -0,0 +1,72 @@
@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

@ -0,0 +1,86 @@
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

@ -0,0 +1,21 @@
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

@ -0,0 +1,114 @@
[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

@ -0,0 +1,543 @@
<?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>

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,52 @@
<!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

@ -1,204 +0,0 @@
namespace JobsJobsJobs
open NodaTime
open Npgsql.FSharp
/// Helper types and functions for the cache
[<AutoOpen>]
module private CacheHelpers =
open System
open System.Threading.Tasks
open Npgsql
/// The cache entry
type Entry =
{ /// The ID of the cache entry
Id : string
/// The value to be cached
Payload : byte[]
/// When this entry will expire
ExpireAt : Instant
/// The duration by which the expiration should be pushed out when being refreshed
SlidingExpiration : Duration option
/// The must-expire-by date/time for the cache entry
AbsoluteExpiration : Instant option
}
/// Run a task synchronously
let sync<'T> (it : Task<'T>) = it |> (Async.AwaitTask >> Async.RunSynchronously)
/// Get the current instant
let getNow () = SystemClock.Instance.GetCurrentInstant ()
/// Create a parameter for a non-standard type
let typedParam<'T> name (it : 'T) =
$"@%s{name}", Sql.parameter (NpgsqlParameter ($"@{name}", it))
/// Create a parameter for a possibly-missing non-standard type
let optParam<'T> name (it : 'T option) =
let p = NpgsqlParameter ($"@%s{name}", if Option.isSome it then box it.Value else DBNull.Value)
p.ParameterName, Sql.parameter p
/// Create a parameter for the expire-at time
let expireParam =
typedParam "expireAt"
open System.Threading
open BitBadger.Npgsql.FSharp.Documents
open JobsJobsJobs.Common.Data
open Microsoft.Extensions.Caching.Distributed
// getEntry isn't resumable
#nowarn "3511"
/// A distributed cache implementation in PostgreSQL used to handle sessions for Jobs, Jobs, Jobs
type DistributedCache () =
// ~~~ INITIALIZATION ~~~
do
task {
let! exists =
Custom.scalar
$"SELECT EXISTS
(SELECT 1 FROM pg_tables WHERE schemaname = 'jjj' AND tablename = 'session')
AS does_exist"
[] (fun row -> row.bool "does_exist")
if not exists then
do! Custom.nonQuery
"CREATE TABLE jjj.session (
id TEXT NOT NULL PRIMARY KEY,
payload BYTEA NOT NULL,
expire_at TIMESTAMPTZ NOT NULL,
sliding_expiration INTERVAL,
absolute_expiration TIMESTAMPTZ);
CREATE INDEX idx_session_expiration ON jjj.session (expire_at)" []
} |> sync
// ~~~ SUPPORT FUNCTIONS ~~~
/// Get an entry, updating it for sliding expiration
let getEntry key = backgroundTask {
let idParam = "@id", Sql.string key
let! tryEntry =
Custom.single
"SELECT * FROM jjj.session WHERE id = @id" [ idParam ]
(fun row ->
{ Id = row.string "id"
Payload = row.bytea "payload"
ExpireAt = row.fieldValue<Instant> "expire_at"
SlidingExpiration = row.fieldValueOrNone<Duration> "sliding_expiration"
AbsoluteExpiration = row.fieldValueOrNone<Instant> "absolute_expiration"
})
match tryEntry with
| Some entry ->
let now = getNow ()
let slideExp = defaultArg entry.SlidingExpiration Duration.MinValue
let absExp = defaultArg entry.AbsoluteExpiration Instant.MinValue
let needsRefresh, item =
if entry.ExpireAt = absExp then false, entry
elif slideExp = Duration.MinValue && absExp = Instant.MinValue then false, entry
elif absExp > Instant.MinValue && entry.ExpireAt.Plus slideExp > absExp then
true, { entry with ExpireAt = absExp }
else true, { entry with ExpireAt = now.Plus slideExp }
if needsRefresh then
do! Custom.nonQuery
"UPDATE jjj.session SET expire_at = @expireAt WHERE id = @id"
[ expireParam item.ExpireAt; idParam ]
return if item.ExpireAt > now then Some entry else None
| None -> return None
}
/// The last time expired entries were purged (runs every 30 minutes)
let mutable lastPurge = Instant.MinValue
/// Purge expired entries every 30 minutes
let purge () = backgroundTask {
let now = getNow ()
if lastPurge.Plus (Duration.FromMinutes 30L) < now then
do! Custom.nonQuery "DELETE FROM jjj.session WHERE expire_at < @expireAt" [ expireParam now ]
lastPurge <- now
}
/// Remove a cache entry
let removeEntry key =
Custom.nonQuery "DELETE FROM jjj.session WHERE id = @id" [ "@id", Sql.string key ]
/// Save an entry
let saveEntry (opts : DistributedCacheEntryOptions) key payload = backgroundTask {
let now = getNow ()
let expireAt, slideExp, absExp =
if opts.SlidingExpiration.HasValue then
let slide = Duration.FromTimeSpan opts.SlidingExpiration.Value
now.Plus slide, Some slide, None
elif opts.AbsoluteExpiration.HasValue then
let exp = Instant.FromDateTimeOffset opts.AbsoluteExpiration.Value
exp, None, Some exp
elif opts.AbsoluteExpirationRelativeToNow.HasValue then
let exp = now.Plus (Duration.FromTimeSpan opts.AbsoluteExpirationRelativeToNow.Value)
exp, None, Some exp
else
// Default to 1 hour sliding expiration
let slide = Duration.FromHours 1
now.Plus slide, Some slide, None
do! Custom.nonQuery
"INSERT INTO jjj.session (
id, payload, expire_at, sliding_expiration, absolute_expiration
) VALUES (
@id, @payload, @expireAt, @slideExp, @absExp
) ON CONFLICT (id) DO UPDATE
SET payload = EXCLUDED.payload,
expire_at = EXCLUDED.expire_at,
sliding_expiration = EXCLUDED.sliding_expiration,
absolute_expiration = EXCLUDED.absolute_expiration"
[ "@id", Sql.string key
"@payload", Sql.bytea payload
expireParam expireAt
optParam "slideExp" slideExp
optParam "absExp" absExp ]
}
// ~~~ IMPLEMENTATION FUNCTIONS ~~~
/// Retrieve the data for a cache entry
let get key (_ : CancellationToken) = backgroundTask {
match! getEntry key with
| Some entry ->
do! purge ()
return entry.Payload
| None -> return null
}
/// Refresh an entry
let refresh key (cancelToken : CancellationToken) = backgroundTask {
let! _ = get key cancelToken
()
}
/// Remove an entry
let remove key (_ : CancellationToken) = backgroundTask {
do! removeEntry key
do! purge ()
}
/// Set an entry
let set key value options (_ : CancellationToken) = backgroundTask {
do! saveEntry options key value
do! purge ()
}
interface IDistributedCache with
member _.Get key = get key CancellationToken.None |> sync
member _.GetAsync (key, token) = get key token
member _.Refresh key = refresh key CancellationToken.None |> sync
member _.RefreshAsync (key, token) = refresh key token
member _.Remove key = remove key CancellationToken.None |> sync
member _.RemoveAsync (key, token) = remove key token
member _.Set (key, value, options) = set key value options CancellationToken.None |> sync
member _.SetAsync (key, value, options, token) = set key value options token

View File

@ -1,141 +0,0 @@
module JobsJobsJobs.Common.Data
/// Constants for tables used by Jobs, Jobs, Jobs
[<RequireQualifiedAccess>]
module Table =
/// Citizens
[<Literal>]
let Citizen = "jjj.citizen"
/// Continents
[<Literal>]
let Continent = "jjj.continent"
/// Job Listings
[<Literal>]
let Listing = "jjj.listing"
/// Employment Profiles
[<Literal>]
let Profile = "jjj.profile"
/// User Security Information
[<Literal>]
let SecurityInfo = "jjj.security_info"
/// Success Stories
[<Literal>]
let Success = "jjj.success"
open BitBadger.Npgsql.FSharp.Documents
open Npgsql.FSharp
/// Connection management for the document store
[<AutoOpen>]
module DataConnection =
open System.Text.Json
open BitBadger.Npgsql.Documents
open JobsJobsJobs
open Microsoft.Extensions.Configuration
open Npgsql
/// Create tables
let private createTables () = backgroundTask {
do! Custom.nonQuery "CREATE SCHEMA IF NOT EXISTS jjj" []
do! Definition.ensureTable Table.Citizen
do! Definition.ensureTable Table.Continent
do! Definition.ensureTable Table.Listing
do! Definition.ensureTable Table.Success
// Tables that use more than the default document configuration, key indexes, and text search index
do! Custom.nonQuery
$"CREATE TABLE IF NOT EXISTS {Table.Profile}
(id TEXT NOT NULL PRIMARY KEY, data JSONB NOT NULL, text_search TSVECTOR NOT NULL,
CONSTRAINT fk_profile_citizen FOREIGN KEY (id) REFERENCES {Table.Citizen} (id) ON DELETE CASCADE);
CREATE TABLE IF NOT EXISTS {Table.SecurityInfo} (id TEXT NOT NULL PRIMARY KEY, data JSONB NOT NULL,
CONSTRAINT fk_security_info_citizen
FOREIGN KEY (id) REFERENCES {Table.Citizen} (id) ON DELETE CASCADE);
CREATE UNIQUE INDEX IF NOT EXISTS uk_citizen_email ON {Table.Citizen} ((data -> 'email'));
CREATE INDEX IF NOT EXISTS idx_listing_citizen ON {Table.Listing} ((data -> 'citizenId'));
CREATE INDEX IF NOT EXISTS idx_listing_continent ON {Table.Listing} ((data -> 'continentId'));
CREATE INDEX IF NOT EXISTS idx_profile_continent ON {Table.Profile} ((data -> 'continentId'));
CREATE INDEX IF NOT EXISTS idx_success_citizen ON {Table.Success} ((data -> 'citizenId'));
CREATE INDEX IF NOT EXISTS idx_profile_search ON {Table.Profile} USING GIN(text_search)"
[]
}
/// Create functions and triggers required to keep the search index current
let private createTriggers () = backgroundTask {
let! functions =
Custom.list
"SELECT p.proname
FROM pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE n.nspname = 'jjj'"
[] (fun row -> row.string "proname")
if not (functions |> List.contains "indexable_array_string") then
do! Custom.nonQuery
"""CREATE FUNCTION jjj.indexable_array_string(target jsonb, path jsonpath) RETURNS text AS $$
BEGIN
RETURN REPLACE(REPLACE(REPLACE(REPLACE(jsonb_path_query_array(target, path)::text,
'["', ''), '", "', ' '), '"]', ''), '[]', '');
END;
$$ LANGUAGE plpgsql;""" []
if not (functions |> List.contains "set_text_search") then
do! Custom.nonQuery
$"CREATE FUNCTION jjj.set_text_search() RETURNS trigger AS $$
BEGIN
NEW.text_search := to_tsvector('english',
COALESCE(NEW.data ->> 'region', '') || ' '
|| COALESCE(NEW.data ->> 'biography', '') || ' '
|| COALESCE(NEW.data ->> 'experience', '') || ' '
|| jjj.indexable_array_string(NEW.data, '$.skills[*].description') || ' '
|| jjj.indexable_array_string(NEW.data, '$.history[*].employer') || ' '
|| jjj.indexable_array_string(NEW.data, '$.history[*].position') || ' '
|| jjj.indexable_array_string(NEW.data, '$.history[*].description'));
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER set_text_search BEFORE INSERT OR UPDATE ON {Table.Profile}
FOR EACH ROW EXECUTE FUNCTION jjj.set_text_search();" []
}
/// Set up the data connection from the given configuration
let setUp (cfg : IConfiguration) = backgroundTask {
let builder = NpgsqlDataSourceBuilder (cfg.GetConnectionString "PostgreSQL")
let _ = builder.UseNodaTime ()
Configuration.useDataSource (builder.Build ())
Configuration.useSerializer
{ new IDocumentSerializer with
member _.Serialize<'T> (it : 'T) = JsonSerializer.Serialize (it, Json.options)
member _.Deserialize<'T> (it : string) = JsonSerializer.Deserialize<'T> (it, Json.options)
}
do! createTables ()
do! createTriggers ()
}
/// Create a match-anywhere clause for a LIKE or ILIKE clause
let like value =
Sql.string $"%%%s{value}%%"
/// Get the SQL for a search WHERE clause
let searchSql criteria =
let sql = criteria |> List.map fst |> String.concat " AND "
if sql = "" then "" else $"AND {sql}"
/// Continent data access functions
[<RequireQualifiedAccess>]
module Continents =
open JobsJobsJobs.Domain
/// Retrieve all continents
let all () =
Custom.list $"{Query.selectFromTable Table.Continent} ORDER BY data ->> 'name'" [] fromData<Continent>
/// Retrieve a continent by its ID
let findById continentId =
Find.byId<Continent> Table.Continent (ContinentId.toString continentId)

View File

@ -1,484 +0,0 @@
namespace JobsJobsJobs.Domain
open System
open Giraffe
open NodaTime
// ~~~ SUPPORT TYPES ~~~ //
/// The ID of a user (a citizen of Gitmo Nation)
type CitizenId = CitizenId of Guid
/// Support functions for citizen IDs
module CitizenId =
/// Create a new citizen ID
let create () = (Guid.NewGuid >> CitizenId) ()
/// A string representation of a citizen ID
let toString = function CitizenId it -> ShortGuid.fromGuid it
/// Parse a string into a citizen ID
let ofString = ShortGuid.toGuid >> CitizenId
/// Get the GUID value of a citizen ID
let value = function CitizenId guid -> guid
/// Types of contacts supported by Jobs, Jobs, Jobs
type ContactType =
/// E-mail addresses
| Email
/// Phone numbers (home, work, cell, etc.)
| Phone
/// Websites (personal, social, etc.)
| Website
/// Functions to support contact types
module ContactType =
/// Parse a contact type from a string
let parse typ =
match typ with
| "Email" -> Email
| "Phone" -> Phone
| "Website" -> Website
| it -> invalidOp $"{it} is not a valid contact type"
/// Convert a contact type to its string representation
let toString =
function
| Email -> "Email"
| Phone -> "Phone"
| Website -> "Website"
/// The ID of a continent
type ContinentId = ContinentId of Guid
/// Support functions for continent IDs
module ContinentId =
/// Create a new continent ID
let create () = (Guid.NewGuid >> ContinentId) ()
/// A string representation of a continent ID
let toString = function ContinentId it -> ShortGuid.fromGuid it
/// Parse a string into a continent ID
let ofString = ShortGuid.toGuid >> ContinentId
/// Get the GUID value of a continent ID
let value = function ContinentId guid -> guid
/// A string of Markdown text
type MarkdownString = Text of string
/// Support functions for Markdown strings
module MarkdownString =
open Markdig
/// The Markdown conversion pipeline (enables all advanced features)
let private pipeline = MarkdownPipelineBuilder().UseAdvancedExtensions().Build ()
/// Convert this Markdown string to HTML
let toHtml = function Text text -> Markdown.ToHtml (text, pipeline)
/// Convert a Markdown string to its string representation
let toString = function Text text -> text
/// An employment history entry
[<NoComparison; NoEquality>]
type EmploymentHistory =
{ /// The employer for this period of employment
Employer : string
/// The date employment started
StartDate : LocalDate
/// The date employment ended (None implies ongoing employment)
EndDate : LocalDate option
/// The title / position held
Position : string option
/// A description of the duties entailed during this employment
Description : MarkdownString option
}
/// Support functions for employment history entries
module EmploymentHistory =
let empty =
{ Employer = ""
StartDate = LocalDate.FromDateTime DateTime.Today
EndDate = None
Position = None
Description = None
}
/// The ID of a job listing
type ListingId = ListingId of Guid
/// Support functions for listing IDs
module ListingId =
/// Create a new job listing ID
let create () = (Guid.NewGuid >> ListingId) ()
/// A string representation of a listing ID
let toString = function ListingId it -> ShortGuid.fromGuid it
/// Parse a string into a listing ID
let ofString = ShortGuid.toGuid >> ListingId
/// Get the GUID value of a listing ID
let value = function ListingId guid -> guid
/// Another way to contact a citizen from this site
[<NoComparison; NoEquality>]
type OtherContact =
{ /// The type of contact
ContactType : ContactType
/// The name of the contact (Email, Mastodon, LinkedIn, etc.)
Name : string option
/// The value for the contact (e-mail address, user name, URL, etc.)
Value : string
/// Whether this contact is visible in public employment profiles and job listings
IsPublic : bool
}
/// Visibility options for an employment profile
type ProfileVisibility =
/// Profile is only visible to the citizen to whom it belongs
| Hidden
/// Profile is only visible to authenticated users
| Private
/// Anonymous information is visible to public users
| Anonymous
/// The full employment profile is visible to public users
| Public
/// Support functions for profile visibility
module ProfileVisibility =
/// Parse a string into a profile visibility
let parse viz =
match viz with
| "Hidden" -> Hidden
| "Private" -> Private
| "Anonymous" -> Anonymous
| "Public" -> Public
| it -> invalidOp $"{it} is not a valid profile visibility value"
/// Convert a profile visibility to its string representation
let toString =
function
| Hidden -> "Hidden"
| Private -> "Private"
| Anonymous -> "Anonymous"
| Public -> "Public"
/// A skill the job seeker possesses
[<NoComparison; NoEquality>]
type Skill =
{ /// A description of the skill
Description : string
/// Notes regarding this skill (level, duration, etc.)
Notes : string option
}
/// The ID of a success report
type SuccessId = SuccessId of Guid
/// Support functions for success report IDs
module SuccessId =
/// Create a new success report ID
let create () = (Guid.NewGuid >> SuccessId) ()
/// A string representation of a success report ID
let toString = function SuccessId it -> ShortGuid.fromGuid it
/// Parse a string into a success report ID
let ofString = ShortGuid.toGuid >> SuccessId
/// Get the GUID value of a success ID
let value = function SuccessId guid -> guid
// ~~~ DOCUMENT TYPES ~~~ //
/// A user of Jobs, Jobs, Jobs; a citizen of Gitmo Nation
[<NoComparison; NoEquality>]
type Citizen =
{ /// The ID of the user
Id : CitizenId
/// When the user joined Jobs, Jobs, Jobs
JoinedOn : Instant
/// When the user last logged in
LastSeenOn : Instant
/// The user's e-mail address
Email : string
/// The user's first name
FirstName : string
/// The user's last name
LastName : string
/// The hash of the user's password
PasswordHash : string
/// The name displayed for this user throughout the site
DisplayName : string option
/// The other contacts for this user
OtherContacts : OtherContact list
}
/// Support functions for citizens
module Citizen =
/// An empty citizen
let empty = {
Id = CitizenId Guid.Empty
JoinedOn = Instant.MinValue
LastSeenOn = Instant.MinValue
Email = ""
FirstName = ""
LastName = ""
PasswordHash = ""
DisplayName = None
OtherContacts = []
}
/// Get the name of the citizen (either their preferred display name or first/last names)
let name x =
match x.DisplayName with Some it -> it | None -> $"{x.FirstName} {x.LastName}"
/// A continent
[<NoComparison; NoEquality>]
type Continent =
{ /// The ID of the continent
Id : ContinentId
/// The name of the continent
Name : string
}
/// Support functions for continents
module Continent =
/// An empty continent
let empty ={
Id = ContinentId Guid.Empty
Name = ""
}
/// A job listing
[<NoComparison; NoEquality>]
type Listing =
{ /// The ID of the job listing
Id : ListingId
/// The ID of the citizen who posted the job listing
CitizenId : CitizenId
/// When this job listing was created
CreatedOn : Instant
/// The short title of the job listing
Title : string
/// The ID of the continent on which the job is located
ContinentId : ContinentId
/// The region in which the job is located
Region : string
/// Whether this listing is for remote work
IsRemote : bool
/// Whether this listing has expired
IsExpired : bool
/// When this listing was last updated
UpdatedOn : Instant
/// The details of this job
Text : MarkdownString
/// When this job needs to be filled
NeededBy : LocalDate option
/// Was this job filled as part of its appearance on Jobs, Jobs, Jobs?
WasFilledHere : bool option
}
/// Support functions for job listings
module Listing =
/// An empty job listing
let empty = {
Id = ListingId Guid.Empty
CitizenId = CitizenId Guid.Empty
CreatedOn = Instant.MinValue
Title = ""
ContinentId = ContinentId Guid.Empty
Region = ""
IsRemote = false
IsExpired = false
UpdatedOn = Instant.MinValue
Text = Text ""
NeededBy = None
WasFilledHere = None
}
/// Security settings for a user
[<NoComparison; NoEquality>]
type SecurityInfo =
{ /// The ID of the citizen to whom these settings apply
Id : CitizenId
/// The number of failed log on attempts (reset to 0 on successful log on)
FailedLogOnAttempts : int
/// Whether the account is locked
AccountLocked : bool
/// The token the user must provide to take their desired action
Token : string option
/// The action to which the token applies
TokenUsage : string option
/// When the token expires
TokenExpires : Instant option
}
/// Functions to support security info
module SecurityInfo =
/// An empty set of security info
let empty = {
Id = CitizenId Guid.Empty
FailedLogOnAttempts = 0
AccountLocked = false
Token = None
TokenUsage = None
TokenExpires = None
}
/// A job seeker profile
[<NoComparison; NoEquality>]
type Profile =
{ /// The ID of the citizen to whom this profile belongs
Id : CitizenId
/// The ID of the continent on which the citizen resides
ContinentId : ContinentId
/// The region in which the citizen resides
Region : string
/// Whether this citizen is actively seeking employment
IsSeekingEmployment : bool
/// Whether the citizen is interested in remote work
IsRemote : bool
/// Whether the citizen is interested in full-time work
IsFullTime : bool
/// The citizen's professional biography
Biography : MarkdownString
/// Skills this citizen possesses
Skills : Skill list
/// The citizen's employment history
History : EmploymentHistory list
/// The citizen's experience (topical / chronological)
Experience : MarkdownString option
/// The visibility of this profile
Visibility : ProfileVisibility
/// When the citizen last updated their profile
LastUpdatedOn : Instant
}
/// Support functions for Profiles
module Profile =
// An empty profile
let empty = {
Id = CitizenId Guid.Empty
ContinentId = ContinentId Guid.Empty
Region = ""
IsSeekingEmployment = false
IsRemote = false
IsFullTime = false
Biography = Text ""
Skills = []
History = []
Experience = None
Visibility = Private
LastUpdatedOn = Instant.MinValue
}
/// A record of success finding employment
[<NoComparison; NoEquality>]
type Success =
{ /// The ID of the success report
Id : SuccessId
/// The ID of the citizen who wrote this success report
CitizenId : CitizenId
/// When this success report was recorded
RecordedOn : Instant
/// Whether the success was due, at least in part, to Jobs, Jobs, Jobs
IsFromHere : bool
/// The source of this success (listing or profile)
Source : string
/// The success story
Story : MarkdownString option
}
/// Support functions for success stories
module Success =
/// An empty success story
let empty = {
Id = SuccessId Guid.Empty
CitizenId = CitizenId Guid.Empty
RecordedOn = Instant.MinValue
IsFromHere = false
Source = ""
Story = None
}

View File

@ -1,123 +0,0 @@
module JobsJobsJobs.Email
open System.Net
open JobsJobsJobs.Domain
open MailKit.Net.Smtp
open MimeKit
/// Options to use when sending e-mail
type EmailOptions() =
/// The hostname of the SMTP server
member val SmtpHost : string = "localhost" with get, set
/// The port over which SMTP communication should occur
member val Port : int = 25 with get, set
/// Whether to use SSL when communicating with the SMTP server
member val UseSsl : bool = false with get, set
/// The authentication to use with the SMTP server
member val Authentication : string = "" with get, set
/// The e-mail address from which messages should be sent
member val FromAddress : string = "nobody@noagendacareers.com" with get, set
/// The name from which messages should be sent
member val FromName : string = "Jobs, Jobs, Jobs" with get, set
/// The options for the SMTP server
let mutable options = EmailOptions ()
/// Private functions for sending e-mail
[<AutoOpen>]
module private Helpers =
/// Create an SMTP client
let createClient () = backgroundTask {
let client = new SmtpClient ()
do! client.ConnectAsync (options.SmtpHost, options.Port, options.UseSsl)
do! client.AuthenticateAsync (options.FromAddress, options.Authentication)
return client
}
/// Create a message with to, from, and subject completed
let createMessage citizen subject =
let msg = new MimeMessage ()
msg.From.Add (MailboxAddress ("Jobs, Jobs, Jobs", "daniel@bitbadger.solutions"))
msg.To.Add (MailboxAddress (Citizen.name citizen, citizen.Email))
msg.Subject <- subject
msg
/// Send a message
let sendMessage msg = backgroundTask {
use! client = createClient ()
let! result = client.SendAsync msg
do! client.DisconnectAsync true
return result
}
/// Send an account confirmation e-mail
let sendAccountConfirmation citizen security = backgroundTask {
let token = WebUtility.UrlEncode security.Token.Value
use msg = createMessage citizen "Account Confirmation Request"
let text =
[ $"ITM, {Citizen.name citizen}!"
""
"This e-mail address was recently used to establish an account on"
"Jobs, Jobs, Jobs (noagendacareers.com). Before this account can be"
"used, it needs to be verified. Please click the link below to do so;"
"it will work for the next 72 hours (3 days)."
""
$"https://noagendacareers.com/citizen/confirm/{token}"
""
"If you did not take this action, you can do nothing, and the account"
"will be deleted at the end of that time. If you wish to delete it"
"immediately, use the link below (also valid for 72 hours)."
""
$"https://noagendacareers.com/citizen/deny/{token}"
""
"TYFYC!"
""
"--"
"Jobs, Jobs, Jobs"
"https://noagendacareers.com"
] |> String.concat "\n"
use msgText = new TextPart (Text = text)
msg.Body <- msgText
return! sendMessage msg
}
/// Send a password reset link
let sendPasswordReset citizen security = backgroundTask {
let token = WebUtility.UrlEncode security.Token.Value
use msg = createMessage citizen "Reset Password for Jobs, Jobs, Jobs"
let text =
[ $"ITM, {Citizen.name citizen}!"
""
"We recently receive a request to reset the password for your account"
"on Jobs, Jobs, Jobs (noagendacareers.com). Use the link below to"
"do so; it will work for the next 72 hours (3 days)."
""
$"https://noagendacareers.com/citizen/reset-password/{token}"
""
"If you did not take this action, you can do nothing, and the link"
"will expire normally. If you wish to expire the token immediately,"
"use the link below (also valid for 72 hours)."
""
$"https://noagendacareers.com/citizen/cancel-reset/{token}"
""
"TYFYC!"
""
"--"
"Jobs, Jobs, Jobs"
"https://noagendacareers.com"
] |> String.concat "\n"
use msgText = new TextPart (Text = text)
msg.Body <- msgText
return! sendMessage msg
}

View File

@ -1,206 +0,0 @@
/// Common helper functions for views
module JobsJobsJobs.Common.Handlers
open Giraffe
open Giraffe.Htmx
open Microsoft.AspNetCore.Http
open Microsoft.Extensions.Logging
[<AutoOpen>]
module HtmxHelpers =
/// Is the request from htmx?
let isHtmx (ctx : HttpContext) =
ctx.Request.IsHtmx && not ctx.Request.IsHtmxRefresh
/// Handlers for error conditions
module Error =
open System.Net
/// Handler that will return a status code 404 and the text "Not Found"
let notFound : HttpHandler = fun _ ctx ->
let fac = ctx.GetService<ILoggerFactory> ()
let log = fac.CreateLogger "Handler"
let path = string ctx.Request.Path
log.LogInformation "Returning 404"
RequestErrors.NOT_FOUND $"The URL {path} was not recognized as a valid URL" earlyReturn ctx
/// Handle unauthorized actions, redirecting to log on for GETs, otherwise returning a 401 Not Authorized response
let notAuthorized : HttpHandler = fun next ctx ->
if ctx.Request.Method = "GET" then
let redirectUrl = $"/citizen/log-on?returnUrl={WebUtility.UrlEncode ctx.Request.Path}"
if isHtmx ctx then (withHxRedirect redirectUrl >=> redirectTo false redirectUrl) next ctx
else redirectTo false redirectUrl next ctx
else
if isHtmx ctx then
(setHttpHeader "X-Toast" $"error|||You are not authorized to access the URL {ctx.Request.Path.Value}"
>=> setStatusCode 401) earlyReturn ctx
else setStatusCode 401 earlyReturn ctx
/// Handler to log 500s and return a message we can display in the application
let unexpectedError (ex: exn) (log : ILogger) =
log.LogError(ex, "An unexpected error occurred")
clearResponse >=> ServerErrors.INTERNAL_ERROR ex.Message
open System
open System.Security.Claims
open System.Text.Json
open System.Text.RegularExpressions
open JobsJobsJobs.Domain
open Microsoft.AspNetCore.Antiforgery
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open NodaTime
/// Get the NodaTime clock from the request context
let now (ctx : HttpContext) = ctx.GetService<IClock>().GetCurrentInstant ()
/// Get the application configuration from the request context
let config (ctx : HttpContext) = ctx.GetService<IConfiguration> ()
/// Get the logger factory from the request context
let logger (ctx : HttpContext) = ctx.GetService<ILoggerFactory> ()
/// `None` if a `string option` is `None`, whitespace, or empty
let noneIfBlank (s : string option) =
s |> Option.map (fun x -> match x.Trim () with "" -> None | _ -> Some x) |> Option.flatten
/// `None` if a `string` is null, empty, or whitespace; otherwise, `Some` and the trimmed string
let noneIfEmpty = Option.ofObj >> noneIfBlank
/// Try to get the current user
let tryUser (ctx : HttpContext) =
ctx.User.FindFirst ClaimTypes.NameIdentifier
|> Option.ofObj
|> Option.map (fun x -> x.Value)
/// Get the ID of the currently logged in citizen
// NOTE: if no one is logged in, this will raise an exception
let currentCitizenId ctx = (tryUser >> Option.get >> CitizenId.ofString) ctx
let antiForgerySvc (ctx : HttpContext) =
ctx.RequestServices.GetRequiredService<IAntiforgery> ()
/// Obtain an anti-forgery token set
let csrf ctx =
(antiForgerySvc ctx).GetAndStoreTokens ctx
/// Get the time zone from the citizen's browser
let timeZone (ctx : HttpContext) =
let tz = string ctx.Request.Headers["X-Time-Zone"]
defaultArg (noneIfEmpty tz) "Etc/UTC"
/// The key to use to indicate if we have loaded the session
let private sessionLoadedKey = "session-loaded"
/// Load the session if we have not yet
let private loadSession (ctx : HttpContext) = task {
if not (ctx.Items.ContainsKey sessionLoadedKey) then
do! ctx.Session.LoadAsync ()
ctx.Items.Add (sessionLoadedKey, "yes")
}
/// Save the session if we have loaded it
let private saveSession (ctx : HttpContext) = task {
if ctx.Items.ContainsKey sessionLoadedKey then do! ctx.Session.CommitAsync ()
}
/// Get the messages from the session (destructively)
let popMessages ctx = task {
do! loadSession ctx
let msgs =
match ctx.Session.GetString "messages" with
| null -> []
| m -> JsonSerializer.Deserialize<string list> m
if not (List.isEmpty msgs) then ctx.Session.Remove "messages"
return List.rev msgs
}
/// Add a message to the response
let addMessage (level : string) (msg : string) ctx = task {
do! loadSession ctx
let! msgs = popMessages ctx
ctx.Session.SetString ("messages", JsonSerializer.Serialize ($"{level}|||{msg}" :: msgs))
}
/// Add a success message to the response
let addSuccess msg ctx = task {
do! addMessage "success" msg ctx
}
/// Add an error message to the response
let addError msg ctx = task {
do! addMessage "error" msg ctx
}
/// Add a list of errors to the response
let addErrors (errors : string list) ctx = task {
let errMsg = String.Join ("</li><li>", errors)
do! addError $"Please correct the following errors:<ul><li>{errMsg}</li></ul>" ctx
}
open JobsJobsJobs.Common.Views
/// Create the render context for an HTML response
let private createContext (ctx : HttpContext) pageTitle content messages : Layout.PageRenderContext =
{ IsLoggedOn = Option.isSome (tryUser ctx)
CurrentUrl = ctx.Request.Path.Value
PageTitle = pageTitle
Content = content
Messages = messages
}
/// Render a page-level view
let render pageTitle (_ : HttpFunc) (ctx : HttpContext) content = task {
let! messages = popMessages ctx
let renderCtx = createContext ctx pageTitle content messages
let renderFunc = if isHtmx ctx then Layout.partial else Layout.full
return! ctx.WriteHtmlViewAsync (renderFunc renderCtx)
}
/// Render a printable view (content with styles, but no layout)
let renderPrint pageTitle (_ : HttpFunc) (ctx : HttpContext) content =
createContext ctx pageTitle content []
|> Layout.print
|> ctx.WriteHtmlViewAsync
/// Render a bare (component) view
let renderBare (_ : HttpFunc) (ctx : HttpContext) content =
createContext ctx "" content []
|> Layout.bare
|> ctx.WriteHtmlViewAsync
/// Render as a composable HttpHandler
let renderHandler pageTitle content : HttpHandler = fun next ctx ->
render pageTitle next ctx content
/// Validate the anti cross-site request forgery token in the current request
let validateCsrf : HttpHandler = fun next ctx -> task {
match! (antiForgerySvc ctx).IsRequestValidAsync ctx with
| true -> return! next ctx
| false -> return! RequestErrors.BAD_REQUEST "CSRF token invalid" earlyReturn ctx
}
/// Require a user to be logged on for a route
let requireUser : HttpHandler = requiresAuthentication Error.notAuthorized
/// Regular expression to validate that a URL is a local URL
let isLocal = Regex """^/[^\/\\].*"""
/// Redirect to another page, saving the session before redirecting
let redirectToGet (url : string) next ctx = task {
do! saveSession ctx
let action =
if Option.isSome (noneIfEmpty url) && (url = "/" || isLocal.IsMatch url) then
if isHtmx ctx then withHxRedirect url else redirectTo false url
else RequestErrors.BAD_REQUEST "Invalid redirect URL"
return! action next ctx
}
/// Shorthand for Error.notFound for use in handler functions
let notFound ctx =
Error.notFound earlyReturn ctx

View File

@ -1,33 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Domain.fs" />
<Compile Include="Email.fs" />
<Compile Include="Json.fs" />
<Compile Include="Data.fs" />
<Compile Include="Views.fs" />
<Compile Include="Handlers.fs" />
<Compile Include="Cache.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BitBadger.Npgsql.FSharp.Documents" Version="1.0.0-beta3" />
<PackageReference Include="FSharp.SystemTextJson" Version="1.3.13" />
<PackageReference Include="Giraffe" Version="6.4.0" />
<PackageReference Include="Giraffe.Htmx" Version="2.0.0" />
<PackageReference Include="Giraffe.ViewEngine" Version="1.4.0" />
<PackageReference Include="Giraffe.ViewEngine.Htmx" Version="2.0.0" />
<PackageReference Include="MailKit" Version="4.6.0" />
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.1.0" />
<PackageReference Include="NodaTime.Serialization.SystemTextJson" Version="1.2.0" />
<PackageReference Include="Npgsql.FSharp" Version="5.7.0" />
<PackageReference Include="Npgsql.NodaTime" Version="8.0.3" />
<PackageReference Update="FSharp.Core" Version="8.0.300" />
</ItemGroup>
</Project>

View File

@ -1,34 +0,0 @@
/// JSON serializer options
module JobsJobsJobs.Json
open System.Text.Json
open System.Text.Json.Serialization
open JobsJobsJobs.Domain
/// Convert a wrapped DU to/from its string representation
type WrappedJsonConverter<'T> (wrap : string -> 'T, unwrap : 'T -> string) =
inherit JsonConverter<'T> ()
override _.Read(reader, _, _) =
wrap (reader.GetString ())
override _.Write(writer, value, _) =
writer.WriteStringValue (unwrap value)
open NodaTime
open NodaTime.Serialization.SystemTextJson
/// JsonSerializer options that use the custom converters
let options =
let opts = JsonSerializerOptions ()
[ WrappedJsonConverter (CitizenId.ofString, CitizenId.toString) :> JsonConverter
WrappedJsonConverter (ContactType.parse, ContactType.toString)
WrappedJsonConverter (ContinentId.ofString, ContinentId.toString)
WrappedJsonConverter (ListingId.ofString, ListingId.toString)
WrappedJsonConverter (Text, MarkdownString.toString)
WrappedJsonConverter (ProfileVisibility.parse, ProfileVisibility.toString)
WrappedJsonConverter (SuccessId.ofString, SuccessId.toString)
JsonFSharpConverter ()
]
|> List.iter opts.Converters.Add
let _ = opts.ConfigureForNodaTime DateTimeZoneProviders.Tzdb
opts.PropertyNamingPolicy <- JsonNamingPolicy.CamelCase
opts

View File

@ -1,393 +0,0 @@
/// Common functions for views
module JobsJobsJobs.Common.Views
open Giraffe.ViewEngine
open Giraffe.ViewEngine.Accessibility
open Microsoft.AspNetCore.Antiforgery
open JobsJobsJobs.Domain
/// Create an audio clip with the specified text node
let audioClip clip text =
span [ _class "jjj-audio-clip"; _onclick "jjj.playFile(this)" ] [
text; audio [ _id clip ] [ source [ _src $"/audio/{clip}.mp3" ] ]
]
/// Create an anti-forgery hidden input
let antiForgery (csrf : AntiforgeryTokenSet) =
input [ _type "hidden"; _name csrf.FormFieldName; _value csrf.RequestToken ]
/// Alias for rawText
let txt = rawText
/// Create a page with a title displayed on the page
let pageWithTitle title content =
article [] [
h3 [ _class "pb-3" ] [ txt title ]
yield! content
]
/// Create a floating-label text input box
let textBox attrs name value fieldLabel isRequired =
div [ _class "form-floating" ] [
List.append attrs [
_id name; _name name; _class "form-control"; _placeholder fieldLabel; _value value
if isRequired then _required
] |> input
label [ _class (if isRequired then "jjj-required" else "jjj-label"); _for name ] [ txt fieldLabel ]
]
/// Create a checkbox that will post "true" if checked
let checkBox attrs name isChecked checkLabel =
div [ _class "form-check" ] [
List.append attrs
[ _type "checkbox"; _id name; _name name; _class "form-check-input"; _value "true"
if isChecked then _checked ]
|> input
label [ _class "form-check-label"; _for name ] [ txt checkLabel ]
]
/// Create a select list of continents
let continentList attrs name (continents : Continent list) emptyLabel selectedValue isRequired =
div [ _class "form-floating" ] [
select (List.append attrs [ _id name; _name name; _class "form-select"; if isRequired then _required ]) (
option [ _value ""; if selectedValue = "" then _selected ] [
rawText $"""&ndash; {defaultArg emptyLabel "Select"} &ndash;""" ]
:: (continents
|> List.map (fun c ->
let theId = ContinentId.toString c.Id
option [ _value theId; if theId = selectedValue then _selected ] [ str c.Name ])))
label [ _class (if isRequired then "jjj-required" else "jjj-label"); _for name ] [ txt "Continent" ]
]
/// Create a submit button with the given icon and text
let submitButton icon text =
button [ _type "submit"; _class "btn btn-primary" ] [ i [ _class $"mdi mdi-%s{icon}" ] []; txt $"&nbsp; %s{text}" ]
/// An empty paragraph
let emptyP =
p [] [ txt "&nbsp;" ]
/// Register JavaScript code to run in the DOMContentLoaded event on the page
let jsOnLoad js isHtmx =
script [] [
let (target, event) = if isHtmx then "document.body", "htmx:afterSettle" else "document", "DOMContentLoaded"
txt (sprintf """%s.addEventListener("%s", () => { %s }, { once: true })""" target event js)
]
/// Create a Markdown editor
let markdownEditor attrs name value editorLabel isHtmx =
div [ _class "col-12"; _id $"{name}EditRow" ] [
nav [ _class "nav nav-pills pb-1" ] [
button [ _type "button"; _id $"{name}EditButton"; _class "btn btn-primary btn-sm rounded-pill" ] [
txt "Markdown"
]
rawText " &nbsp; "
button [ _type "button"; _id $"{name}PreviewButton"
_class "btn btn-outline-secondary btn-sm rounded-pill" ] [
txt "Preview"
]
]
section [ _id $"{name}Preview"; _class "jjj-not-shown jjj-markdown-preview px-2 pt-2"
_ariaLabel "Rendered Markdown preview" ] []
div [ _id $"{name}Edit"; _class "form-floating jjj-shown" ] [
textarea (List.append attrs
[ _id name; _name name; _class "form-control jjj-markdown-editor"; _rows "10" ]) [
txt value
]
label [ _for name ] [ txt editorLabel ]
]
jsOnLoad $"jjj.markdownOnLoad('{name}')" isHtmx
]
/// Wrap content in a collapsing panel
let collapsePanel header isShown content =
let showClass = if isShown then " show" else ""
div [ _class "card" ] [
div [ _class "card-header" ] [
h6 [ _class "mb-0 card-title" ] [
a [ _href "#jjjCollapse"; _data "bs-toggle" "collapse"; _roleButton; _ariaControls "#jjjCollapse"
_ariaExpanded (isShown.ToString().ToLowerInvariant ()) ] [ txt header ]
]
]
div [ _id "jjjCollapse"; _class $"card-body collapse{showClass}" ] content
]
/// "Yes" or "No" based on a boolean value
let yesOrNo value =
if value then "Yes" else "No"
/// Markdown as a raw HTML text node
let md2html value =
(MarkdownString.toHtml >> txt) value
/// Display a citizen's contact information
let contactInfo citizen isPublic =
citizen.OtherContacts
|> List.filter (fun it -> (isPublic && it.IsPublic) || not isPublic)
|> List.collect (fun contact ->
match contact.ContactType with
| Website ->
[ i [ _class "mdi mdi-sm mdi-web" ] []; txt " "
a [ _href contact.Value; _target "_blank"; _rel "noopener"; _class "me-4" ] [
str (defaultArg contact.Name "Website")
]
]
| Email ->
[ i [ _class "mdi mdi-sm mdi-email-outline" ] []; txt " "
a [ _href $"mailto:{contact.Value}"; _class "me-4" ] [ str (defaultArg contact.Name "E-mail") ]
]
| Phone ->
[ span [ _class "me-4" ] [
i [ _class "mdi mdi-sm mdi-phone" ] []; txt " "; str contact.Value
match contact.Name with Some name -> str $" ({name})" | None -> ()
]
])
/// Display a citizen's contact information
let contactInfoPrint citizen isPublic =
citizen.OtherContacts
|> List.filter (fun it -> (isPublic && it.IsPublic) || not isPublic)
|> List.collect (fun contact ->
match contact.ContactType with
| Website ->
[ i [ _class "mdi mdi-sm mdi-web" ] []; txt " "; str (defaultArg contact.Name "Website"); txt " &ndash; "
str contact.Value; br []
]
| Email ->
[ i [ _class "mdi mdi-sm mdi-email-outline" ] []; txt " "; str (defaultArg contact.Name "E-mail")
txt " &ndash; "; str contact.Value; br []
]
| Phone ->
[ span [ _class "me-4" ] [
i [ _class "mdi mdi-sm mdi-phone" ] []; rawText " "
match contact.Name with Some name -> str name; txt " &ndash; " | None -> ()
str contact.Value; br []
]
])
open NodaTime
open NodaTime.Text
/// Generate a full date in the citizen's local time zone
let fullDate (value : Instant) tz =
(ZonedDateTimePattern.CreateWithCurrentCulture ("MMMM d, yyyy", DateTimeZoneProviders.Tzdb))
.Format(value.InZone DateTimeZoneProviders.Tzdb[tz])
/// Generate a full date/time in the citizen's local time
let fullDateTime (value : Instant) tz =
let dtPattern = ZonedDateTimePattern.CreateWithCurrentCulture ("MMMM d, yyyy h:mm", DateTimeZoneProviders.Tzdb)
let amPmPattern = ZonedDateTimePattern.CreateWithCurrentCulture ("tt", DateTimeZoneProviders.Tzdb)
let tzValue = value.InZone DateTimeZoneProviders.Tzdb[tz]
$"{dtPattern.Format(tzValue)}{amPmPattern.Format(tzValue).ToLowerInvariant()}"
/// Layout generation functions
[<RequireQualifiedAccess>]
module Layout =
open Giraffe.ViewEngine.Htmx
/// Data items needed to render a view
type PageRenderContext =
{ /// Whether a user is logged on
IsLoggedOn : bool
/// The current URL
CurrentUrl : string
/// The title of this page
PageTitle : string
/// The page content
Content : XmlNode
/// User messages to be displayed
Messages : string list
}
/// Append the application name to the page title
let private constructTitle ctx =
seq {
if ctx.PageTitle <> "" then
ctx.PageTitle; " | "
"Jobs, Jobs, Jobs"
}
|> Seq.reduce (+)
|> str
|> List.singleton
|> title []
/// Generate the HTML head tag
let private htmlHead ctx =
head [] [
meta [ _name "viewport"; _content "width=device-width, initial-scale=1" ]
constructTitle ctx
link [ _href "https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css"
_rel "stylesheet"
_integrity "sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx"
_crossorigin "anonymous" ]
link [ _href "https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
_rel "stylesheet" ]
link [ _href "/style.css"; _rel "stylesheet" ]
]
/// Display the links available to the current user
let private links ctx =
let navLink url icon text =
a [ _href url
_onclick "jjj.hideMenu()"
if url = ctx.CurrentUrl then _class "jjj-current-page"
] [ i [ _class $"mdi mdi-{icon}"; _ariaHidden "true" ] []; txt text ]
nav [ _class "jjj-nav" ] [
if ctx.IsLoggedOn then
navLink "/citizen/dashboard" "view-dashboard-variant" "Dashboard"
navLink "/help-wanted" "newspaper-variant-multiple-outline" "Help Wanted!"
navLink "/profile/search" "view-list-outline" "Job Seekers"
navLink "/success-stories" "thumb-up" "Success Stories"
div [ _class "separator" ] []
navLink "/citizen/account" "account-edit" "My Account"
navLink "/listings/mine" "sign-text" "My Job Listings"
navLink "/profile/edit" "pencil" "My Employment Profile"
div [ _class "separator" ] []
navLink "/citizen/log-off" "logout-variant" "Log Off"
else
navLink "/" "home" "Home"
navLink "/profile/search" "view-list-outline" "Job Seekers"
navLink "/citizen/log-on" "login-variant" "Log On"
navLink "/how-it-works" "help-circle-outline" "How It Works"
]
/// Generate mobile and desktop side navigation areas
let private sideNavs ctx = [
div [ _id "mobileMenu"; _class "jjj-mobile-menu offcanvas offcanvas-end"; _tabindex "-1"
_ariaLabelledBy "mobileMenuLabel" ] [
div [ _class "offcanvas-header" ] [
h5 [ _id "mobileMenuLabel" ] [ txt "Menu" ]
button [
_class "btn-close text-reset"; _type "button"; _data "bs-dismiss" "offcanvas"; _ariaLabel "Close"
] []
]
div [ _class "offcanvas-body" ] [ links ctx ]
]
aside [ _class "jjj-full-menu d-none d-md-block p-3" ] [
p [ _class "home-link pb-3" ] [ a [ _href "/" ] [ txt "Jobs, Jobs, Jobs" ] ]
emptyP
links ctx
]
]
/// Title bars for mobile and desktop
let private titleBars = [
nav [ _class "d-flex d-md-none navbar navbar-dark" ] [
span [ _class "navbar-text" ] [ a [ _href "/" ] [ txt "Jobs, Jobs, Jobs" ] ]
button [ _class "btn"; _data "bs-toggle" "offcanvas"; _data "bs-target" "#mobileMenu"
_ariaControls "mobileMenu" ] [ i [ _class "mdi mdi-menu" ] [] ]
]
nav [ _class "d-none d-md-flex navbar navbar-light bg-light"] [
span [] [ txt "&nbsp;" ]
span [ _class "navbar-text" ] [
txt "(&hellip;and Jobs &ndash; "; audioClip "pelosi-jobs" (txt "Let&rsquo;s Vote for Jobs!"); txt ")"
]
]
]
/// The HTML footer for the page
let private htmlFoot =
let v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version
let version =
seq {
string v.Major
if v.Minor > 0 || v.Build > 0 then
"."; string v.Minor
if v.Build > 0 then
"."; string v.Build
} |> Seq.reduce (+)
footer [] [
p [ _class "text-muted" ] [
txt $"Jobs, Jobs, Jobs v{version} &bull; "
a [ _href "/privacy-policy" ] [ txt "Privacy Policy" ]; txt " &bull; "
a [ _href "/terms-of-service" ] [ txt "Terms of Service" ]
]
]
/// Render any messages
let private messages ctx =
ctx.Messages
|> List.map (fun msg ->
let parts = msg.Split "|||"
let level = if parts[0] = "error" then "danger" else parts[0]
let message = parts[1]
div [ _class $"alert alert-{level} alert-dismissable fade show d-flex justify-content-between p-2 mb-1 mt-1"
_roleAlert ] [
p [ _class "mb-0" ] [
if level <> "success" then strong [] [ txt $"{parts[0].ToUpperInvariant ()}: " ]
txt message
]
button [ _type "button"; _class "btn-close"; _data "bs-dismiss" "alert"; _ariaLabel "Close" ] []
])
|> div [ _id "alerts" ]
/// Create a full view
let full ctx =
html [ _lang "en" ] [
htmlHead ctx
body [] [
div [ _class "jjj-app"; _hxBoost; _hxTarget "this" ] [
yield! sideNavs ctx
div [ _class "jjj-main" ] [
yield! titleBars
main [ _class "jjj-content container-fluid" ] [
messages ctx
ctx.Content
]
htmlFoot
]
]
Script.minified
script [ _async
_src "https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
_integrity "sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
_crossorigin "anonymous" ] []
script [ _src "/script.js" ] []
template [ _id "alertTemplate" ] [
div [ _class $"alert alert-dismissable fade show d-flex justify-content-between p-2 mb-1 mt-1"
_roleAlert ] [
p [ _class "mb-0" ] []
button [ _type "button"; _class "btn-close"; _data "bs-dismiss" "alert"; _ariaLabel "Close" ] []
]
]
]
]
/// Create a partial (boosted response) view
let partial ctx =
html [ _lang "en" ] [
head [] [
constructTitle ctx
]
body [] [
yield! sideNavs ctx
div [ _class "jjj-main" ] [
yield! titleBars
main [ _class "jjj-content container-fluid" ] [
messages ctx
ctx.Content
]
htmlFoot
]
]
]
/// Render a print view (styles, but no other layout)
let print ctx =
html [ _lang "en" ] [
htmlHead ctx
body [ _class "m-1" ] [ ctx.Content ]
]
/// Render a bare view (used for components)
let bare ctx =
html [ _lang "en" ] [
head [] [ title [] [] ]
body [] [ ctx.Content ]
]

View File

@ -1,10 +1,8 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<DebugType>embedded</DebugType> <AssemblyVersion>1.0.1.0</AssemblyVersion>
<GenerateDocumentationFile>false</GenerateDocumentationFile> <FileVersion>1.0.1.0</FileVersion>
<AssemblyVersion>3.2.0.0</AssemblyVersion>
<FileVersion>3.2.0.0</FileVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -1,53 +0,0 @@
/// Handlers for the home page, legal stuff, and help
module JobsJobsJobs.Home.Handlers
open Giraffe
open JobsJobsJobs.Common.Handlers
// GET: /
let home : HttpHandler =
renderHandler "Welcome" Views.home
// GET: /privacy-policy
let privacyPolicy : HttpHandler =
renderHandler "Privacy Policy" Views.privacyPolicy
// GET: /terms-of-service
let termsOfService : HttpHandler =
renderHandler "Terms of Service" Views.termsOfService
// GET: /how-it-works
let howItWorks : HttpHandler =
renderHandler "How It Works" Views.Help.index
// GET: /how-it-works/accounts
let accountHelp : HttpHandler =
renderHandler "Accounts | How It Works" Views.Help.accounts
// GET: /how-it-works/listings
let listingHelp : HttpHandler =
renderHandler "Job Listings | How It Works" Views.Help.listings
// GET: /how-it-works/profiles
let profileHelp : HttpHandler =
renderHandler "Employment Profiles | How It Works" Views.Help.profiles
open Giraffe.EndpointRouting
/// All endpoints for this feature
let endpoints =
[ GET_HEAD [
route "/" home
route "/privacy-policy" privacyPolicy
route "/terms-of-service" termsOfService
]
subRoute "/how-it-works" [
GET_HEAD [
route "" howItWorks
route "/accounts" accountHelp
route "/listings" listingHelp
route "/profiles" profileHelp
]
]
]

View File

@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Views.fs" />
<Compile Include="Handlers.fs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\JobsJobsJobs.Common.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="8.0.300" />
</ItemGroup>
</Project>

View File

@ -1,992 +0,0 @@
module JobsJobsJobs.Home.Views
open Giraffe.ViewEngine
open JobsJobsJobs.Common.Views
/// The home page
let home =
article [] [
emptyP
p [] [
txt "Welcome to Jobs, Jobs, Jobs (AKA No Agenda Careers), where citizens of Gitmo Nation can assist one "
txt "another in finding employment. This will enable them to continue providing value-for-value to Adam "
txt "and John, as they continue their work deconstructing the misinformation that passes for news on a "
txt "day-to-day basis."
]
p [] [
txt "Do you not understand the terms in the paragraph above? No worries; just head over to "
a [ _href "https://noagendashow.net"; _target "_blank"; _rel "noopener" ] [
txt "The Best Podcast in the Universe"
]
txt " "; em [] [ audioClip "thats-true" (txt "(that&rsquo;s true!)") ]
txt " and find out what you&rsquo;re missing."
]
]
/// The privacy policy
let privacyPolicy =
let appName = txt "Jobs, Jobs, Jobs"
article [] [
h3 [] [ txt "Privacy Policy" ]
p [ _class "fst-italic" ] [ txt "(as of February 2<sup>nd</sup>, 2023)" ]
p [] [
appName; txt " (&ldquo;we,&rdquo; &ldquo;our,&rdquo; or &ldquo;us&rdquo;) is committed to protecting your "
txt "privacy. This Privacy Policy explains how your personal information is collected, used, and disclosed "
txt "disclosed by "; appName; txt "."
]
p [] [
txt "This Privacy Policy applies to our website, and its associated subdomains (collectively, our "
txt "&ldquo;Service&rdquo;) alongside our application, "; appName; rawText ". By accessing or using our "
txt "Service, you signify that you have read, understood, and agree to our collection, storage, use, and "
txt "disclosure of your personal information as described in this Privacy Policy and our Terms of Service."
]
h4 [] [ txt "Definitions and key terms" ]
p [] [
txt "To help explain things as clearly as possible in this Privacy Policy, every time any of these terms "
txt "are referenced, are strictly defined as:"
]
ul [] [
li [] [
txt "Cookie: small amount of data generated by a website and saved by your web browser. It is used to "
txt "identify your browser, provide analytics, remember information about you such as your language "
txt "preference or login information."
]
li [] [
txt "Company: when this policy mentions &ldquo;Company,&rdquo; &ldquo;we,&rdquo; &ldquo;us,&rdquo; or "
txt "&ldquo;our,&rdquo; it refers to "; appName; txt ", that is responsible for your information under "
txt "this Privacy Policy."
]
li [] [
txt "Country: where "; appName; txt " or the owners/founders of "; appName
txt " are based, in this case is US."
]
li [] [
txt "Customer: refers to the company, organization or person that signs up to use the "; appName
txt " Service to manage the relationships with your consumers or service users."
]
li [] [
txt "Device: any internet connected device such as a phone, tablet, computer or any other device that "
txt "can be used to visit "; appName; txt " and use the services."
]
li [] [
txt "IP address: Every device connected to the Internet is assigned a number known as an Internet "
txt "protocol (IP) address. These numbers are usually assigned in geographic blocks. An IP address can "
txt "often be used to identify the location from which a device is connecting to the Internet."
]
li [] [
txt "Personnel: refers to those individuals who are employed by "; appName; txt " or are under "
txt "contract to perform a service on behalf of one of the parties."
]
li [] [
txt "Personal Data: any information that directly, indirectly, or in connection with other information "
txt "— including a personal identification number allows for the identification or identifiability "
txt "of a natural person."
]
li [] [
txt "Service: refers to the service provided by "; appName; txt " as described in the relative terms "
txt "(if available) and on this platform."
]
li [] [
txt "Third-party service: refers to advertisers, contest sponsors, promotional and marketing partners, "
txt "and others who provide our content or whose products or services we think may interest you."
]
li [] [
txt "Website: "; appName; txt "&rsquo;s site, which can be accessed via this URL: "
a [ _href "/" ] [ txt "https://noagendacareers.com/" ]
]
li [] [
txt "You: a person or entity that is registered with "; appName; txt " to use the Services."
]
]
h4 [] [ txt "What Information Do We Collect?" ]
p [] [
txt "We collect information from you when you visit our website, register on our site, or fill out a form."
]
ul [] [
li [] [ txt "Name / Username" ]
li [] [ txt "Coarse Geographic Location" ]
li [] [ txt "Employment History" ]
li [] [ txt "Job Listing Information" ]
]
h4 [] [ txt "How Do We Use The Information We Collect?" ]
p [] [ txt "Any of the information we collect from you may be used in one of the following ways:" ]
ul [] [
li [] [
txt "To personalize your experience (your information helps us to better respond to your individual "
txt "needs)"
]
li [] [
txt "To improve our website (we continually strive to improve our website offerings based on the "
txt "information and feedback we receive from you)"
]
li [] [
txt "To improve customer service (your information helps us to more effectively respond to your "
txt "customer service requests and support needs)"
]
]
h4 [] [ txt "When does "; appName; txt " use end user information from third parties?" ]
p [] [
appName; txt " will collect End User Data necessary to provide the "; appName
txt " services to our customers."
]
p [] [
txt "End users may voluntarily provide us with information they have made available on social media "
txt "websites. If you provide us with any such information, we may collect publicly available information "
txt "from the social media websites you have indicated. You can control how much of your information "
txt "social media websites make public by visiting these websites and changing your privacy settings."
]
h4 [] [ txt "When does "; appName; txt " use customer information from third parties?" ]
p [] [ txt "We do not utilize third party information apart from the end-user data described above." ]
h4 [] [ txt "Do we share the information we collect with third parties?" ]
p [] [
txt "We may disclose personal and non-personal information about you to government or law enforcement "
txt "officials or private parties as we, in our sole discretion, believe necessary or appropriate in order "
txt "to respond to claims, legal process (including subpoenas), to protect our rights and interests or "
txt "those of a third party, the safety of the public or any person, to prevent or stop any illegal, "
txt "unethical, or legally actionable activity, or to otherwise comply with applicable court orders, laws, "
txt "rules and regulations."
]
h4 [] [ txt "Where and when is information collected from customers and end users?" ]
p [] [
appName; txt " will collect personal information that you submit to us. We may also receive personal "
txt "information about you from third parties as described above."
]
h4 [] [ txt "How Do We Use Your E-mail Address?" ]
p [] [
appName; txt " uses your e-mail address to identify you, along with your password, as an authorized user "
txt "of this site. E-mail addresses are verified via a time-sensitive link, and may also be used to send "
txt "password reset authorization codes. We do not display this e-mail address to users. If you choose to "
txt "add an e-mail address as a contact type, that e-mail address will be visible to other authorized "
txt "users."
]
h4 [] [ txt "How Long Do We Keep Your Information?" ]
p [] [
txt "We keep your information only so long as we need it to provide "; appName; txt " to you and fulfill "
txt "the purposes described in this policy. When we no longer need to use your information and there is no "
txt "need for us to keep it to comply with our legal or regulatory obligations, well either remove it "
txt "from our systems or depersonalize it so that we can&rsquo;t identify you."
]
h4 [] [ txt "How Do We Protect Your Information?" ]
p [] [
txt "We implement a variety of security measures to maintain the safety of your personal information when "
txt "you enter, submit, or access your personal information. We mandate the use of a secure server. We "
txt "cannot, however, ensure or warrant the absolute security of any information you transmit to "; appName
txt " or guarantee that your information on the Service may not be accessed, disclosed, altered, or "
txt "destroyed by a breach of any of our physical, technical, or managerial safeguards."
]
h4 [] [ txt "Could my information be transferred to other countries?" ]
p [] [
appName; txt " is hosted in the US. Information collected via our website may be viewed and hosted "
txt "anywhere in the world, including countries that may not have laws of general applicability regulating "
txt "the use and transfer of such data. To the fullest extent allowed by applicable law, by using any of "
txt "the above, you voluntarily consent to the trans-border transfer and hosting of such information."
]
h4 [] [ txt "Is the information collected through the "; appName; txt " Service secure?" ]
p [] [
txt "We take precautions to protect the security of your information. We have physical, electronic, and "
txt "managerial procedures to help safeguard, prevent unauthorized access, maintain data security, and "
txt "correctly use your information. However, neither people nor security systems are foolproof, including "
txt "encryption systems. In addition, people can commit intentional crimes, make mistakes, or fail to "
txt "follow policies. Therefore, while we use reasonable efforts to protect your personal information, we "
txt "cannot guarantee its absolute security. If applicable law imposes any non-disclaimable duty to "
txt "protect your personal information, you agree that intentional misconduct will be the standards used "
txt "to measure our compliance with that duty."
]
h4 [] [ txt "Can I update or correct my information?" ]
p [] [
txt "The rights you have to request updates or corrections to the information "; appName
txt " collects depend on your relationship with "; appName; txt "."
]
p [] [
txt "Customers have the right to request the restriction of certain uses and disclosures of personally "
txt "identifiable information as follows. You can contact us in order to (1) update or correct your "
txt "personally identifiable information, or (3) delete the personally identifiable information maintained "
txt "about you on our systems (subject to the following paragraph), by cancelling your account. Such "
txt "updates, corrections, changes and deletions will have no effect on other information that we maintain "
txt "in accordance with this Privacy Policy prior to such update, correction, change, or deletion. You are "
txt "responsible for maintaining the secrecy of your unique password and account information at all times."
]
p [] [
appName; txt " also provides ways for users to modify or remove the information we have collected from "
txt "them from the application; these actions will have the same effect as contacting us to modify or "
txt "remove data."
]
p [] [
txt "You should be aware that it is not technologically possible to remove each and every record of the "
txt "information you have provided to us from our system. The need to back up our systems to protect "
txt "information from inadvertent loss means that a copy of your information may exist in a non-erasable "
txt "form that will be difficult or impossible for us to locate. Promptly after receiving your request, "
txt "all personal information stored in databases we actively use, and other readily searchable media will "
txt "be updated, corrected, changed, or deleted, as appropriate, as soon as and to the extent reasonably "
txt "and technically practicable."
]
p [] [
txt "If you are an end user and wish to update, delete, or receive any information we have about you, you "
txt "may do so by contacting the organization of which you are a customer."
]
h4 [] [ txt "Governing Law" ]
p [] [
txt "This Privacy Policy is governed by the laws of US without regard to its conflict of laws provision. "
txt "You consent to the exclusive jurisdiction of the courts in connection with any action or dispute "
txt "arising between the parties under or in connection with this Privacy Policy except for those "
txt "individuals who may have rights to make claims under Privacy Shield, or the Swiss-US framework."
]
p [] [
txt "The laws of US, excluding its conflicts of law rules, shall govern this Agreement and your use of the "
txt "website. Your use of the website may also be subject to other local, state, national, or "
txt "international laws."
]
p [] [
txt "By using "; appName; txt " or contacting us directly, you signify your acceptance of this Privacy "
txt "Policy. If you do not agree to this Privacy Policy, you should not engage with our website, or use "
txt "our services. Continued use of the website, direct engagement with us, or following the posting of "
txt "changes to this Privacy Policy that do not significantly affect the use or disclosure of your "
txt "personal information will mean that you accept those changes."
]
h4 [] [ txt "Your Consent" ]
p [] [
txt "We&rsquo;ve updated our Privacy Policy to provide you with complete transparency into what is being "
txt "set when you visit our site and how it&rsquo;s being used. By using our website, registering an "
txt "account, or making a purchase, you hereby consent to our Privacy Policy and agree to its terms."
]
h4 [] [ txt "Links to Other Websites" ]
p [] [
txt "This Privacy Policy applies only to the Services. The Services may contain links to other websites "
txt "not operated or controlled by "; appName; txt ". We are not responsible for the content, accuracy, or "
txt "opinions expressed in such websites, and such websites are not investigated, monitored, or checked "
txt "for accuracy or completeness by us. Please remember that when you use a link to from the Services to "
txt "another website, our Privacy Policy is no longer in effect. Your browsing and interaction on any "
txt "other website, including those that have a link on our platform, is subject to that websites own "
txt "rules and policies. Such third parties may use their own cookies or other methods to collect "
txt "information about you."
]
h4 [] [ txt "Cookies" ]
p [] [
appName; txt " uses a session Cookie to identify an active, logged-on session. This Cookie is removed when "
txt "when You explicitly log off; is not accessible via script; and must be transferred over a secured, "
txt "encrypted connection."
]
p [] [ appName; txt " uses no persistent or Third-Party Cookies." ]
h4 [] [ txt "Kids&rsquo; Privacy" ]
p [] [
txt "We do not address anyone under the age of 13. We do not knowingly collect personally identifiable "
txt "information from anyone under the age of 13. If You are a parent or guardian and You are aware that "
txt "Your child has provided Us with Personal Data, please contact Us. If We become aware that We have "
txt "collected Personal Data from anyone under the age of 13 without verification of parental consent, We "
txt "take steps to remove that information from Our servers."
]
h4 [] [ txt "Changes To Our Privacy Policy" ]
p [] [
txt "We may change our Service and policies, and we may need to make changes to this Privacy Policy so "
txt "that they accurately reflect our Service and policies. Unless otherwise required by law, we will "
txt "notify you (for example, through our Service) before we make changes to this Privacy Policy and give "
txt "you an opportunity to review them before they go into effect. Then, if you continue to use the "
txt "Service, you will be bound by the updated Privacy Policy. If you do not want to agree to this or any "
txt "updated Privacy Policy, you can delete your account."
]
h4 [] [ txt "Third-Party Services" ]
p [] [
txt "We may display, include or make available third-party content (including data, information, "
txt "applications and other products services) or provide links to third-party websites or services "
txt "(&ldquo;Third-Party Services&rdquo;)."
]
p [] [
txt "You acknowledge and agree that "; appName; txt " shall not be responsible for any Third-Party "
txt "Services, including their accuracy, completeness, timeliness, validity, copyright compliance, "
txt "legality, decency, quality or any other aspect thereof. "; appName; txt " does not assume and shall "
txt "not have any liability or responsibility to you or any other person or entity for any Third-Party "
txt "Services."
]
p [] [
txt "Third-Party Services and links thereto are provided solely as a convenience to you and you access and "
txt "use them entirely at your own risk and subject to such third parties&rsquo; terms and conditions."
]
h4 [] [ txt "Tracking Technologies" ]
p [] [ appName; txt " does not use any tracking technologies." ]
h4 [] [ txt "Information about General Data Protection Regulation (GDPR)" ]
p [] [
txt "We may be collecting and using information from you if you are from the European Economic Area (EEA), "
txt "and in this section of our Privacy Policy we are going to explain exactly how and why is this data "
txt "collected, and how we maintain this data under protection from being replicated or used in the wrong "
txt "way."
]
h5 [] [ txt "What is GDPR?" ]
p [] [
txt "GDPR is an EU-wide privacy and data protection law that regulates how EU residents&rsquo; data is "
txt "protected by companies and enhances the control the EU residents have, over their personal data."
]
p [] [
txt "The GDPR is relevant to any globally operating company and not just the EU-based businesses and EU "
txt "residents. Our customers data is important irrespective of where they are located, which is why we "
txt "have implemented GDPR controls as our baseline standard for all our operations worldwide."
]
h5 [] [ txt "What is personal data?" ]
p [] [
txt "Any data that relates to an identifiable or identified individual. GDPR covers a broad spectrum of "
txt "information that could be used on its own, or in combination with other pieces of information, to "
txt "identify a person. Personal data extends beyond a persons name or email address. Some examples "
txt "include financial information, political opinions, genetic data, biometric data, IP addresses, "
txt "physical address, sexual orientation, and ethnicity."
]
p [] [ txt "The Data Protection Principles include requirements such as:" ]
ul [] [
li [] [
txt "Personal data collected must be processed in a fair, legal, and transparent way and should only "
txt "be used in a way that a person would reasonably expect."
]
li [] [
txt "Personal data should only be collected to fulfil a specific purpose and it should only be used "
txt "for that purpose. Organizations must specify why they need the personal data when they collect it."
]
li [] [ txt "Personal data should be held no longer than necessary to fulfil its purpose." ]
li [] [
txt "People covered by the GDPR have the right to access their own personal data. They can also "
txt "request a copy of their data, and that their data be updated, deleted, restricted, or moved to "
txt "another organization."
]
]
h5 [] [ txt "Why is GDPR important?" ]
p [] [
txt "GDPR adds some new requirements regarding how companies should protect individuals&rsquo; personal "
txt "data that they collect and process. It also raises the stakes for compliance by increasing "
txt "enforcement and imposing greater fines for breach. Beyond these facts, it&rsquo;s simply the right "
txt "thing to do. At "; appName; txt " we strongly believe that your data privacy is very important and we "
txt "already have solid security and privacy practices in place that go beyond the requirements of this "
txt "regulation."
]
h5 [] [ txt "Individual Data Subject&rsquo;s Rights - Data Access, Portability, and Deletion" ]
p [] [
txt "We are committed to helping our customers meet the data subject rights requirements of GDPR. "
appName; txt " processes or stores all personal data in fully vetted, DPA compliant vendors. We do store "
txt "all conversation and personal data for up to 6 years unless your account is deleted. In which case, "
txt "we dispose of all data in accordance with our Terms of Service and Privacy Policy, but we will not "
txt "hold it longer than 60 days."
]
p [] [
txt "We are aware that if you are working with EU customers, you need to be able to provide them with the "
txt "ability to access, update, retrieve and remove personal data. We got you! We&rsquo;ve been set up as "
txt "self service from the start and have always given you access to your data. Our customer support team "
txt "is here for you to answer any questions you might have about working with the API."
]
h4 [] [ txt "California Residents" ]
p [] [
txt "The California Consumer Privacy Act (CCPA) requires us to disclose categories of Personal Information "
txt "we collect and how we use it, the categories of sources from whom we collect Personal Information, "
txt "and the third parties with whom we share it, which we have explained above."
]
p [] [
txt "We are also required to communicate information about rights California residents have under "
txt "California law. You may exercise the following rights:"
]
ul [] [
li [] [
txt "Right to Know and Access. You may submit a verifiable request for information regarding the: (1) "
txt "categories of Personal Information we collect, use, or share; (2) purposes for which categories "
txt "of Personal Information are collected or used by us; (3) categories of sources from which we "
txt "collect Personal Information; and (4) specific pieces of Personal Information we have collected "
txt "about you."
]
li [] [
txt "Right to Equal Service. We will not discriminate against you if you exercise your privacy rights."
]
li [] [
txt "Right to Delete. You may submit a verifiable request to close your account and we will delete "
txt "Personal Information about you that we have collected."
]
li [] [
txt "Request that a business that sells a consumer&rsquo;s personal data, not sell the "
txt "consumer&rsquo;s personal data."
]
]
p [] [
txt "If you make a request, we have one month to respond to you. If you would like to exercise any of "
txt "these rights, please contact us."
]
p [] [ txt "We do not sell the Personal Information of our users." ]
p [] [ txt "For more information about these rights, please contact us." ]
h5 [] [ txt "California Online Privacy Protection Act (CalOPPA)" ]
p [] [
txt "CalOPPA requires us to disclose categories of Personal Information we collect and how we use it, the "
txt "categories of sources from whom we collect Personal Information, and the third parties with whom we "
txt "share it, which we have explained above."
]
p [] [ txt "CalOPPA users have the following rights:" ]
ul [] [
li [] [
txt "Right to Know and Access. You may submit a verifiable request for information regarding the: (1) "
txt "categories of Personal Information we collect, use, or share; (2) purposes for which categories "
txt "of Personal Information are collected or used by us; (3) categories of sources from which we "
txt "collect Personal Information; and (4) specific pieces of Personal Information we have collected "
txt "about you."
]
li [] [
txt "Right to Equal Service. We will not discriminate against you if you exercise your privacy rights."
]
li [] [
txt "Right to Delete. You may submit a verifiable request to close your account and we will delete "
txt "Personal Information about you that we have collected."
]
li [] [
txt "Right to request that a business that sells a consumer&rsquo;s personal data, not sell the "
txt "consumer&rsquo;s personal data."
]
]
p [] [
txt "If you make a request, we have one month to respond to you. If you would like to exercise any of "
txt "these rights, please contact us."
]
p [] [ txt "We do not sell the Personal Information of our users." ]
p [] [ txt "For more information about these rights, please contact us." ]
h4 [] [ txt "Contact Us" ]
p [] [ txt "Don&rsquo;t hesitate to contact us if you have any questions." ]
ul [] [
li [] [
txt "Via this Link: "; a [ _href "/how-it-works" ] [ txt "https://noagendacareers.com/how-it-works" ]
]
]
hr []
p [ _class "fst-italic" ] [ txt "Changes for "; appName; txt " v3 (February 2<sup>nd</sup>, 2023)" ]
ul [] [
li [ _class "fst-italic" ] [ txt "Removed references to Mastodon" ]
li [ _class "fst-italic" ] [ txt "Added references to job listings" ]
li [ _class "fst-italic" ] [ txt "Changed information regarding e-mail addresses" ]
li [ _class "fst-italic" ] [ txt "Updated cookie / tracking sections for new architecture" ]
]
p [ _class "fst-italic" ] [
txt "Change on September 6<sup>th</sup>, 2021 &ndash; replaced &ldquo;No Agenda Social&rdquo; with generic "
txt "terms for any authorized Mastodon instance."
]
]
/// The page for terms of service
let termsOfService =
article [] [
h3 [] [ txt "Terms of Service" ]
p [ _class "fst-italic" ] [ txt "(as of February 2<sup>nd</sup>, 2023)" ]
h4 [] [ txt "Acceptance of Terms" ]
p [] [
txt "By accessing this web site, you are agreeing to be bound by these Terms and Conditions, and that you "
txt "are responsible to ensure that your use of this site complies with all applicable laws. Your "
txt "continued use of this site implies your acceptance of these terms."
]
h4 [] [ txt "Description of Service and Registration" ]
p [] [
txt "Jobs, Jobs, Jobs is a service that allows individuals to enter and amend employment profiles and job "
txt "listings, restricting access to the details of these to other users of this site, unless the "
txt "individual specifies that this information should be visible publicly. See our "
a [ _href "/privacy-policy" ] [ txt "privacy policy" ]
txt " for details on the personal (user) information we maintain."
]
h4 [] [ txt "Liability" ]
p [] [
txt "This service is provided &ldquo;as is&rdquo;, and no warranty (express or implied) exists. The "
txt "service and its developers may not be held liable for any damages that may arise through the use of "
txt "this service."
]
h4 [] [ txt "Updates to Terms" ]
p [] [
txt "These terms and conditions may be updated at any time. When these terms are updated, users will be "
txt "notified via a notice on the dashboard page. Additionally, the date at the top of this page will be "
txt "updated, and any substantive updates will also be accompanied by a summary of those changes."
]
hr []
p [] [
txt "You may also wish to review our "; a [ _href "/privacy-policy" ] [ txt "privacy policy" ]
txt " to learn how we handle your data."
]
hr []
p [ _class "fst-italic" ] [
txt "Change on February 2<sup>nd</sup>, 2023 &ndash; added references to job listings, removed references "
txt "to Mastodon instances."
]
p [ _class "fst-italic" ] [
txt "Change on September 6<sup>th</sup>, 2021 &ndash; replaced &ldquo;No Agenda Social&rdquo; with a list "
txt "of all No Agenda-affiliated Mastodon instances."
]
]
/// Help page templates
module Help =
/// CSS classes to indicate a reference to a particular page within Jobs, Jobs, Jobs
let private linkedPage = _class "badge text-light bg-success"
/// CSS classes to indicate a reference to a named button
let private actionButton = _class "badge text-light bg-secondary rounded-pill"
/// CSS classes for main headings within the documentation
let private mainHeading = _class "border-top border-2 mt-4 pt-1"
/// A link to return to the help index
let private backToIndex =
p [] [ a [ _href "/how-it-works" ] [ txt "&laquo; Back to Help Index" ] ]
/// Account help page
let accounts =
[ backToIndex
p [] [
span [ _class "fst-italic" ] [
txt "On this page: "; a [ _href "#registration" ] [ txt "Registration" ]; txt " &bull; "
a [ _href "#log-on" ] [ txt "Logging On" ]; txt " &bull; "
a [ _href "#updating" ] [ txt "Updating Your Account" ]; txt " &bull; "
a [ _href "#deleting" ] [ txt "Deleting Your Account" ]
]
]
h4 [ _id "registration"; mainHeading ] [ txt "Registering for an Account" ]
p [] [
txt "To register for an account, go to the "; span [ linkedPage ] [ txt "Log On" ]; txt " page; just "
txt "below the "; span [ actionButton ] [ txt "Log On" ]; txt " button, there is a link that leads to "
txt "the registration page. The first three fields are name fields, the fourth is an e-mail address, "
txt "and the final two are for your password. Your password must be at least 8 characters long."
]
p [] [
txt "As Jobs, Jobs, Jobs is targeted towards "
a [ _href "https://noagendashow.net"; _target "_blank"; _rel "noopener" ] [ txt "No Agenda" ]
txt " listeners, there are also two questions that test your knowledge of the show. The answers to "
txt "these questions are not case-sensitive, and should pose no significant challenge to those who "
txt "have listened to an episode or two "; em [] [ txt "(including the donation segments!)" ]; txt "."
]
p [] [
txt "Once you click the "; span [ actionButton ] [ txt "Register" ]; txt " button, the system will "
txt "send an e-mail to you with a confirmation link. This link must be visited within 72 hours, or the "
txt "account request will be deleted. Once the account is confirmed, though, you are ready to&hellip;"
]
h4 [ _id "log-on"; mainHeading ] [ txt "Log On" ]
p [] [
txt "Logging on to Jobs, Jobs, Jobs is a straightforward process; enter your e-mail address and "
txt "password. Beside visiting the page directly, you may also be directed to it if you click a link "
txt "that requires you to be logged on to view. In these cases, instead of being directed to the "
txt "dashboard page, you would instead be directed back to the page you were trying to view."
]
h4 [ _id "updating"; mainHeading ] [ txt "Updating Your Account and Contact Information" ]
p [] [
txt "When you are logged on, clicking "; span [ linkedPage ] [ txt "My Account" ]; txt " in the menu "
txt "will take you to the Account Profile page. This page allows you to change any of the three name "
txt "fields. You can also change your password from this page; if you do not want to change it, "
txt "though, leave both of those fields blank."
]
p [] [
txt "This page is also where you can enter contact information. Clicking the "
span [ actionButton ] [ txt "Add a Contact Method" ]; txt " button will add a row to the table, and in "
txt "each row, clicking the "; span [ actionButton ] [ txt "&minus;" ]; txt " button will remove that "
txt "row. When others view your employment profile, or any job listings you may create, this contact "
txt "information is displayed along with it. Each contact can be marked as &ldquo;Public&rdquo;; if "
txt "you opt to allow public access to your employment profile, the contacts marked as public will be "
txt "displayed, but the others will be excluded."
]
p [] [
txt "For each contact, you may specify a name. For websites and e-mail addresses, this name will be "
txt "the text of the link generated for that item; otherwise, the links will be &ldquo;Website&rdquo; "
txt "and &ldquo;E-mail&rdquo;, respectively. For phone numbers, the name will appear in parentheses "
txt "after the number."
]
h4 [ _id "deleting"; mainHeading ] [ txt "Deleting Your Account" ]
p [] [
txt "Though we hate to see it, we realize that there may come a time when you want to delete either "
txt "your employment profile or your complete account. On both the "
span [ linkedPage ] [ txt "Account Update" ]; txt " and "; span [ linkedPage ] [ txt "Profile Edit" ]
txt " pages, there is a link to a page with deletion options."
]
p [] [
txt "The first red button will delete your employment profile. This means that no searches for "
txt "employment profiles will return your information. If you had shared a direct link to your "
txt "profile, it will return a &ldquo;Not Found&rdquo; page &ndash; unless you take steps to create "
txt "your employment profile again, in which case the same link will work again. If you want to "
txt "obtain the same effect without deleting your profile, update it and select the "
txt "&ldquo;Invisible&rdquo; visibility option."
]
p [] [
txt "The second red button will delete your entire account. In addition to your employment profile "
txt "being deleted, it will delete any job listings you may have posted, any success stories you may "
txt "have recorded, and your account information. It will make it like you were never a user of this "
txt "system. If you re-register, you will be given a different ID, so direct links to your previous "
txt "employment profile will not work, even if you create an employment profile for your new account."
]
p [] [
strong [] [ txt "Use both these options with extreme care!" ]; txt " There is no &ldquo;undo&rdquo; "
txt "for these actions; if you change your mind, you will have to recreate what you have deleted."
]
]
|> pageWithTitle "How It Works: Accounts"
/// Job listings help page
let listings =
[ backToIndex
p [] [
span [ _class "fst-italic" ] [
txt "On this page: "
a [ _href "#creating" ] [ txt "Creating a Job Listing" ]; txt " &bull; "
a [ _href "#maintaining" ] [ txt "Maintaining" ]; txt " &bull; "
a [ _href "#searching" ] [ txt "Searching" ]
]
]
h4 [ _id "creating"; mainHeading ] [ txt "Creating a Job Listing" ]
p [] [
txt "The "; span [ linkedPage] [ txt "My Job Listings" ]; txt " page shows all of the job listings you "
txt "have created. To add a new one, click the "; span [ actionButton] [ txt "Add a New Listing" ]
txt " button. This page allows you to specify a title for the listing; the continent and region; "
txt "whether it is a remote opportunity; the date by which a job needs to be filled; and a full "
txt "description of the position, using "; a [ _href "/how-it-works#markdown" ] [ txt "Markdown" ]
txt ". Once you save the listing, it will be visible to the other citizens here."
]
h4 [ _id "maintaining"; mainHeading ] [ txt "Maintaining and Sharing Your Job Listings" ]
p [] [
txt "The "; span [ linkedPage] [ txt "My Job Listings" ]; txt " page will show you all of your active "
txt "job listings just below the "; span [ actionButton] [ txt "Add a Job Listing" ]; txt " button. "
txt "Within this table, you can edit the listing, view it, or expire it (more on that below). The "
span [ linkedPage] [ txt "View" ]; txt " link will show you the job listing just as other users will "
txt "see it. You can share the link from your browser, and other Jobs, Jobs, Jobs users will be able "
txt "to log on and view it."
]
h5 [] [ txt "Expire a Job Listing" ]
p [] [
txt "Once the job is filled, or the opportunity has passed, you will want to expire the listing; this "
txt "is what the "; span [ linkedPage] [ txt "Expire" ]; txt " link allows you to do. When you click "
txt "it, you will be presented with a single question &ndash; was the job filled due to its listing "
txt "here? If not, leave that blank, click the "; span [ actionButton] [ txt "Expire" ]; txt " button, "
txt "and the listing will be expired. If you click that box, though, another Markdown editor will "
txt "appear, where you can share a story of the experience. This is not required, but if you put text "
txt "there, it will be recorded as a Success Story, and other users will be able to read about your "
txt "success."
]
p [] [
txt "Once you have at least one expired job listing, the "; span [ linkedPage] [ txt "My Job Listing" ]
txt " page will have a new section below your active listings, where you can see your expired ones. "
txt "You can still view the expired listing, and links that you may have shared will still pull up the "
txt "listing; there will be an &ldquo;expired&rdquo; label beside the title, so that whoever is "
txt "viewing it knows that they are reading about a job that is no longer available."
]
h4 [ _id "searching"; mainHeading] [ txt "Searching Job Listings" ]
p [] [
txt "Active job listings are found on the "; span [ linkedPage ] [ txt "Help Wanted!" ]; txt " page. "
txt "When you first bring up this page, you will see several criteria by which you can narrow your "
txt "results, though none are required. When you click the "; span [ actionButton ] [ txt "Search" ]
txt " button, you will see open job listings filtered by whatever criteria you specified. Each job "
txt "displays its title, its location, whether it is a remote opportunity, and (if specified) the date "
txt "by which the job needs to be filled."
]
p [] [
txt "Clicking the "; span [ linkedPage] [ txt "View" ]; txt " link on a listing brings up the full "
txt "view page for a listing. This page displays all of the information from the search results, along "
txt "with the citizen who posted it, and the full details of the job. All the citizen&rsquo;s contact "
txt "information is displayed, and you can use any of these means to get in touch with them to inquire "
txt "about the position."
]
]
|> pageWithTitle "How It Works: Job Listings"
/// Profile help page
let profiles =
[ backToIndex
p [] [
span [ _class "fst-italic" ] [
txt "On this page: "
a [ _href "#creating" ] [ txt "Creating and Editing Your Employment Profile" ]
txt " &bull; "; a [ _href "#searching" ] [ txt "Searching" ]; txt " &bull; "
a [ _href "#viewing" ] [ txt "Viewing, Printing, and Sharing" ]; txt " &bull; "
a [ _href "#finding" ] [ txt "Finding Employment" ]
]
]
h4 [ _id "creating"; mainHeading ] [ txt "Creating and Editing Your Employment Profile" ]
p [] [
txt "The employment profile is your r&eacute;sum&eacute;, visible to other citizens here. On your "
txt "dashboard, there we be either a "; span [ actionButton ] [ txt "Create Profile" ]; txt " or an "
span [ actionButton ] [ txt "Edit Profile" ]; txt " button, depending on whether you have a profile "
txt "established yet. There is also a "; span [ linkedPage ] [ txt "My Employment Profile" ]
txt " entry in the menu when you are logged on."
]
p [] [
txt "The employment profile itself is divided into three sections, and the main edit page serves as a "
txt "menu for them. If you have a profile established, there is a button labeled "
span [ actionButton ] [ txt "View Your Employment Profile" ]; txt " which will show you your profile "
txt "the way other users will see it."
]
h5 [] [ txt "General Information" ]
p [] [
txt "The "; span [ linkedPage ] [ txt "General Information" ]; txt " section of the Employment Profile "
txt "contains the following fields:"
]
ul [] [
li [] [
strong [] [ txt "Continent" ]; txt " (required): The continent on which you most frequently reside"
]
li [] [
strong [] [ txt "Region" ]; txt " (required): A smaller geographic area within the continent you "
txt "selected. This is free-form text; describe it as narrowly or broadly as you like."
]
li [] [
strong [] [ txt "Three Yes/No Questions" ]; txt ": If you are actively seeking work, check the "
txt "&ldquo;I am currently seeking employment&rdquo; box; if you are interested in full-time or "
txt "remote work, check those boxes. Leaving them unchecked implies &ldquo;No&rdquo;."
]
li [] [
strong [] [ txt "Professional Biography" ]; txt " (required): Your description of what type of job "
txt "you are seeking, an overview of your professional history, etc. This is the main "
txt "r&eacute;sum&eacute; portion of the profile. It supports "
a [ _href "/how-it-works#markdown" ] [ txt "Markdown" ]; txt " formatting, which allows you to add "
txt "headings, bold/emphasized text, links, etc."
]
li [] [
strong [] [ txt "Experience" ]; txt ": This Markdown block will be placed at the bottom of the "
txt "employment profile, below your skills and employment history. It is optional (as are skills "
txt "and employment history). This area can be omitted; used to display skills or employment "
txt "history in a different way than this application provides; or used to provide a closing "
txt "appeal, the text &ldquo;References available upon request&rdquo;, or any other information "
txt "you want displayed at the bottom of your profile."
]
li [] [
strong [] [ txt "Visibility" ]; txt " (required):"
ul [] [
li [] [
em [] [ txt "Hidden" ]; txt " will restrict your profile to yourself only; this "
txt "can be used while you are initially building your profile, or to remove your profile "
txt "from search results without deleting it."
]
li [] [
em [] [ txt "Private" ]; txt " (the default) will restrict your profile to logged-on users "
txt "of this community."
]
li [] [
em [] [ txt "Anonymous"]; txt " will allow your continent, region, and skills to be "
txt "displayed in public searches, without linking to your profile or disclosing any "
txt "additional information."
]
li [] [
em [] [ txt "Public" ]; txt " will allow public users to search, view, and print your "
txt "profile, just as you or logged-on users can. It also allows you to share the link to "
txt "your employment profile with the general public."
]
]
]
]
h5 [] [ txt "Skills" ]
p [] [
txt "The "; span [ linkedPage ] [ txt "Skills" ]; txt " section allows you to record skills you have "
txt "obtained. Each skill has an associated &ldquo;Notes&rdquo; field, which can be used to document "
txt "your level of proficiency, years practiced, etc. Skills will be sorted alphabetically, and "
txt "displayed in the profile just below the &ldquo;Professional Biography&rdquo;."
]
p [] [
txt "Note that if you select &ldquo;Anonymous&rdquo; visibility, what you enter in these fields will "
txt "visible in public search results. In this case, be sure to omit any identifying information from "
txt "either field."
]
h5 [] [ txt "Employment History" ]
p [] [
txt "The "; span [ linkedPage ] [ txt "Employment History" ]; txt " section allows you to record a "
txt "chronological listing of your previous or current employment. This section is sorted descendingly "
txt "(most recent first) by end date, with ongoing jobs listed first. If any entries are present, "
txt "they will be displayed below the list of skills (or below the &ldquo;Professional "
txt "Biography&rdquo;, if no skills are present)."
]
p [] [
txt "Each employment history entry consists of the following fields:"
]
ul [] [
li [] [
strong [] [ txt "Employer" ]; txt " (required): The name of the entity by which you were employed"
]
li [] [
strong [] [ txt "Title or Position" ]; txt " (required): The title or job position you held with "
txt "the employer, usually the most recent or senior"
]
li [] [
strong [] [ txt "Start Date" ]; txt " (required): The date you began this period of employment. "
txt "While you will see a full calendar, only the month and year will be displayed on the "
txt "employment profile, so you may select any day within the month."
]
li [] [
strong [] [ txt "End Date" ]; txt ": The date you ended this period of employment. As with the "
txt "&ldquo;Start Date&rdquo; field, it will only display month and year. Also, if you still have "
txt "this job, leave this blank, and &ldquo;to Present&rdquo; will be displayed for the end date."
]
li [] [
strong [] [ txt "Description" ]; txt ": An optional description of your employment. This field "
txt "supports Markdown, and will appear below the employer, position, and dates if present."
]
]
h4 [ _id "searching"; mainHeading ] [ txt "Searching Employment Profiles" ]
h5 [] [ txt "Search Criteria" ]
p [] [
txt "The "; span [ linkedPage ] [ txt "Job Seekers" ]; txt " page and its search form is the same "
txt "whether there is a user logged on or not; however, the results are different. There are three "
txt "sections to the search form. "; strong [] [ txt "Continent" ]; txt " will select profiles from "
txt "the selected continent, while "; strong [] [ txt "Seeking Remote Work?" ]; txt " will select "
txt "profiles based whether the citizen has selected remote work in their profile. "
strong [] [ txt "Text Search" ]; txt " will search several aspects of the employment profile for "
txt "matches; it is case-insensitive and will match using English stemming rules (ex. searching for "
txt "&ldquo;force&rdquo; will match words like &ldquo;force&rdquo;, &ldquo;forced&rdquo;, or "
txt "&ldquo;forcing&rdquo;)."
]
p [] [
txt "If more than one field has a value selected, profiles must match all of those selections to be "
txt "returned. Additionally, &ldquo;Hidden&rdquo; profiles will never be returned in searches, and "
txt "if no user is logged on, only &ldquo;Public&rdquo; and &ldquo;Anonymous&rdquo; profiles will be "
txt "considered as candidates for search results."
]
h5 [] [ txt "Search Results" ]
p [] [
txt "If the visibility of the profile allows you to view it, the first column will contain a "
span [ linkedPage ] [ txt "View" ]; txt " link. The remaining columns will display other attributes "
txt "of the employment profile. In public search results for profiles with &ldquo;Anonymous&rdquo; "
txt "visibility, the last column of the search results will show the citizen&rsquo;s skills."
]
h4 [ _id "viewing"; mainHeading ] [ txt "Viewing, Printing, and Sharing Employment Profiles" ]
p [] [
txt "An employment profile can be viewed via the "; span [ linkedPage ] [ txt "View" ]; txt " link in "
txt "search results, and logged-on users can find this view via the "
span [ actionButton ] [ txt "View Your Employment Profile" ]; txt " button on the "
span [ linkedPage ] [ txt "My Employment Profile" ]; txt " page. The profile view page displays the "
txt "following information in order:"
]
ul [] [
li [] [
txt "Display Name "; em [] [ txt "(with a tag if the citizen is actively seeking employment)" ]
]
li [] [ txt "Continent / Region" ]
li [] [ txt "Contact Information "; em [] [ txt "(only public items if viewing publicly)" ] ]
li [] [ txt "Remote / Full-Time selections" ]
li [] [ txt "Professional Biography" ]
li [] [ txt "Skill list" ]
li [] [ txt "Employment History" ]
li [] [ txt "Experience" ]
]
p [] [
txt "If a user is logged on and is viewing their own profile, there will be an "
span [ actionButton ] [ txt "Edit Your Profile" ]; txt " button at the bottom of the page. Either way, "
txt "there will also be a "; span [ actionButton ] [ txt "View Print Version" ]; txt " button that "
txt "will open a printable version in a new browser tab. This version is constructed the same way as "
txt "the previous page; however, contact information will be fully displayed rather than linked. There "
txt "will be no menu, header, or footer on the page, but there will be a "
span [ actionButton ] [ txt "Print" ]; txt " button at the bottom of the page, which will not show on "
txt "the actual printed version."
]
p [] [
txt "Both the view and print versions may be shared by copying the full URL from the browser&rsquo;s "
txt "address bar. When using this URL, &ldquo;Public&rdquo; visibility profiles will display for "
txt "anyone, while &ldquo;Anonymous&rdquo; and &ldquo;Private&rdquo; visibility profiles will require "
txt "a citizen to log on first. &ldquo;Hidden&rdquo; visibility profiles will return a &ldquo;page not "
txt "found&rdquo; error for anyone other than the citizen to which they belong."
]
h4 [ _id "finding"; mainHeading ] [ txt "Finding Employment" ]
p [] [
txt "If your profile indicates that you are seeking employment, and you secure employment, you will "
txt "want to update that (and &ndash; congratulations!). From both the "
span [ linkedPage ] [ txt "Dashboard" ]; txt " and the "
span [ linkedPage ] [ txt "General Information" ]; txt " Employment Profile pages, you will see a link "
txt "that encourages you to tell us about it. Click either of those links, and you will be brought to "
txt "a page that allows you to indicate whether your employment actually came from hosting your "
txt "employment profile on Jobs, Jobs, Jobs, and gives you a place to write about the experience. "
txt "These stories are only viewable by logged-on citizens, so feel free to use as much (or as little) "
txt "identifying information as you&rsquo;d like. You can also submit this page with all the fields "
txt "blank; in that case, your &ldquo;Seeking Employment&rdquo; flag is cleared, and the blank story "
txt "is recorded."
]
p [] [
txt "As a validated user, you can also view others&rsquo; success stories from both their employment "
txt "profiles or job listings. Clicking "; span [ linkedPage ] [ txt "Success Stories" ]; txt " in the "
txt "sidebar will display a list of all the stories that have been recorded. If there is a story to be "
txt "read, there will be a link to read it; if you submitted the story, there will also be an "
span [ linkedPage ] [ txt "Edit" ]; txt " link."
]
]
|> pageWithTitle "How It Works: Employment Profiles"
/// Online help / documentation index page
let index =
article [] [
h3 [ _class "mb-0" ] [ txt "How It Works" ]
h6 [ _class "mb-3 text-muted fst-italic" ] [ txt "Last Updated February 2<sup>nd</sup>, 2023" ]
p [ _class "fst-italic" ] [
txt "Show me how to "; a [ _href "/how-it-works/listings#searching" ] [ txt "find a job" ]
txt " &bull; "; a [ _href "/how-it-works/listings#creating" ] [ txt "list a job opportunity" ]
txt " &bull; "; a [ _href "/how-it-works/profiles#searching" ] [ txt "find people to hire" ]
txt " &bull; "; a [ _href "/how-it-works/profiles#creating" ] [ txt "create an employment profile" ]
]
p [] [
strong [] [ a [ _href "/how-it-works/accounts" ] [ txt "Accounts" ] ]; br []
txt "How to sign up as a user, get logged on, update your information, or remove your account"
]
p [] [
strong [] [ a [ _href "/how-it-works/listings" ] [ txt "Job Listings" ] ]; br []
txt "Creating, maintaining, and sharing job opportunities with fellow citizens"
]
p [] [
strong [] [ a [ _href "/how-it-works/profiles" ] [ txt "Employment Profiles" ] ]; br []
txt "Creating, updating, and sharing your own employment profile; and searching, viewing, and printing "
txt "profiles for yourself or your fellow citizens"
]
h4 [ _id "markdown"; mainHeading ] [ txt "A Bit about Markdown" ]
p [] [
txt "Markdown is a plain-text way to specify formatting quite similar to that provided by word processors. "
txt "The "
a [ _href "https://daringfireball.net/projects/markdown/"; _target "_blank"; _rel "noopener" ] [
txt "original page"
]; txt " for the project is a good overview of its capabilities, and the pages at "
a [ _href "https://www.markdownguide.org/"; _target "_blank"; _rel "noopener" ] [ txt "Markdown Guide" ]
txt " give in-depth lessons to make the most of this language. The version of Markdown employed here "
txt "supports many popular extensions, include smart quotes (turning &quot;a quote&quot; into &ldquo;a "
txt "quote&rdquo;), tables, super/subscripts, and more."
]
h4 [ mainHeading ] [ txt "Help / Suggestions" ]
p [] [
txt "This is open-source software "
a [ _href "https://git.bitbadger.solutions/bit-badger/jobs-jobs-jobs"; _target "_blank"
_rel "noopener" ] [ txt "developed in Git" ]
txt "; feel free to ping @daniel@fedi.summershome.org if you run into any issues."
]
]

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