diff --git a/src/main.rs b/src/main.rs index 2fae567..ae5b9c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,9 +4,9 @@ use rocket::*; use rocket_dyn_templates::{Template, context}; #[get("/create")] -fn create() -> &'static str +fn create() -> Template { - "Hello, world!" + Template::render("create", context!{}) } #[get("/about")] diff --git a/templates/create.html.tera b/templates/create.html.tera new file mode 100644 index 0000000..fac795d --- /dev/null +++ b/templates/create.html.tera @@ -0,0 +1,44 @@ +{% extends "base" %} +{% block title %}{% endblock %} +{% block body %} +