tangled
alpha
login
or
join now
ericwood.org
/
photos-site
1
fork
atom
A little app to serve my photography from my personal website
1
fork
atom
overview
issues
pulls
pipelines
that worked yay
ericwood.org
4 months ago
a2c72aaf
0b2ff2eb
0/0
Waiting for spindle ...
+9
-15
4 changed files
expand all
collapse all
unified
split
Cargo.lock
Cargo.toml
src
main.rs
templates.rs
+1
-7
Cargo.lock
···
330
330
]
331
331
332
332
[[package]]
333
333
-
name = "dotenv"
334
334
-
version = "0.15.0"
335
335
-
source = "registry+https://github.com/rust-lang/crates.io-index"
336
336
-
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
337
337
-
338
338
-
[[package]]
339
333
name = "dotenvy"
340
334
version = "0.15.7"
341
335
source = "registry+https://github.com/rust-lang/crates.io-index"
···
1156
1150
"axum",
1157
1151
"axum-extra",
1158
1152
"chrono",
1159
1159
-
"dotenv",
1153
1153
+
"dotenvy",
1160
1154
"minijinja",
1161
1155
"minijinja-autoreload",
1162
1156
"serde",
+1
-1
Cargo.toml
···
8
8
axum = { version = "0.8.6", features = ["macros"] }
9
9
axum-extra = { version = "0.12.1", features = ["query"] }
10
10
chrono = "0.4.42"
11
11
-
dotenv = "0.15.0"
11
11
+
dotenvy = "0.15.7"
12
12
minijinja = { version = "2.12.0", features = ["loader"] }
13
13
minijinja-autoreload = "2.12.0"
14
14
serde = "1.0.228"
+1
-1
src/main.rs
···
1
1
use axum::{Router, response::Html, routing::get};
2
2
-
use dotenv::dotenv;
2
2
+
use dotenvy::dotenv;
3
3
use minijinja_autoreload::AutoReloader;
4
4
use std::{env, sync::Arc};
5
5
mod app_error;
+6
-6
src/templates.rs
···
3
3
use serde::Serialize;
4
4
use std::{env, fs::read_to_string, path::Path};
5
5
6
6
-
#[derive(Serialize)]
7
7
-
struct NavLink<'a> {
8
8
-
id: &'a str,
9
9
-
label: &'a str,
10
10
-
href: &'a str,
11
11
-
}
6
6
+
//#[derive(Serialize)]
7
7
+
//struct NavLink<'a> {
8
8
+
// id: &'a str,
9
9
+
// label: &'a str,
10
10
+
// href: &'a str,
11
11
+
//}
12
12
13
13
pub fn load_templates_dyn() -> AutoReloader {
14
14
AutoReloader::new(move |notifier| {