adding html templates

This commit is contained in:
Joe Ardent 2023-05-17 13:40:06 -07:00
parent f12b524457
commit 94f1b35c03
3 changed files with 26 additions and 0 deletions

View File

@ -1,6 +1,7 @@
use askama::Template; use askama::Template;
#[derive(Template)] #[derive(Template)]
#[template(path = "signup.html")]
pub struct CreateUser { pub struct CreateUser {
pub username: String, pub username: String,
pub displayname: Option<String>, pub displayname: Option<String>,

18
templates/base.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{{ title }} - Witch Watch{% endblock %}</title>
{% block head %}{% endblock %}
</head>
<body>
<div id="header">
{% block header %}{% endblock %}
</div>
<div id="content">
{% block content %}{% endblock %}
</div>
<div id="footer">
{% block footer
</div>
</body>
</html>

7
templates/signup.html Normal file
View File

@ -0,0 +1,7 @@
{% extends "base.html" %}
{% block title %}Sign Up for Witch Watch, Bish{% endblock %}
{% block content %}
{% endblock %}