wooooof
This commit is contained in:
parent
f1d4bb26bd
commit
ad329fc430
6 changed files with 2369 additions and 0 deletions
2309
Cargo.lock
generated
Normal file
2309
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
8
Cargo.toml
Normal file
8
Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "dolltags"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
rocket = "0.5.1"
|
||||
rocket_dyn_templates = { version = "0.2.0", features = ["tera"] }
|
3
assets/site.css
Normal file
3
assets/site.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
:root {
|
||||
font-family: sans-serif, sans-serif;
|
||||
}
|
17
src/main.rs
Normal file
17
src/main.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
#[macro_use]
|
||||
extern crate rocket;
|
||||
use rocket::fs::{relative, FileServer};
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> Template {
|
||||
Template::render("index", context! {})
|
||||
}
|
||||
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
rocket::build()
|
||||
.attach(Template::fairing())
|
||||
.mount("/assets", FileServer::from(relative!("/assets")))
|
||||
.mount("/", routes![index])
|
||||
}
|
18
templates/base.html.tera
Normal file
18
templates/base.html.tera
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel=stylesheet href="/assets/site.css" />
|
||||
<title>{% block title %}{% endblock title %}Doll.Tags</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1>Doll.Tags</h1>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block main %}
|
||||
{% endblock main %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
14
templates/index.html.tera
Normal file
14
templates/index.html.tera
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% extends "base" %}
|
||||
{% block title %}Found a stray? - {% endblock title %}
|
||||
{% block main %}
|
||||
<div id="stray-form">
|
||||
<h2>Found a stray?</h2>
|
||||
|
||||
<form>
|
||||
<label for="ident">Enter the 6-digit ID you found:</label>
|
||||
<input type="text" id="ident" name="ident" required placeholder="000-000" />
|
||||
|
||||
<button type="submit">Search the database</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock main %}
|
Loading…
Add table
Reference in a new issue