minor tweaks
This commit is contained in:
parent
521bbe9fa4
commit
c30cf86986
8 changed files with 32 additions and 29 deletions
1
assets/htmx.min.js
vendored
Normal file
1
assets/htmx.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
julid
2
julid
|
@ -1 +1 @@
|
|||
Subproject commit 34f85a95a0c289a87de9b97610677ffae136dc68
|
||||
Subproject commit f2ade6d85eddfbcaa54f106564deb6252bfc81df
|
|
@ -54,15 +54,12 @@ pub async fn app(db_pool: sqlx::SqlitePool) -> IntoMakeService<axum::Router> {
|
|||
.layer(axum_login::AuthManagerLayerBuilder::new(store, sessions).build())
|
||||
};
|
||||
|
||||
let css_dir = std::env::current_dir()
|
||||
.unwrap()
|
||||
.join("templates")
|
||||
.join("css");
|
||||
let css_svc = ServeDir::new(css_dir.as_path());
|
||||
let assets_dir = std::env::current_dir().unwrap().join("assets");
|
||||
let assets_svc = ServeDir::new(assets_dir.as_path());
|
||||
|
||||
axum::Router::new()
|
||||
.route("/", get(handle_slash).post(handle_slash))
|
||||
.nest_service("/css", css_svc)
|
||||
.nest_service("/assets", assets_svc)
|
||||
.route("/signup", get(get_create_user).post(post_create_user))
|
||||
.route("/signup_success/:id", get(get_signup_success))
|
||||
.route("/login", get(get_login).post(post_login))
|
||||
|
|
|
@ -92,7 +92,9 @@ impl Watch {
|
|||
//-************************************************************************
|
||||
/// Something a user wants to watch
|
||||
//-************************************************************************
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(
|
||||
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, sqlx::FromRow,
|
||||
)]
|
||||
pub struct WatchQuest {
|
||||
pub user: Julid,
|
||||
pub watch: Julid,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}{{ title }} - What 2 Watch{% endblock %}</title>
|
||||
<link rel="stylesheet" href="/css/ww.css">
|
||||
<link rel="stylesheet" href="/assets/ww.css">
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
|||
<div id="footer">
|
||||
{% block footer %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<script src="/assets/htmx.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<input type="submit" value="sign out?">
|
||||
</form>
|
||||
</p>
|
||||
{% else %}
|
||||
{% when None %}
|
||||
<p>
|
||||
Heya, why don't you <a href="/login">log in</a> or <a href="/signup">sign up</a>?
|
||||
</p>
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
<div class="watchlist">
|
||||
<ul>
|
||||
{% for watch in watches %}
|
||||
<li><span class="watchtitle">{{watch.title}}</span> -- {% call m::get_or_default(watch.year(), "when??") -%}: {{watch.kind}} </li>
|
||||
<li><span class="watchtitle">{{watch.title}}</span> -- {% call m::get_or_default(watch.year(), "when??") -%}:
|
||||
{{watch.kind}} </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue