~jplatte/turbo.fish

101174ea4f7a1af576b21bf4d472fd1c0ea512b3 — Jonas Platte 1 year, 2 months ago 51d23ad
Add separate index template
3 files changed, 41 insertions(+), 9 deletions(-)

M src/main.rs
M static/turbofish.css
A templates/index.tera
M src/main.rs => src/main.rs +1 -1
@@ 32,7 32,7 @@ fn tpl_context(guts: &str) -> HashMap<&'static str, String> {

#[get("/")]
fn index() -> Template {
    Template::render("turbofish", tpl_context(""))
    Template::render("index", HashMap::<String, String>::new())
}

#[get("/random")]

M static/turbofish.css => static/turbofish.css +8 -8
@@ 122,25 122,25 @@ h::after {
}

.reverse t,
.reverse u,
.reverse u, .index u,
.reverse r,
.reverse b,
.reverse b, .index b,
.reverse o,
.reverse f,
.reverse i,
.reverse s,
.reverse i, .index i,
.reverse s, .index s,
.reverse h {
    animation-direction: reverse;
}

.reverse t::before, .reverse t::after,
.reverse u::before, .reverse u::after,
.reverse u::before, .reverse u::after, .index u::before, .index u::after,
.reverse r::before, .reverse r::after,
.reverse b::before, .reverse b::after,
.reverse b::before, .reverse b::after, .index b::before, .index b::after,
.reverse o::before, .reverse o::after,
.reverse f::before, .reverse f::after,
.reverse i::before, .reverse i::after,
.reverse s::before, .reverse s::after,
.reverse i::before, .reverse i::after, .index i::before, .index i::after,
.reverse s::before, .reverse s::after, .index s::before, .index s::after,
.reverse h::before, .reverse h::after {
    order: 1;
}

A templates/index.tera => templates/index.tera +32 -0
@@ 0,0 1,32 @@
<!doctype html>
<html lang="en" class="index">

<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'none'; frame-src 'none'">

<title>::<></title>

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

<t><></t>
<u><></u>
<r><></r>
<b><></b>
<o><></o>
<f><></f>
<i><></i>
<s><></s>
<h><></h>

<footer>
    <a href="https://www.reddit.com/r/rust/comments/3fimgp/why_double_colon_rather_that_dot/ctozkd0/">what?</a>
    <a href="https://matematikaadit.github.io/posts/rust-turbofish.html">what??</a>
    <a href="https://github.com/jplatte/turbo.fish">code.</a>
    <a href="/random">random!</a>
</footer>

</html>