diff --git a/.gitignore b/.gitignore
index 8cdaa33..4973993 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.env
+
# Generated by Cargo
# will have compiled files and executables
/target/
diff --git a/Cargo.lock b/Cargo.lock
index e87d771..eb54764 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -44,6 +44,21 @@ version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "anyhow"
version = "1.0.90"
@@ -72,6 +87,12 @@ dependencies = [
"syn 2.0.82",
]
+[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
[[package]]
name = "attribute-derive"
version = "0.9.2"
@@ -118,10 +139,10 @@ dependencies = [
"axum-core",
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 1.1.0",
+ "http-body 1.0.1",
"http-body-util",
- "hyper",
+ "hyper 1.5.0",
"hyper-util",
"itoa",
"matchit",
@@ -152,8 +173,8 @@ dependencies = [
"async-trait",
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 1.1.0",
+ "http-body 1.0.1",
"http-body-util",
"mime",
"pin-project-lite",
@@ -176,15 +197,27 @@ dependencies = [
"miniz_oxide",
"object",
"rustc-demangle",
- "windows-targets",
+ "windows-targets 0.52.6",
]
+[[package]]
+name = "base64"
+version = "0.21.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
[[package]]
name = "bitflags"
version = "2.6.0"
@@ -251,12 +284,36 @@ version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
+[[package]]
+name = "cc"
+version = "1.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
+dependencies = [
+ "shlex",
+]
+
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "chrono"
+version = "0.4.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-targets 0.52.6",
+]
+
[[package]]
name = "ciborium"
version = "0.2.2"
@@ -343,6 +400,19 @@ dependencies = [
"unicode-xid",
]
+[[package]]
+name = "contentful"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "018e4ff43b3f2b29233a927971adb0be725ea44f3d81cec4542eedbe11b8aa96"
+dependencies = [
+ "chrono",
+ "log",
+ "reqwest 0.11.27",
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "convert_case"
version = "0.6.0"
@@ -363,6 +433,22 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
[[package]]
name = "core_maths"
version = "0.1.0"
@@ -504,6 +590,12 @@ dependencies = [
"syn 2.0.82",
]
+[[package]]
+name = "dotenvy"
+version = "0.15.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
+
[[package]]
name = "drain_filter_polyfill"
version = "0.1.3"
@@ -531,6 +623,22 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+[[package]]
+name = "errno"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
+
[[package]]
name = "fixed_decimal"
version = "0.5.6"
@@ -549,6 +657,21 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+[[package]]
+name = "foreign-types"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
+dependencies = [
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
[[package]]
name = "form_urlencoded"
version = "1.2.1"
@@ -676,7 +799,7 @@ dependencies = [
"futures-core",
"futures-sink",
"gloo-utils",
- "http",
+ "http 1.1.0",
"js-sys",
"pin-project",
"serde",
@@ -700,6 +823,44 @@ dependencies = [
"web-sys",
]
+[[package]]
+name = "h2"
+version = "0.3.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http 0.2.12",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http 1.1.0",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
[[package]]
name = "half"
version = "2.4.1"
@@ -747,6 +908,17 @@ dependencies = [
"utf8-width",
]
+[[package]]
+name = "http"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
[[package]]
name = "http"
version = "1.1.0"
@@ -758,6 +930,17 @@ dependencies = [
"itoa",
]
+[[package]]
+name = "http-body"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
+dependencies = [
+ "bytes",
+ "http 0.2.12",
+ "pin-project-lite",
+]
+
[[package]]
name = "http-body"
version = "1.0.1"
@@ -765,7 +948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
- "http",
+ "http 1.1.0",
]
[[package]]
@@ -776,8 +959,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
dependencies = [
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 1.1.0",
+ "http-body 1.0.1",
"pin-project-lite",
]
@@ -799,6 +982,30 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+[[package]]
+name = "hyper"
+version = "0.14.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2 0.3.26",
+ "http 0.2.12",
+ "http-body 0.4.6",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
[[package]]
name = "hyper"
version = "1.5.0"
@@ -808,14 +1015,62 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
- "http",
- "http-body",
+ "h2 0.4.6",
+ "http 1.1.0",
+ "http-body 1.0.1",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
"smallvec",
"tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-rustls"
+version = "0.27.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333"
+dependencies = [
+ "futures-util",
+ "http 1.1.0",
+ "hyper 1.5.0",
+ "hyper-util",
+ "rustls",
+ "rustls-pki-types",
+ "tokio",
+ "tokio-rustls",
+ "tower-service",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
+dependencies = [
+ "bytes",
+ "hyper 0.14.31",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+]
+
+[[package]]
+name = "hyper-tls"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
+dependencies = [
+ "bytes",
+ "http-body-util",
+ "hyper 1.5.0",
+ "hyper-util",
+ "native-tls",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
]
[[package]]
@@ -825,13 +1080,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b"
dependencies = [
"bytes",
+ "futures-channel",
"futures-util",
- "http",
- "http-body",
- "hyper",
+ "http 1.1.0",
+ "http-body 1.0.1",
+ "hyper 1.5.0",
"pin-project-lite",
+ "socket2",
"tokio",
"tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
]
[[package]]
@@ -1274,6 +1555,12 @@ version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f958d3d68f4167080a18141e10381e7634563984a537f2a49a30fd8e53ac5767"
+[[package]]
+name = "ipnet"
+version = "2.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
+
[[package]]
name = "itertools"
version = "0.12.1"
@@ -1326,15 +1613,15 @@ dependencies = [
[[package]]
name = "leptos-use"
-version = "0.13.6"
+version = "0.13.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f918fb333772f6401d671f996689e7258e3bee31e4108d5e142566897c678a50"
+checksum = "9bddb5967495ce3b29386fa1e0423e9f572da929bbed9593c191d55a8d8d0ab4"
dependencies = [
"cfg-if",
"codee",
"cookie",
"default-struct-builder",
- "http",
+ "http 1.1.0",
"js-sys",
"lazy_static",
"leptos",
@@ -1525,7 +1812,7 @@ version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4161acbf80f59219d8d14182371f57302bc7ff81ee41aba8ba1ff7295727f23"
dependencies = [
- "base64",
+ "base64 0.22.1",
"cfg-if",
"futures",
"indexmap",
@@ -1617,6 +1904,12 @@ dependencies = [
"serde_test",
]
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
+
[[package]]
name = "litemap"
version = "0.7.3"
@@ -1735,7 +2028,7 @@ dependencies = [
"bytes",
"encoding_rs",
"futures-util",
- "http",
+ "http 1.1.0",
"httparse",
"memchr",
"mime",
@@ -1743,6 +2036,23 @@ dependencies = [
"version_check",
]
+[[package]]
+name = "native-tls"
+version = "0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
+dependencies = [
+ "libc",
+ "log",
+ "openssl",
+ "openssl-probe",
+ "openssl-sys",
+ "schannel",
+ "security-framework",
+ "security-framework-sys",
+ "tempfile",
+]
+
[[package]]
name = "nom"
version = "7.1.3"
@@ -1823,6 +2133,50 @@ version = "1.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+[[package]]
+name = "openssl"
+version = "0.10.68"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
+dependencies = [
+ "bitflags 2.6.0",
+ "cfg-if",
+ "foreign-types",
+ "libc",
+ "once_cell",
+ "openssl-macros",
+ "openssl-sys",
+]
+
+[[package]]
+name = "openssl-macros"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.82",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
[[package]]
name = "pad-adapter"
version = "0.1.1"
@@ -1849,7 +2203,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
- "windows-targets",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -1902,6 +2256,12 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -2043,7 +2403,7 @@ version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
dependencies = [
- "bitflags",
+ "bitflags 2.6.0",
]
[[package]]
@@ -2084,6 +2444,104 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+[[package]]
+name = "reqwest"
+version = "0.11.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62"
+dependencies = [
+ "base64 0.21.7",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2 0.3.26",
+ "http 0.2.12",
+ "http-body 0.4.6",
+ "hyper 0.14.31",
+ "hyper-tls 0.5.0",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls-pemfile 1.0.4",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper 0.1.2",
+ "system-configuration 0.5.1",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "winreg",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "encoding_rs",
+ "futures-core",
+ "futures-util",
+ "h2 0.4.6",
+ "http 1.1.0",
+ "http-body 1.0.1",
+ "http-body-util",
+ "hyper 1.5.0",
+ "hyper-rustls",
+ "hyper-tls 0.6.0",
+ "hyper-util",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "native-tls",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustls-pemfile 2.2.0",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.1",
+ "system-configuration 0.6.1",
+ "tokio",
+ "tokio-native-tls",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "windows-registry",
+]
+
+[[package]]
+name = "ring"
+version = "0.17.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
+dependencies = [
+ "cc",
+ "cfg-if",
+ "getrandom",
+ "libc",
+ "spin",
+ "untrusted",
+ "windows-sys 0.52.0",
+]
+
[[package]]
name = "rstml"
version = "0.11.2"
@@ -2110,6 +2568,67 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+[[package]]
+name = "rustix"
+version = "0.38.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a"
+dependencies = [
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e"
+dependencies = [
+ "once_cell",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
+dependencies = [
+ "base64 0.21.7",
+]
+
+[[package]]
+name = "rustls-pemfile"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
+dependencies = [
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "rustls-pki-types"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+
+[[package]]
+name = "rustls-webpki"
+version = "0.102.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
+dependencies = [
+ "ring",
+ "rustls-pki-types",
+ "untrusted",
+]
+
[[package]]
name = "rustversion"
version = "1.0.18"
@@ -2131,12 +2650,44 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "schannel"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+[[package]]
+name = "security-framework"
+version = "2.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation",
+ "core-foundation-sys",
+ "libc",
+ "security-framework-sys",
+]
+
+[[package]]
+name = "security-framework-sys"
+version = "2.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
[[package]]
name = "self_cell"
version = "1.0.4"
@@ -2154,9 +2705,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
+checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
dependencies = [
"serde_derive",
]
@@ -2174,9 +2725,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.210"
+version = "1.0.213"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
+checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
dependencies = [
"proc-macro2",
"quote",
@@ -2283,9 +2834,9 @@ dependencies = [
"dashmap",
"futures",
"gloo-net",
- "http",
+ "http 1.1.0",
"http-body-util",
- "hyper",
+ "hyper 1.5.0",
"inventory",
"js-sys",
"once_cell",
@@ -2329,6 +2880,12 @@ dependencies = [
"syn 2.0.82",
]
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
[[package]]
name = "slab"
version = "0.4.9"
@@ -2388,6 +2945,12 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
[[package]]
name = "syn"
version = "1.0.109"
@@ -2433,6 +2996,9 @@ name = "sync_wrapper"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+dependencies = [
+ "futures-core",
+]
[[package]]
name = "synstructure"
@@ -2445,18 +3011,66 @@ dependencies = [
"syn 2.0.82",
]
+[[package]]
+name = "system-configuration"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation",
+ "system-configuration-sys 0.5.0",
+]
+
+[[package]]
+name = "system-configuration"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation",
+ "system-configuration-sys 0.6.0",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
[[package]]
name = "tanguy-gerome-fi"
version = "0.1.0"
dependencies = [
"axum",
"console_error_panic_hook",
- "http",
+ "contentful",
+ "dotenvy",
+ "http 1.1.0",
"leptos",
"leptos_axum",
"leptos_i18n",
"leptos_meta",
"leptos_router",
+ "reqwest 0.12.9",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
"thiserror",
"tokio",
"tower 0.4.13",
@@ -2465,6 +3079,19 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "tempfile"
+version = "3.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "once_cell",
+ "rustix",
+ "windows-sys 0.59.0",
+]
+
[[package]]
name = "thiserror"
version = "1.0.64"
@@ -2568,6 +3195,27 @@ dependencies = [
"syn 2.0.82",
]
+[[package]]
+name = "tokio-native-tls"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
+dependencies = [
+ "native-tls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-rustls"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+dependencies = [
+ "rustls",
+ "rustls-pki-types",
+ "tokio",
+]
+
[[package]]
name = "tokio-util"
version = "0.7.12"
@@ -2654,11 +3302,11 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5"
dependencies = [
- "bitflags",
+ "bitflags 2.6.0",
"bytes",
"futures-util",
- "http",
- "http-body",
+ "http 1.1.0",
+ "http-body 1.0.1",
"http-body-util",
"http-range-header",
"httpdate",
@@ -2717,6 +3365,12 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
[[package]]
name = "typed-builder"
version = "0.18.2"
@@ -2802,6 +3456,12 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
+[[package]]
+name = "untrusted"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
+
[[package]]
name = "url"
version = "2.5.2"
@@ -2840,6 +3500,12 @@ dependencies = [
"getrandom",
]
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
[[package]]
name = "version_check"
version = "0.9.5"
@@ -2856,6 +3522,15 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -2864,9 +3539,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.93"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5"
+checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [
"cfg-if",
"once_cell",
@@ -2875,9 +3550,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.93"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b"
+checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [
"bumpalo",
"log",
@@ -2902,9 +3577,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.93"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf"
+checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -2912,9 +3587,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.93"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836"
+checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
@@ -2925,9 +3600,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.93"
+version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
+checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
[[package]]
name = "wasm-streams"
@@ -2961,13 +3636,61 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-registry"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+dependencies = [
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
- "windows-targets",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -2976,7 +3699,22 @@ version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
- "windows-targets",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
]
[[package]]
@@ -2985,28 +3723,46 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
"windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
]
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
@@ -3019,24 +3775,48 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
@@ -3052,6 +3832,16 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "winreg"
+version = "0.50.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "write16"
version = "1.0.0"
@@ -3144,6 +3934,12 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+
[[package]]
name = "zerotrie"
version = "0.1.3"
diff --git a/Cargo.toml b/Cargo.toml
index b581263..87772ec 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,11 +16,17 @@ leptos_router = { version = "0.6", features = ["nightly"] }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
tower = { version = "0.4", features = ["util"], optional = true }
tower-http = { version = "0.5", features = ["fs"], optional = true }
-wasm-bindgen = "=0.2.93"
+wasm-bindgen = "=0.2.95"
thiserror = "1"
tracing = { version = "0.1", optional = true }
http = "1"
leptos_i18n = { version = "0.4.1", default-features = false, features = ["yaml_files"] }
+serde = "1.0.213"
+dotenvy = "0.15.7"
+serde_json = "1.0.132"
+serde_path_to_error = "0.1.16"
+reqwest = { version = "0.12.9", features = ["json"]}
+contentful = "0.8.0"
[features]
hydrate = [
@@ -44,7 +50,8 @@ ssr = [
[package.metadata.leptos-i18n]
default = "en"
-locales = ["en", "fr", "fi", "et", "sv", "eo", "jbo"]
+# locales = ["en", "fr", "fi", "et", "sv", "eo", "jbo"]
+locales = ["en"]
# Defines a size-optimized profile for the WASM bundle in release mode
[profile.wasm-release]
diff --git a/locales/en.yaml b/locales/en.yaml
index 74faa92..4c5ff41 100644
--- a/locales/en.yaml
+++ b/locales/en.yaml
@@ -2,5 +2,11 @@ home: Home
available_in: "Available in:"
partial_translations: (partial translations)
+blog: Blog
+welcome_blog: Welcome to my blog!
+
+gallery: Gallery
+gallery_title: Gallery
+gallery_description: aaa
tanguy_gerome: Tanguy Gérôme
diff --git a/locales/eo.yaml b/locales/eo.yaml
index 10f0301..c82a73a 100644
--- a/locales/eo.yaml
+++ b/locales/eo.yaml
@@ -1,6 +1,10 @@
home: Hejmo
available_in: "Havebla en:"
-partial_translations:
+partial_translations: (malkompletaj tradukoj)
+blog: Blogo
+welcome_blog: Bonvenon al mia blogo!
+
+gallery: Galerio
tanguy_gerome:
diff --git a/locales/et.yaml b/locales/et.yaml
index 8389569..4c508d1 100644
--- a/locales/et.yaml
+++ b/locales/et.yaml
@@ -1,6 +1,10 @@
home: Kodu
available_in: "Saadaval keeles:"
-partial_translations:
+partial_translations: (puudulikud tõlked)
+blog: Blogi
+welcome_blog: Tere tulemast minu blogisse!
+
+gallery: Galerii
tanguy_gerome:
diff --git a/locales/fi.yaml b/locales/fi.yaml
index 4b604a8..bf5bdbe 100644
--- a/locales/fi.yaml
+++ b/locales/fi.yaml
@@ -2,5 +2,9 @@ home: Koti
available_in: "Saatavilla kielillä:"
partial_translations: (keskeneräisiä käännöksiä)
+blog: Blogi
+welcome_blog: Tervetuloa blogiini!
+
+gallery: Galleria
tanguy_gerome:
diff --git a/locales/fr.yaml b/locales/fr.yaml
index 2cf10cc..322b871 100644
--- a/locales/fr.yaml
+++ b/locales/fr.yaml
@@ -2,5 +2,9 @@ home: Accueil
available_in: "Disponible en:"
partial_translations: (traductions partielles)
+blog: Blog
+welcome_blog: Bienvenue sur mon blog!
+
+gallery: Gallerie
tanguy_gerome:
diff --git a/locales/jbo.yaml b/locales/jbo.yaml
index 07aca75..09bad94 100644
--- a/locales/jbo.yaml
+++ b/locales/jbo.yaml
@@ -2,5 +2,9 @@ home: zdani
available_in: "fanva fi "
partial_translations: (nalmu'o puvyfanva)
+blog: snukarni
+welcome_blog: .ui do zanvi'e fi le mi snukarni
+
+gallery: larmuzga
tanguy_gerome: .tangis.jerom.
diff --git a/locales/sv.yaml b/locales/sv.yaml
index 0e41cf1..bdeae59 100644
--- a/locales/sv.yaml
+++ b/locales/sv.yaml
@@ -1,6 +1,10 @@
home: Hem
available_in: "Finns på:"
-partial_translations:
+partial_translations: (saknade översättningar)
+blog: Blogg
+welcome_blog: Välkommen till min blogg!
+
+gallery: Galleri
tanguy_gerome:
diff --git a/nixpacks.toml b/nixpacks.toml
index b5a142d..a70514e 100644
--- a/nixpacks.toml
+++ b/nixpacks.toml
@@ -1,7 +1,14 @@
+buildImage = 'ghcr.io/railwayapp/nixpacks:debian-1730765032'
+
+[phases.setup]
+# aptPkgs = ['libc6']
+
[phases.install]
+dependsOn = ['setup']
# nixPkgs = ['cargo-leptos']
# cmds = ['cargo install -f wasm-bindgen-cli --version 0.2.93']
cmds = ['cargo install cargo-quickinstall', 'cargo quickinstall cargo-leptos']
+# cmds = ['cargo install cargo-leptos']
# cmds = ['rustup target add wasm32-unknown-unknown']
[phases.build]
diff --git a/src/app.rs b/src/app.rs
index 54184ed..32de02d 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,10 +1,13 @@
-leptos_i18n::load_locales!();
-use i18n::*;
use leptos::*;
use leptos_meta::*;
use leptos_router::*;
+use crate::i18n::*;
use crate::error_template::{AppError, ErrorTemplate};
+// use crate::services::contentful::get_rich_text_page;
+// use crate::services::rich_text;
+
+use crate::routes::gallery;
#[component]
pub fn App() -> impl IntoView {
@@ -32,8 +35,14 @@ pub fn App() -> impl IntoView {
}>
- }>
+ }>
+ //
+ //
+
+
+
+
@@ -50,19 +59,19 @@ pub fn LanguageSwitcher() -> impl IntoView {
{t!(i18n, available_in)}
english
-
français
-
suomi
-
eesti
-
svenska
-
esperanto
-
lojban
+ //
français
+ //
suomi
+ //
eesti
+ //
svenska
+ //
esperanto
+ //
lojban
{t!(i18n, partial_translations)}
}
}
#[component]
-fn Header() -> impl IntoView {
+pub fn Header() -> impl IntoView {
let i18n = use_i18n();
view! {
@@ -71,7 +80,9 @@ fn Header() -> impl IntoView {
impl IntoView {
/>
-
+ //
}
}
#[component]
-fn Footer() -> impl IntoView {
+pub fn Footer() -> impl IntoView {
let i18n = use_i18n();
view! {
@@ -105,11 +116,41 @@ fn Footer() -> impl IntoView {
}
#[component]
-fn HomePage() -> impl IntoView {
+pub fn HomePage() -> impl IntoView {
view! {
- "Welcome!"
- "This website is under construction, please check back later :)"
+ Welcome!
+
+ "I'm "Tanguy Gérôme , a 26 year old software developer, amateur photographer, and over all nerd living in Helsinki, Finland, originally from Cornimont, France.
+
+
+ On here you can find my personal photography portfolio, and (coming) a blog where I scribble about whatever comes to mind in relation to my hobbies and interests, including:
+
+
+ Linux
+ video games
+ knitting
+ hiking
+ scouting
+ language learning
+ photography (digital and film)
+
+
+
+ This website is still under construction, more content to come (hopefully) soon.
+
+ //
+ // {match page {
+ // Ok(page) => {
+ // view! {
+ //
+ // {rich_text::document_handler(&page.english.rich_text_content)}
+ //
+ // }
+ // },
+ // Err(error) => view! { "Error: "{error.to_string()}
}
+ // }}
+ //
}
}
diff --git a/src/blog.rs b/src/blog.rs
new file mode 100644
index 0000000..4f9b1c8
--- /dev/null
+++ b/src/blog.rs
@@ -0,0 +1,103 @@
+use leptos::*;
+use leptos_router::*;
+use serde::{Deserialize, Serialize};
+
+use crate::i18n::*;
+use crate::services::contentful::get_rich_text_page;
+use crate::services::rich_text;
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct BlogPostMetadata {
+ title: String,
+ page_slug: String,
+}
+
+#[derive(Params, PartialEq)]
+struct BlogPostParams {
+ slug: String
+}
+
+// #[server(GetBlogPostList, "/api", "GetJson")]
+// pub async fn get_blog_post_list() -> Result, ServerFnError> {
+// use crate::services::contentful;
+// let contentful_client = contentful::get_contentful_client();
+// let pages = contentful_client.get_entries_by_type::("richTextPageLanguagesWrapper", None).await;
+// match pages {
+// Ok(found_pages) => {
+// Ok(found_pages.into_iter().map(|page| BlogPostMetadata { title: page.english.title, page_slug: page.english.page_slug }).collect())
+// },
+// Err(e) => Err(ServerFnError::ServerError(e.to_string())),
+// }
+// }
+
+#[component]
+pub fn BlogList() -> impl IntoView {
+ let i18n = use_i18n();
+ // let blog_pages_local = create_local_resource(|| (), |_| async move { get_blog_post_list().await });
+ // let blog_pages = create_resource(|| (), |_| async move { get_blog_post_list().await });
+
+ view! {
+
+ {t!(i18n, welcome_blog)}
+ //
+ // "Loaded " {pages.as_ref().unwrap().len()} " pages"
+ //
+ // "Loading..." }>
+ // {move || blog_pages_local.get()
+ // .map(|pages| view! { "Loaded " {pages.unwrap().len()} " pages"
})
+ // }
+ //
+
+
+ // "Loading..." }>
+ // {match blog_pages.get().unwrap_or(Ok(Vec::new())) {
+ // Ok(pages) => {
+ // view! {
+ //
+ // {pages.into_iter()
+ // .map(|page| {
+ // let blog_post_url = format!("/blog/{}", page.page_slug);
+ // view! { {page.title} }
+ // })
+ // .collect::>()}
+ //
+ // }
+ // },
+ // Err(error) => view! { "Error: "{error.to_string()} }
+ // }}
+ // {move || blog_pages.get()
+ // .map(|pages| view! { "Found " {pages.unwrap().len()} " pages"
})
+ // }
+ //
+
+ }
+}
+
+#[component]
+pub fn BlogPost() -> impl IntoView {
+ let params = use_params::();
+ let slug= move || {
+ params.with(|params| params.as_ref()
+ .map(|params| params.slug.clone())
+ .unwrap())
+ };
+ let blog_page = create_resource(|| (), move |_| async move { get_rich_text_page(slug()).await });
+
+ view! {
+
+ "Loading..." }>
+ {match blog_page.get().unwrap_or(Err(ServerFnError::ServerError("Loading...".to_string()))) {
+ Ok(page) => {
+ view! {
+
+
{page.english.title}
+ {rich_text::document_handler(&page.english.rich_text_content)}
+
+ }
+ },
+ Err(error) => view! { "Error: "{error.to_string()}
}
+ }}
+
+
+ }
+}
diff --git a/src/components/mod.rs b/src/components/mod.rs
new file mode 100644
index 0000000..e69de29
diff --git a/src/lib.rs b/src/lib.rs
index ac36687..0ac15cb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,12 @@
+leptos_i18n::load_locales!();
pub mod app;
+pub mod blog;
pub mod error_template;
+
+pub mod components;
+pub mod routes;
+pub mod services;
+
#[cfg(feature = "ssr")]
pub mod fileserv;
diff --git a/src/main.rs b/src/main.rs
index 774909f..1d4050d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,9 @@
#[cfg(feature = "ssr")]
#[tokio::main]
async fn main() {
+ if cfg!(debug_assertions) {
+ let _ = dotenvy::dotenv();
+ }
use axum::Router;
use leptos::*;
use leptos_axum::{generate_route_list, LeptosRoutes};
diff --git a/src/routes/gallery.rs b/src/routes/gallery.rs
new file mode 100644
index 0000000..da5bc9f
--- /dev/null
+++ b/src/routes/gallery.rs
@@ -0,0 +1,128 @@
+use leptos::*;
+use leptos_router::*;
+use serde::{Deserialize, Serialize};
+
+// use crate::i18n::*;
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct WatermarkedImage {
+ title: String,
+ slug: String,
+ #[serde(default)]
+ description: String,
+ image_without_watermark: contentful::models::Asset,
+ image_with_watermark: contentful::models::Asset
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct Gallery {
+ title: String,
+ slug: String,
+ #[serde(default)]
+ description: String,
+ images: Vec
+}
+
+#[server(GetGallery, "/api", "GetJson")]
+pub async fn get_gallery() -> Result {
+ use crate::services::contentful;
+ let contentful_client = contentful::get_contentful_client();
+ let slug = "photography-portfolio";
+ let query_string = format!("?content_type=imageGallery&include=10&fields.slug={}", slug);
+ let galleries = contentful_client.get_entries_by_query_string::(&query_string).await;
+ match galleries {
+ Ok(found_galleries) => {
+ if found_galleries.len() != 1 {
+ return Err(ServerFnError::ServerError("Found none or more than one".to_string()));
+ }
+ Ok(found_galleries[0].clone())
+ },
+ Err(e) => Err(ServerFnError::ServerError(e.to_string())),
+ }
+}
+
+#[derive(Params, PartialEq)]
+struct GalleryEntryParams {
+ slug: String
+}
+
+#[component]
+pub fn GalleryEntry() -> impl IntoView {
+ let params = use_params::();
+ let slug= move || {
+ params.with(|params| params.as_ref()
+ .map(|params| params.slug.clone())
+ .unwrap_or_default())
+ };
+ let gallery = create_resource(|| (), |_| async move { get_gallery().await });
+
+ view! {
+ "Loading..." }>
+ {move || {
+ gallery.get().map(|gallery_loaded|
+ match gallery_loaded {
+ Ok(gallery) => {
+ let image = move || gallery.images.into_iter()
+ .find(move |image| image.slug == slug());
+ match image() {
+ None => view! {
},
+ Some(image) => {
+ let display_url = format!("https:{}?w=2400&h=2400&q=80&fm=avif", &image.image_with_watermark.file.url);
+ view! {
+
+
+
{image.title.clone()}
+
{image.description}
+
+ }
+ }
+ }
+ },
+ Err(error) => view! { "Error: "{error.to_string()}
}
+ }
+ )
+
+ }}
+
+ }
+
+}
+
+#[component]
+pub fn Gallery() -> impl IntoView {
+ let gallery = create_resource(|| (), |_| async move { get_gallery().await });
+
+ view! {
+
+
+ "Loading..." }>
+ {move || {
+ gallery.get().map(|gallery_loaded|
+ match gallery_loaded {
+ Ok(gallery) => {
+ view! {
+
+
{gallery.title}
+
{gallery.description}
+
+ {gallery.images.into_iter()
+ .map(|image| {
+ let thumbnail_url = format!("https:{}?w=800&h=800&q=80&fm=avif", &image.image_without_watermark.file.url);
+ let link_url = format!("/gallery/{}", &image.slug);
+ view! { }
+ }).collect::>()
+ }
+
+
+ }
+ },
+ Err(error) => view! { "Error: "{error.to_string()}
}
+ }
+ )
+
+ }}
+
+
+ }
+}
diff --git a/src/routes/mod.rs b/src/routes/mod.rs
new file mode 100644
index 0000000..31dedbe
--- /dev/null
+++ b/src/routes/mod.rs
@@ -0,0 +1,2 @@
+
+pub mod gallery;
diff --git a/src/services/contentful.rs b/src/services/contentful.rs
new file mode 100644
index 0000000..b6c2899
--- /dev/null
+++ b/src/services/contentful.rs
@@ -0,0 +1,268 @@
+use std::env;
+// use reqwest::StatusCode;
+use leptos::*;
+use serde::{Deserialize, Serialize};
+use serde_json;
+
+// use crate::services::rich_text;
+
+//pub struct Client {
+// access_token: String,
+// space_id: String,
+// base_url: String,
+// environment_id: String,
+//}
+
+//impl Client {
+// pub fn new(
+// access_token: &str,
+// space_id: &str,
+// base_url: &str,
+// environment_id: &str,
+// ) -> Client {
+// Client {
+// base_url: base_url.into(),
+// access_token: access_token.into(),
+// space_id: space_id.into(),
+// environment_id: environment_id.into(),
+// }
+// }
+
+// fn get_entries_url(&self, query_string: &str) -> String {
+// format!(
+// "{base_url}/{space_id}/environments/{environment}/entries{query_string}",
+// base_url = &self.base_url,
+// space_id = &self.space_id,
+// environment = &self.environment_id,
+// query_string = &query_string
+// )
+// }
+
+// pub async fn get_entries_by_query_string(
+// &self,
+// query_string: &str
+// ) -> Result, Box>
+// where
+// for<'a> T: Serialize + Deserialize<'a>,
+// {
+// let url = self.get_entries_url(query_string);
+// let reqwest_client = reqwest::Client::new();
+// let request = reqwest_client.get(&url).bearer_auth(&self.access_token);
+// let response = request.send().await?;
+// let json_response = match response.status() {
+// StatusCode::OK => {
+// let json = response.json::().await?;
+// Some(json)
+// },
+// StatusCode::NOT_FOUND => None,
+// _ => {
+// unimplemented!();
+// },
+// };
+// match json_response {
+// Some(json) => {
+// if let Some(items) = json.clone().get_mut("items") {
+// if items.is_array() {
+// if let Some(includes) = json.get("includes") {
+// self.resolve_array(items, includes)?;
+// } else {
+// let includes = serde_json::Value::default();
+// self.resolve_array(items, &includes)?;
+// }
+
+// let ar_string = items.to_string();
+// let entries = serde_json::from_str::>(ar_string.as_str())?;
+// Ok(entries)
+// } else {
+// unimplemented!();
+// }
+// } else {
+// unimplemented!();
+// }
+// },
+// _ => unimplemented!(),
+// }
+// }
+
+// fn resolve_array(
+// &self,
+// value: &mut serde_json::Value,
+// includes: &serde_json::Value,
+// ) -> Result<(), Box> {
+// let items = value.as_array_mut().unwrap();
+// for item in items {
+// if item.is_object() {
+// self.resolve_object(item, includes)?;
+// } else if item.is_string() || item.is_number() {
+// // do nothing
+// } else {
+// unimplemented!();
+// }
+// }
+// Ok(())
+// }
+
+// fn resolve_object(
+// &self,
+// value: &mut serde_json::Value,
+// includes: &serde_json::Value,
+// ) -> Result<(), Box> {
+// if let Some(sys) = value.get("sys") {
+// if let Some(sys_type) = sys.get("type") {
+// if sys_type == "Entry" {
+// self.resolve_entry(value, includes)?;
+// } else if sys_type == "Link" {
+// self.resolve_link(value, includes)?;
+// } else {
+// let node_type = value["nodeType"].clone();
+// if node_type == "document" {
+// // log::warn!("TODO: Richtext is not yet implemented");
+// } else {
+// unimplemented!(
+// "{} - {} not implemented for {}",
+// &sys_type,
+// &node_type,
+// &value
+// );
+// }
+// }
+// } else {
+// unimplemented!("sys.type do not exist, though sys exists") // TODO: Can this ever happen?
+// }
+// } else {
+// // Do nothing, as it likely a json object
+// }
+
+// Ok(())
+// }
+
+// fn resolve_asset(&self, value: &mut serde_json::Value) -> Result<(), Box> {
+// if let Some(fields) = value.get_mut("fields") {
+// if fields.is_object() {
+// *value = fields.clone();
+// } else {
+// unimplemented!();
+// }
+// } else {
+// unimplemented!();
+// }
+
+// Ok(())
+// }
+
+// fn resolve_entry(
+// &self,
+// value: &mut serde_json::Value,
+// includes: &serde_json::Value,
+// ) -> Result<(), Box> {
+// if let Some(fields) = value.get_mut("fields") {
+// if fields.is_object() {
+// let entry_object = fields.as_object_mut().unwrap();
+// for (_field_name, field_value) in entry_object {
+// if field_value.is_object() {
+// self.resolve_object(field_value, includes)?;
+// } else if field_value.is_array() {
+// self.resolve_array(field_value, includes)?;
+// } else {
+// // Regular string, number, etc, values. No need to do anything.
+// }
+// }
+// *value = fields.clone();
+// } else {
+// unimplemented!();
+// }
+// } else {
+// unimplemented!();
+// }
+
+// Ok(())
+// }
+
+// fn resolve_link(
+// &self,
+// value: &mut serde_json::Value,
+// includes: &serde_json::Value,
+// ) -> Result<(), Box> {
+// let link_type = value["sys"]["linkType"].clone();
+// let link_id = value["sys"]["id"].clone();
+// if link_type == "Entry" {
+// let included_entries = includes["Entry"].as_array().unwrap();
+// let mut filtered_entries = included_entries
+// .iter()
+// .filter(|entry| entry["sys"]["id"] == link_id)
+// .take(1);
+// let linked_entry = filtered_entries.next();
+// if let Some(entry) = linked_entry {
+// let mut entry = entry.clone();
+// self.resolve_entry(&mut entry, includes)?;
+// *value = entry;
+// //value["fields"] = entry["fields"].clone();
+// //*value = entry["fields"].clone();
+// }
+// } else if link_type == "Asset" {
+// let included_assets = includes["Asset"].as_array().unwrap();
+// let mut filtered_assets = included_assets
+// .iter()
+// .filter(|entry| entry["sys"]["id"] == link_id)
+// .take(1);
+// let linked_asset = filtered_assets.next();
+// if let Some(asset) = linked_asset {
+// let mut asset = asset.clone();
+// self.resolve_asset(&mut asset)?;
+// *value = asset;
+// }
+// } else {
+// unimplemented!();
+// }
+
+// //*value = value["fields"].clone();
+// Ok(())
+// }
+//}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RichTextPage {
+ pub title: String,
+ pub page_slug: String,
+ // pub rich_text_content: rich_text::RichTextNode,
+ pub rich_text_content: serde_json::Value,
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RichTextPageLanguagesWrapper {
+ pub internal_title: String,
+ pub english: RichTextPage,
+}
+
+#[server(GetRichTextPage, "/api", "GetJson")]
+pub async fn get_rich_text_page(slug: String) -> Result {
+ let contentful_client = get_contentful_client();
+ // let builder = contentful::QueryBuilder::new()
+ // .content_type_is("richTextPageLanguagesWrapper")
+ // .include(10)
+ // .field_equals("fields.slug", &slug);
+ let query_string = format!("?content_type=richTextPageLanguagesWrapper&include=10&fields.slug={}", slug);
+ let pages = contentful_client.get_entries_by_query_string::(&query_string).await;
+ match pages {
+ Ok(found_pages) => {
+ if found_pages.len() != 1 {
+ return Err(ServerFnError::ServerError("Found none or more than one".to_string()));
+ }
+ let english_rich_text_content = found_pages[0].english.rich_text_content.clone();
+ dbg!(english_rich_text_content);
+ Ok(found_pages[0].clone())
+ },
+ Err(e) => Err(ServerFnError::ServerError(e.to_string())),
+ }
+}
+
+pub fn get_contentful_client() -> contentful::ContentfulClient {
+ let access_token = env::var("CONTENTFUL_ACCESS_TOKEN").unwrap();
+ const SPACE_ID: &str = "e3magj9g6dp1";
+ // let base_url = "https://cdn.contentful.com/spaces";
+ // const ENVIRONMENT_ID: &str = "master";
+ // return Client::new(&access_token, SPACE_ID, base_url, ENVIRONMENT_ID);
+ return contentful::ContentfulClient::new(&access_token, SPACE_ID);
+}
diff --git a/src/services/mod.rs b/src/services/mod.rs
new file mode 100644
index 0000000..1fd78e4
--- /dev/null
+++ b/src/services/mod.rs
@@ -0,0 +1,2 @@
+pub mod contentful;
+pub mod rich_text;
diff --git a/src/services/rich_text.rs b/src/services/rich_text.rs
new file mode 100644
index 0000000..49f4673
--- /dev/null
+++ b/src/services/rich_text.rs
@@ -0,0 +1,193 @@
+use leptos::*;
+use serde::{Deserialize, Serialize};
+use serde_json::Value;
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase", untagged)]
+pub enum RichTextNode {
+ Block {
+ node_type: String,
+ // data: Option,
+ content: Vec,
+ },
+ Text {
+ node_type: String,
+ // data: Option,
+ value: String,
+ // marks: Vec,
+ },
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TextBlock {
+ node_type: String,
+ // data: Option,
+ value: String,
+ // marks: Vec,
+}
+
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct Mark {
+ #[serde(rename = "type")]
+ pub mark_type: String
+}
+
+#[derive(Debug, Clone)]
+struct NodeHandler {
+ node_type: &'static str,
+ function: fn (node: &Value) -> HtmlElement,
+}
+
+const NODE_HANDLERS: [NodeHandler; 12] = [
+ NodeHandler { node_type: "document", function: document_handler },
+ NodeHandler { node_type: "paragraph", function: paragraph_handler },
+ NodeHandler { node_type: "text", function: text_handler },
+ NodeHandler { node_type: "heading-1", function: heading_1_handler },
+ NodeHandler { node_type: "heading-2", function: heading_2_handler },
+ NodeHandler { node_type: "heading-3", function: heading_3_handler },
+ NodeHandler { node_type: "heading-4", function: heading_4_handler },
+ NodeHandler { node_type: "heading-5", function: heading_5_handler },
+ NodeHandler { node_type: "heading-6", function: heading_6_handler },
+ NodeHandler { node_type: "hr", function: hr_handler },
+ NodeHandler { node_type: "blockquote", function: quote_handler },
+ NodeHandler { node_type: "embedded-asset-block", function: asset_handler },
+];
+
+pub fn document_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! {
+
+ {render_children(&children)}
+
+ }.into()
+}
+
+fn paragraph_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! {
+
+ {render_children(&children)}
+
+ }.into()
+}
+
+fn text_handler(node: &Value) -> HtmlElement {
+ let block: TextBlock = serde_json::from_value(node.clone()).unwrap();
+ let text = block.value.replace("\n", " ");
+ view! { {} }.into()
+}
+
+fn heading_1_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn heading_2_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn heading_3_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn heading_4_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn heading_5_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn heading_6_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+fn hr_handler(_node: &Value) -> HtmlElement {
+ view! { }.into()
+}
+
+fn quote_handler(node: &Value) -> HtmlElement {
+ let children: Vec = serde_json::from_value(node["content"].clone()).unwrap();
+ view! { {render_children(&children)} }.into()
+}
+
+
+fn asset_handler(_node: &Value) -> HtmlElement {
+ // let data = node["data"];
+ // let img_url = format!(
+ // "https://images.ctfassets.net/e3magj9g6dp1/14q5L7K0BCol1gx0aCSCck/d1f69bfa404efed6a2dcc71401bbc16d/P5310039-1-2.jpg?w=1600&q=50&fm=avif"
+ // );
+ view! { }.into()
+}
+
+fn empty_handler() -> HtmlElement {
+ view! {
}.into()
+}
+
+fn node_dispatcher(node: &Value) -> HtmlElement {
+ for handler in NODE_HANDLERS.iter() {
+ let node_type = node["nodeType"].clone();
+ if handler.node_type == node_type {
+ return (handler.function)(node)
+ }
+ }
+
+ empty_handler()
+}
+
+fn render_children(children: &Vec) -> Vec> {
+ children.iter().map(|child| node_dispatcher(child)).collect()
+}
+
+// pub fn render_rich_text(rich_text: Value) -> HtmlElement {
+// node_dispatcher(&rich_text)
+// }
+
+// fn _document_handler(node: &RichTextNode) -> HtmlElement {
+// let empty_vec: Vec = Vec::new();
+// let children = match node {
+// RichTextNode::Block{node_type: _, content} => content,
+// // RichTextNode::Block{node_type: _, data: _, content} => content,
+// _ => &empty_vec,
+// };
+// view! {
+//
+// {_render_children(children)}
+//
+// }.into()
+// }
+
+// fn _text_handler(node: &RichTextNode) -> HtmlElement {
+// match node {
+// RichTextNode::Text{node_type: _, value} => view! { {value} }.into(),
+// // RichTextNode::Text{node_type: _, data: _, value, marks} => view! { {value} }.into(),
+// _ => view! { Error }.into(),
+// }
+// }
+
+// fn _node_dispatcher(node: &RichTextNode) -> HtmlElement {
+// for handler in NODE_HANDLERS.iter() {
+// let node_type = match node.clone() {
+// // RichTextNode::Block{node_type, data: _, content: _} => node_type,
+// // RichTextNode::Text{node_type, data: _, value: _, marks: _} => node_type,
+// RichTextNode::Block{node_type, content: _} => node_type,
+// RichTextNode::Text{node_type, value: _} => node_type,
+// };
+// if handler.node_type == node_type {
+// // return (handler.function)(node)
+// }
+// }
+
+// empty_handler()
+// }
+
+// fn _render_children(children: &Vec) -> Vec> {
+// children.iter().map(|child| _node_dispatcher(child)).collect()
+// }
diff --git a/style/main.scss b/style/main.scss
index 3e78070..266d5f7 100644
--- a/style/main.scss
+++ b/style/main.scss
@@ -1,4 +1,4 @@
-$mainGreen: darken(#2E7D32, 10);
+$mainGreen: #2b762f;
$mainGrey: #0F0F0F;
@mixin top-level-padding {
@@ -30,6 +30,7 @@ body {
text-align: left;
font-weight: 300;
font-size: 16px;
+ line-height: 1.4;
background: white;
color: $mainGrey;
@@ -50,6 +51,7 @@ body {
h1, h2, h3, h4, h5, h6 {
font-family: "Roboto Slab", serif;
font-weight: 300;
+ line-height: 1.3;
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
@@ -91,7 +93,7 @@ body {
display: flex;
flex-direction: row;
align-items: center;
- justify-content: center;
+ justify-content: space-between;
gap: 16px;
h1 {
@@ -104,9 +106,11 @@ body {
display: flex;
flex-direction: column;
align-items: flex-end;
+ gap: 8px;
a {
color: white!important;
+ font-size: 22px;
}
}
}
@@ -191,5 +195,62 @@ body {
}
}
}
-
+}
+
+.gallery-wrapper {
+ max-width: 1232px + 32px!important;
+
+ .open-entry {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ margin-top: 32px;
+
+ img {
+ object-fit: contain;
+ width: 100%;
+ max-height: 90vh;
+ max-width: 1232px;
+ align-self: center;
+ }
+
+ h3 {
+ margin-bottom: 8px;
+ }
+
+ p {
+ margin-bottom: 64px;
+ }
+ }
+
+ .gallery {
+ h3 {
+ width: fit-content;
+ }
+
+ ul {
+ width: fit-content;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: center;
+ padding: 0;
+ list-style: none;
+ gap: 16px;
+
+ li {
+
+ img {
+ height: 400px;
+ width: 400px;
+ object-fit: contain;
+
+ @media all and (max-width: 1000px) {
+ height: 300px;
+ width: 300px;
+ }
+ }
+ }
+ }
+ }
}