signal boost: make links optional

Closes #326
Closes #209

Signed-off-by: Xe <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-04-02 16:47:54 +00:00
parent e665412345
commit e5ee825c0a
4 changed files with 60 additions and 55 deletions

View File

@ -1,7 +1,16 @@
let Person = let Person =
{ Type = { name : Text, tags : List Text, gitLink : Text, twitter : Text } { Type =
{ name : Text
, tags : List Text
, gitLink : Optional Text
, twitter : Optional Text
}
, default = , default =
{ name = "", tags = [] : List Text, gitLink = "", twitter = "" } { name = ""
, tags = [] : List Text
, gitLink = None Text
, twitter = None Text
}
} }
let Author = let Author =

View File

@ -1,7 +1,16 @@
let Person = let Person =
{ Type = { name : Text, tags : List Text, gitLink : Text, twitter : Text } { Type =
{ name : Text
, tags : List Text
, gitLink : Optional Text
, twitter : Optional Text
}
, default = , default =
{ name = "", tags = [] : List Text, gitLink = "", twitter = "" } { name = ""
, tags = [] : List Text
, gitLink = None Text
, twitter = None Text
}
} }
in [ Person::{ in [ Person::{
@ -20,8 +29,8 @@ in [ Person::{
, "istio" , "istio"
, "typescript" , "typescript"
] ]
, gitLink = "https://github.com/euforic" , gitLink = Some "https://github.com/euforic"
, twitter = "https://twitter.com/euforic" , twitter = Some "https://twitter.com/euforic"
} }
, Person::{ , Person::{
, name = "David Roberts" , name = "David Roberts"
@ -41,8 +50,8 @@ in [ Person::{
, "embedded" , "embedded"
, "sql" , "sql"
] ]
, gitLink = "https://github.com/ddr0" , gitLink = Some "https://github.com/ddr0"
, twitter = "https://twitter.com/DDR_4" , twitter = Some "https://twitter.com/DDR_4"
} }
, Person::{ , Person::{
, name = "Faizan Jamil" , name = "Faizan Jamil"
@ -65,8 +74,7 @@ in [ Person::{
, "full-stack" , "full-stack"
, "linux" , "linux"
] ]
, gitLink = "https://github.com/faizjamil" , gitLink = Some "https://github.com/faizjamil"
, twitter = "N/A"
} }
, Person::{ , Person::{
, name = "Joseph Crawley" , name = "Joseph Crawley"
@ -80,8 +88,8 @@ in [ Person::{
, "bash" , "bash"
, "linux" , "linux"
] ]
, gitLink = "https://github.com/espe-on" , gitLink = Some "https://github.com/espe-on"
, twitter = "https://twitter.com/espe_on_" , twitter = Some "https://twitter.com/espe_on_"
} }
, Person::{ , Person::{
, name = "nicoo" , name = "nicoo"
@ -96,7 +104,7 @@ in [ Person::{
, "security" , "security"
, "SDR" , "SDR"
] ]
, gitLink = "https://github.com/nbraud" , gitLink = Some "https://github.com/nbraud"
} }
, Person::{ , Person::{
, name = "Prajjwal Singh" , name = "Prajjwal Singh"
@ -112,8 +120,8 @@ in [ Person::{
, "google-cloud" , "google-cloud"
, "typescript" , "typescript"
] ]
, gitLink = "https://github.com/Prajjwal" , gitLink = Some "https://github.com/Prajjwal"
, twitter = "https://twitter.com/prajjwalsin" , twitter = Some "https://twitter.com/prajjwalsin"
} }
, Person::{ , Person::{
, name = "Piyushh Bhutoria" , name = "Piyushh Bhutoria"
@ -125,8 +133,8 @@ in [ Person::{
, "php" , "php"
, "google-cloud" , "google-cloud"
] ]
, gitLink = "https://github.com/Piyushhbhutoria" , gitLink = Some "https://github.com/Piyushhbhutoria"
, twitter = "https://twitter.com/PiyushhB" , twitter = Some "https://twitter.com/PiyushhB"
} }
, Person::{ , Person::{
, name = "Ryan Casalino" , name = "Ryan Casalino"
@ -143,8 +151,7 @@ in [ Person::{
, "flask" , "flask"
, "unix" , "unix"
] ]
, gitLink = "https://github.com/rjpcasalino" , gitLink = Some "https://github.com/rjpcasalino"
, twitter = "N/A"
} }
, Person::{ , Person::{
, name = "Jeremy White" , name = "Jeremy White"
@ -163,8 +170,8 @@ in [ Person::{
, "google-cloud" , "google-cloud"
, "azure" , "azure"
] ]
, gitLink = "https://github.com/dudymas" , gitLink = Some "https://github.com/dudymas"
, twitter = "https://twitter.com/dudymas" , twitter = Some "https://twitter.com/dudymas"
} }
, Person::{ , Person::{
, name = "Zachary McKee" , name = "Zachary McKee"
@ -181,14 +188,12 @@ in [ Person::{
, "nginx" , "nginx"
, "gunicorn" , "gunicorn"
] ]
, gitLink = "https://github.com/ZacharyRMcKee" , gitLink = Some "https://github.com/ZacharyRMcKee"
, twitter = "N/A"
} }
, Person::{ , Person::{
, name = "Muazzam Kazmi" , name = "Muazzam Kazmi"
, tags = [ "Rust", "C++", "x86assembly", "WinAPI", "Node.js", "React.js" ] , tags = [ "Rust", "C++", "x86assembly", "WinAPI", "Node.js", "React.js" ]
, gitLink = "https://github.com/muazzamalikazmi" , gitLink = Some "https://github.com/muazzamalikazmi"
, twitter = "N/A"
} }
, Person::{ , Person::{
, name = "Jeffin Mathew" , name = "Jeffin Mathew"
@ -202,8 +207,8 @@ in [ Person::{
, "javascript" , "javascript"
, "iot" , "iot"
] ]
, gitLink = "https://github.com/mjeffin" , gitLink = Some "https://github.com/mjeffin"
, twitter = "https://twitter.com/mpjeffin" , twitter = Some "https://twitter.com/mpjeffin"
} }
, Person::{ , Person::{
, name = "Nasir Hussain" , name = "Nasir Hussain"
@ -218,24 +223,17 @@ in [ Person::{
, "golang" , "golang"
, "rpm packaging" , "rpm packaging"
] ]
, gitLink = "https://github.com/nasirhm" , gitLink = Some "https://github.com/nasirhm"
, twitter = "https://twitter.com/_nasirhm_" , twitter = Some "https://twitter.com/_nasirhm_"
} }
, Person::{ , Person::{
, name = "Avi Parshan" , name = "Avi Parshan"
, tags = , tags =
[ "python" [ "python", "windows", "javascript", "html", "android", "java", "C#" ]
, "windows" , gitLink = Some "https://github.com/avipars"
, "javascript" , twitter = Some "https://twitter.com/aviinfinity"
, "html"
, "android"
, "java"
, "C#"
]
, gitLink = "https://github.com/avipars"
, twitter = "https://twitter.com/aviinfinity"
} }
, Person:: { , Person::{
, name = "Tommy Nguyen" , name = "Tommy Nguyen"
, tags = , tags =
[ "c++" [ "c++"
@ -246,20 +244,13 @@ in [ Person::{
, "web" , "web"
, "google-cloud-platform" , "google-cloud-platform"
] ]
, gitLink = "https://github.com/remyabel" , gitLink = Some "https://github.com/remyabel"
} }
, Person:: { , Person::{
, name = "Krish Jain" , name = "Krish Jain"
, tags = , tags =
[ "c++" [ "c++", "linux", "c", "python", "ios", "nlp", "machine learning" ]
, "linux" , gitLink = Some "https://github.com/Krish-sysadmin"
, "c" , twitter = Some "https://twitter.com/krishjain02"
, "python"
, "ios"
, "nlp"
, "machine learning"
]
, gitLink = "https://github.com/Krish-sysadmin"
, twitter = "https://twitter.com/krishjain02"
} }
] ]

View File

@ -6,9 +6,9 @@ pub struct Person {
pub tags: Vec<String>, pub tags: Vec<String>,
#[serde(rename = "gitLink")] #[serde(rename = "gitLink")]
pub git_link: String, pub git_link: Option<String>,
pub twitter: String, pub twitter: Option<String>,
} }
#[cfg(test)] #[cfg(test)]

View File

@ -21,7 +21,12 @@
<div class="cell -4of12 content"> <div class="cell -4of12 content">
<big>@person.name</big> <big>@person.name</big>
<p>@for tag in person.tags { @tag }</p> <p>@for tag in person.tags { @tag }</p>
<a href="@person.git_link">GitHub</a> - <a href="@person.twitter">Twitter</a> @if person.git_link.is_some() {
<a href="@person.git_link.unwrap()">GitHub</a>
}
@if person.twitter.is_some() {
<a href="@person.twitter.unwrap()">Twitter</a>
}
</div> </div>
} }
</div> </div>