~jplatte/turbo.fish

f7eeed5424e2322283798adde892920f547a8f68 — Jonas Platte 3 years ago 687713d
Use the official name
5 files changed, 10 insertions(+), 10 deletions(-)

M Cargo.toml
M src/main.rs
R src/{turbo_fish.rs => turbofish.rs}
R static/{turbo_fish.css => turbofish.css}
R templates/{turbo_fish.tera => turbofish.tera}
M Cargo.toml => Cargo.toml +1 -1
@@ 1,6 1,6 @@
[package]
authors = ["Jonas Platte <jplatte+git@posteo.de>"]
name = "turbo_fish"
name = "turbofish"
version = "0.1.0"

[dependencies]

M src/main.rs => src/main.rs +8 -8
@@ 4,7 4,7 @@
extern crate rocket;
extern crate rocket_contrib;

mod turbo_fish;
mod turbofish;

use std::collections::HashMap;
use std::path::{Path, PathBuf};


@@ 12,22 12,22 @@ use std::path::{Path, PathBuf};
use rocket::response::NamedFile;
use rocket_contrib::Template;

use turbo_fish::TurboFish;
use turbofish::TurboFish;

#[get("/")]
fn index() -> Template {
    let mut context = HashMap::new();
    context.insert("guts", "");

    Template::render("turbo_fish", context)
    Template::render("turbofish", context)
}

#[get("/<turbo_fish>")]
fn turbo_fish(turbo_fish: TurboFish) -> Template {
#[get("/<turbofish>")]
fn turbofish(turbofish: TurboFish) -> Template {
    let mut context = HashMap::new();
    context.insert("guts", turbo_fish.gut());
    context.insert("guts", turbofish.gut());

    Template::render("turbo_fish", context)
    Template::render("turbofish", context)
}

// From https://github.com/SergioBenitez/Rocket/blob/master/examples/static_files/src/main.rs


@@ 39,7 39,7 @@ fn files(file: PathBuf) -> Option<NamedFile> {
fn main() {
    // TODO: Custom 404
    rocket::ignite()
        .mount("/", routes![index, turbo_fish, files])
        .mount("/", routes![index, turbofish, files])
        .attach(Template::fairing())
        .launch();
}

R src/turbo_fish.rs => src/turbofish.rs +0 -0

R static/turbo_fish.css => static/turbofish.css +0 -0

R templates/turbo_fish.tera => templates/turbofish.tera +1 -1
@@ 9,7 9,7 @@
<title>::<​{{ guts }}></title>

<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="turbo_fish.css">
<link rel="stylesheet" href="turbofish.css">

<t><​{{ guts }}></t>
<u><​{{ guts }}></u>