get signalboost page working

This commit is contained in:
Cadey Ratio 2020-07-12 19:37:01 -04:00
parent dfc55be049
commit a59c848618
3 changed files with 38 additions and 1 deletions

View File

@ -21,3 +21,8 @@ pub async fn resume(state: Arc<State>) -> Result<impl Reply, Rejection> {
let state = state.clone();
Response::builder().html(|o| templates::resume_html(o, Html(state.resume.clone())))
}
pub async fn signalboost(state: Arc<State>) -> Result<impl Reply, Rejection> {
let state = state.clone();
Response::builder().html(|o| templates::signalboost_html(o, state.signalboost.clone()))
}

View File

@ -28,7 +28,10 @@ async fn main() -> Result<()> {
.or(warp::path!("feeds").and_then(handlers::feeds))
.or(warp::path!("resume")
.and(with_state(state.clone()))
.and_then(handlers::resume));
.and_then(handlers::resume))
.or(warp::path!("signalboost")
.and(with_state(state.clone()))
.and_then(handlers::signalboost));
let files = warp::path("static")
.and(warp::fs::dir("./static"))

View File

@ -0,0 +1,29 @@
@use super::{header_html, footer_html};
@use crate::signalboost::Person;
@(people: Vec<Person>)
@:header_html(Some("Signal Boosts"), None)
<h1>Signal Boosts</h1>
<p>These awesome people are currently looking for a job. If you are looking for anyone with these skills, please feel free to reach out to them.</p>
<p>To add yourself to this list, fork <a href="https://github.com/Xe/site">this website's source code</a> and send a pull request with edits to <code>signalboost.dhall</code>.</p>
<!-- TODO(Xe): Remove this after COVID-19 is less of a thing -->
<p>With COVID-19 raging across the world, these people are in need of a job now more than ever.</p>
<h2>People</h2>
<div class="grid signalboost">
@for person in people {
<div class="cell -4of12 content">
<big>@person.name</big>
<p>@for tag in person.tags { @tag }</p>
<a href="@person.git_link">GitHub</a> - <a href="@person.twitter">Twitter</a>
</div>
}
</div>
@:footer_html()