aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2023-01-04 14:37:22 -0500
committerXe Iaso <me@christine.website>2023-01-04 14:37:22 -0500
commit351069d9f91edab96425bcd221858529acb7e08a (patch)
tree8d601372b5e67e6f129ff896204cdc97a49d8f3d /src/app
parentb96a44649a5cdf7609ebdc975a118c01cbd74b1a (diff)
downloadxesite-351069d9f91edab96425bcd221858529acb7e08a.tar.xz
xesite-351069d9f91edab96425bcd221858529acb7e08a.zip
implement pronouns support
Signed-off-by: Xe Iaso <me@christine.website>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config.rs60
1 files changed, 57 insertions, 3 deletions
diff --git a/src/app/config.rs b/src/app/config.rs
index 6499e72..d3d93ca 100644
--- a/src/app/config.rs
+++ b/src/app/config.rs
@@ -4,7 +4,6 @@ use serde::{Deserialize, Serialize};
use std::{
collections::HashMap,
fmt::{self, Display},
- path::PathBuf,
};
#[derive(Clone, Deserialize, Default)]
@@ -16,8 +15,6 @@ pub struct Config {
pub port: u16,
#[serde(rename = "clackSet")]
pub clack_set: Vec<String>,
- #[serde(rename = "resumeFname")]
- pub resume_fname: PathBuf,
#[serde(rename = "miToken")]
pub mi_token: String,
#[serde(rename = "jobHistory")]
@@ -30,6 +27,63 @@ pub struct Config {
pub notable_projects: Vec<Link>,
#[serde(rename = "contactLinks")]
pub contact_links: Vec<Link>,
+ pub pronouns: Vec<PronounSet>,
+}
+
+#[derive(Clone, Deserialize, Serialize, Default)]
+pub struct PronounSet {
+ nominative: String,
+ accusative: String,
+ #[serde(rename = "possessiveDeterminer")]
+ possessive_determiner: String,
+ possessive: String,
+ reflexive: String,
+ singular: bool,
+}
+
+impl Render for PronounSet {
+ fn render(&self) -> Markup {
+ html! {
+ big { (self.nominative) "/" (self.accusative) }
+ table {
+ tr {
+ th { "Subject" }
+ td {(self.nominative)}
+ }
+ tr {
+ th { "Object" }
+ td {(self.accusative)}
+ }
+ tr {
+ th { "Dependent Possessive" }
+ td {(self.possessive_determiner)}
+ }
+ tr {
+ th { "Independent Possessive" }
+ td {(self.possessive)}
+ }
+ tr {
+ th { "Reflexive" }
+ td {(self.reflexive)}
+ }
+ }
+ p {"Here are some example sentences with these pronouns:"}
+ ul {
+ li { i{(self.nominative)} " went to the park." }
+ li { "I went with " i{(self.accusative)} "." }
+ li { i{(self.nominative)} " brought " i{(self.possessive_determiner)} " frisbee." }
+ li { "At least I think it was " i{(self.possessive)} "." }
+ li { i{(self.nominative)} " threw the frisbee to " i{(self.reflexive)} "." }
+ }
+ @if !self.singular {
+ p {
+ "Please note that this pronoun is normally a plural pronoun. It is used here to refer to a single person. For more information on this, see "
+ a href="https://www.merriam-webster.com/words-at-play/singular-nonbinary-they" {"this page from Merriam-Webster"}
+ " that will explain in more detail."
+ }
+ }
+ }
+ }
}
#[derive(Clone, Deserialize, Serialize, Default)]