diff --git a/src/data.rs b/src/data.rs
index 7bbc210..9e1a3c5 100644
--- a/src/data.rs
+++ b/src/data.rs
@@ -30,7 +30,7 @@ pub struct Card {
impl Display for Card {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, r#"
"#, &self.id, &self.name)?;
+ write!(f, r#"
"#, &self.id, &self.name)?;
if let Some(level) = self.level {
if self.card_type.contains("XYZ") {
f.write_str("Rank ")?;
diff --git a/src/main.rs b/src/main.rs
index c2819d2..71e976e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,7 +28,10 @@ async fn main() -> std::io::Result<()> {
// tap these so they’re initialized
let num_cards = (CARDS_BY_ID.len() + SEARCH_CARDS.len()) / 2;
println!("Read {num_cards} cards in {:?}", now.elapsed());
- HttpServer::new(|| App::new().service(search).service(card_info)).bind((Ipv4Addr::from([127, 0, 0, 1]), 8080))?.run().await
+ HttpServer::new(|| App::new().service(search).service(card_info).service(help))
+ .bind((Ipv4Addr::from([127, 0, 0, 1]), 8080))?
+ .run()
+ .await
}
#[derive(Debug, Deserialize)]
@@ -37,6 +40,13 @@ struct Query {
}
const HEADER: &str = include_str!("../static/header.html");
+const HELP_CONTENT: &str = include_str!("../static/help.html");
+const FOOTER: &str = r#"
+