aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-05-05 23:15:41 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-05-05 23:15:41 +0200
commite7c5dc01cf3bf382c82dd6984808bd3ca21d33a5 (patch)
treeb1f1d6fd9e8bc4814f8c8f541456519660bbe2b1
downloadmacroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.tar.gz
macroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.tar.bz2
macroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.zip
Initial commit
-rw-r--r--.gitignore2
-rw-r--r--Cargo.lock666
-rw-r--r--Cargo.toml16
-rw-r--r--README.md11
-rw-r--r--assets/pico.min.css888
-rw-r--r--src/main.rs45
-rw-r--r--templates/index.html49
-rwxr-xr-xwatch16
8 files changed, 1693 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..96ef862
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+target/
+.idea/
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..d51075f
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,666 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bytes"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "filetime"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "winapi",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "futures-channel"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
+
+[[package]]
+name = "futures-task"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
+
+[[package]]
+name = "futures-util"
+version = "0.3.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "pin-project-lite",
+ "pin-utils",
+]
+
+[[package]]
+name = "h2"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
+dependencies = [
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "http",
+ "indexmap",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "home"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "http"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
+dependencies = [
+ "bytes",
+ "http",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c"
+
+[[package]]
+name = "httpdate"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
+
+[[package]]
+name = "hyper"
+version = "0.14.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-core",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+ "want",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
+name = "itoap"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9028f49264629065d057f340a86acb84867925865f73bbf8d47b4d149a7e88b8"
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.125"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
+
+[[package]]
+name = "lock_api"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "macroblog"
+version = "0.1.0"
+dependencies = [
+ "hyper",
+ "sailfish",
+ "tokio",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "mio"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
+dependencies = [
+ "libc",
+ "log",
+ "miow",
+ "ntapi",
+ "wasi",
+ "winapi",
+]
+
+[[package]]
+name = "miow"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "ntapi"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-sys",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
+dependencies = [
+ "unicode-xid",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
+
+[[package]]
+name = "sailfish"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "948a7edfc2f03d7c58a097dda25ed29440a72e8528894a6e182fe9171195fed1"
+dependencies = [
+ "itoap",
+ "ryu",
+ "sailfish-macros",
+ "version_check",
+]
+
+[[package]]
+name = "sailfish-compiler"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f0a01133d6ce146020e6416ac6a823f813f1cbb30ff77548b4fa20749524947"
+dependencies = [
+ "filetime",
+ "home",
+ "memchr",
+ "proc-macro2",
+ "quote",
+ "serde",
+ "syn",
+ "toml",
+]
+
+[[package]]
+name = "sailfish-macros"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86326c1f1dce0b316e0a47071f683b185417dc64e1a704380b5c706b09e871b1"
+dependencies = [
+ "proc-macro2",
+ "sailfish-compiler",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "serde"
+version = "1.0.137"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.137"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "slab"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32"
+
+[[package]]
+name = "smallvec"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
+
+[[package]]
+name = "socket2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-xid",
+]
+
+[[package]]
+name = "tokio"
+version = "1.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc"
+dependencies = [
+ "bytes",
+ "libc",
+ "memchr",
+ "mio",
+ "num_cpus",
+ "once_cell",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "winapi",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "toml"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
+
+[[package]]
+name = "tracing"
+version = "0.1.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09"
+dependencies = [
+ "cfg-if",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.26"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04"
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "want"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+dependencies = [
+ "log",
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-sys"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
+dependencies = [
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..ecaba6d
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,16 @@
+[package]
+name = "macroblog"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+sailfish = "0.4.0"
+hyper = { version = "0.14", features = ["full"] }
+tokio = { version = "1", features = ["full"] }
+
+[profile.release]
+opt-level = 'z'
+lto = true
+codegen-units = 1
+panic = 'abort'
+strip = true
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d2a4851
--- /dev/null
+++ b/README.md
@@ -0,0 +1,11 @@
+# A single binary blob
+
+After reading [this article](https://www.andreinc.net/2022/04/10/a-blog-that-is-a-single-executable-binary) by Andrei
+Ciobanu it sparkled in me to do the same thing but with rust.
+
+To achieve that I'll be using the following:
+
+- Sailfish for templating
+- hyper for http server
+- rust-embed for adding the files into the binary.
+
diff --git a/assets/pico.min.css b/assets/pico.min.css
new file mode 100644
index 0000000..1179471
--- /dev/null
+++ b/assets/pico.min.css
@@ -0,0 +1,888 @@
+@charset "UTF-8";
+:root {
+ --font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Ubuntu", "Cantarell", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
+ --line-height: 1.5;
+ --font-weight: 400;
+ --font-size: 16px;
+ --border-radius: 0.25rem;
+ --border-width: 1px;
+ --outline-width: 3px;
+ --spacing: 1rem;
+ --typography-spacing-vertical: 1.5rem;
+ --block-spacing-vertical: calc(var(--spacing) * 2);
+ --block-spacing-horizontal: var(--spacing);
+ --grid-spacing-vertical: 0;
+ --grid-spacing-horizontal: var(--spacing);
+ --form-element-spacing-vertical: 0.75rem;
+ --form-element-spacing-horizontal: 1rem;
+ --nav-element-spacing-vertical: 1rem;
+ --nav-element-spacing-horizontal: 0.5rem;
+ --nav-link-spacing-vertical: 0.5rem;
+ --nav-link-spacing-horizontal: 0.5rem;
+ --form-label-font-weight: var(--font-weight);
+ --transition: 0.2s ease-in-out
+}
+
+@media (min-width: 576px) {
+ :root {
+ --font-size: 17px
+ }
+}
+
+@media (min-width: 768px) {
+ :root {
+ --font-size: 18px
+ }
+}
+
+@media (min-width: 992px) {
+ :root {
+ --font-size: 19px
+ }
+}
+
+@media (min-width: 1200px) {
+ :root {
+ --font-size: 20px
+ }
+}
+
+@media (min-width: 576px) {
+ body > footer, body > header, body > main, section {
+ --block-spacing-vertical: calc(var(--spacing) * 2.5)
+ }
+}
+
+@media (min-width: 768px) {
+ body > footer, body > header, body > main, section {
+ --block-spacing-vertical: calc(var(--spacing) * 3)
+ }
+}
+
+@media (min-width: 992px) {
+ body > footer, body > header, body > main, section {
+ --block-spacing-vertical: calc(var(--spacing) * 3.5)
+ }
+}
+
+@media (min-width: 1200px) {
+ body > footer, body > header, body > main, section {
+ --block-spacing-vertical: calc(var(--spacing) * 4)
+ }
+}
+
+@media (min-width: 576px) {
+ article {
+ --block-spacing-horizontal: calc(var(--spacing) * 1.25)
+ }
+}
+
+@media (min-width: 768px) {
+ article {
+ --block-spacing-horizontal: calc(var(--spacing) * 1.5)
+ }
+}
+
+@media (min-width: 992px) {
+ article {
+ --block-spacing-horizontal: calc(var(--spacing) * 1.75)
+ }
+}
+
+@media (min-width: 1200px) {
+ article {
+ --block-spacing-horizontal: calc(var(--spacing) * 2)
+ }
+}
+
+a {
+ --text-decoration: none
+}
+
+h1, h2, h3, h4, h5, h6 {
+ --font-weight: 700
+}
+
+h1 {
+ --font-size: 2rem;
+ --typography-spacing-vertical: 3rem
+}
+
+h2 {
+ --font-size: 1.75rem;
+ --typography-spacing-vertical: 2.625rem
+}
+
+h3 {
+ --font-size: 1.5rem;
+ --typography-spacing-vertical: 2.25rem
+}
+
+h4 {
+ --font-size: 1.25rem;
+ --typography-spacing-vertical: 1.874rem
+}
+
+h5 {
+ --font-size: 1.125rem;
+ --typography-spacing-vertical: 1.6875rem
+}
+
+:root:not([data-theme=dark]), [data-theme=light] {
+ color-scheme: light;
+ --background-color: #fff;
+ --color: #415462;
+ --h1-color: #1b2832;
+ --h2-color: #24333e;
+ --h3-color: #2c3d49;
+ --h4-color: #374956;
+ --h5-color: #415462;
+ --h6-color: #4d606d;
+ --muted-color: #73828c;
+ --muted-border-color: #edf0f3;
+ --primary: #1095c1;
+ --primary-hover: #08769b;
+ --primary-focus: rgba(16, 149, 193, 0.125);
+ --primary-inverse: #fff;
+ --secondary: #596b78;
+ --secondary-hover: #415462;
+ --secondary-focus: rgba(89, 107, 120, 0.125);
+ --secondary-inverse: #fff;
+ --contrast: #1b2832;
+ --contrast-hover: #000;
+ --contrast-focus: rgba(89, 107, 120, 0.125);
+ --contrast-inverse: #fff;
+ --mark-background-color: #fff2ca;
+ --mark-color: #543a26;
+ --ins-color: #388e3c;
+ --del-color: #c62828;
+ --blockquote-border-color: var(--muted-border-color);
+ --blockquote-footer-color: var(--muted-color);
+ --button-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ --button-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0);
+ --form-element-background-color: transparent;
+ --form-element-border-color: #a2afb9;
+ --form-element-color: var(--color);
+ --form-element-placeholder-color: var(--muted-color);
+ --form-element-active-background-color: transparent;
+ --form-element-active-border-color: var(--primary);
+ --form-element-focus-color: var(--primary-focus);
+ --form-element-disabled-background-color: #d5dce2;
+ --form-element-disabled-border-color: #a2afb9;
+ --form-element-disabled-opacity: 0.5;
+ --form-element-invalid-border-color: #c62828;
+ --form-element-invalid-active-border-color: #d32f2f;
+ --form-element-invalid-focus-color: rgba(211, 47, 47, 0.125);
+ --form-element-valid-border-color: #388e3c;
+ --form-element-valid-active-border-color: #43a047;
+ --form-element-valid-focus-color: rgba(67, 160, 71, 0.125);
+ --switch-background-color: #bbc6ce;
+ --switch-color: var(--primary-inverse);
+ --switch-checked-background-color: var(--primary);
+ --range-border-color: #d5dce2;
+ --range-active-border-color: #bbc6ce;
+ --range-thumb-border-color: var(--background-color);
+ --range-thumb-color: var(--secondary);
+ --range-thumb-hover-color: var(--secondary-hover);
+ --range-thumb-active-color: var(--primary);
+ --table-border-color: var(--muted-border-color);
+ --table-row-stripped-background-color: #f6f8f9;
+ --code-background-color: #edf0f3;
+ --code-color: var(--muted-color);
+ --code-kbd-background-color: var(--contrast);
+ --code-kbd-color: var(--contrast-inverse);
+ --code-tag-color: #b34d80;
+ --code-property-color: #3d888f;
+ --code-value-color: #998866;
+ --code-comment-color: #a2afb9;
+ --accordion-border-color: var(--muted-border-color);
+ --accordion-close-summary-color: var(--color);
+ --accordion-open-summary-color: var(--muted-color);
+ --card-background-color: var(--background-color);
+ --card-border-color: var(--muted-border-color);
+ --card-box-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024);
+ --card-sectionning-background-color: #fbfbfc;
+ --dropdown-background-color: #fbfbfc;
+ --dropdown-border-color: #e1e6eb;
+ --dropdown-box-shadow: var(--card-box-shadow);
+ --dropdown-color: var(--color);
+ --dropdown-hover-background-color: #edf0f3;
+ --modal-overlay-background-color: rgba(213, 220, 226, 0.8);
+ --progress-background-color: #d5dce2;
+ --progress-color: var(--primary);
+ --loading-spinner-opacity: 0.5;
+ --tooltip-background-color: var(--contrast);
+ --tooltip-color: var(--contrast-inverse);
+ --icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
+ --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(65, 84, 98, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
+ --icon-chevron-button: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
+ --icon-chevron-button-inverse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
+ --icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(115, 130, 140, 0.999)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
+ --icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(65, 84, 98, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
+ --icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(198, 40, 40, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
+ --icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
+ --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(65, 84, 98, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
+ --icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(65, 84, 98, 0.999)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
+ --icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(56, 142, 60, 0.999)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E")
+}
+
+*, ::after, ::before {
+ box-sizing: border-box;
+ background-repeat: no-repeat
+}
+
+::after, ::before {
+ text-decoration: inherit;
+ vertical-align: inherit
+}
+
+:where(:root) {
+ -webkit-tap-highlight-color: transparent;
+ -webkit-text-size-adjust: 100%;
+ -moz-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+ text-rendering: optimizeLegibility;
+ background-color: var(--background-color);
+ color: var(--color);
+ font-weight: var(--font-weight);
+ font-size: var(--font-size);
+ line-height: var(--line-height);
+ font-family: var(--font-family);
+ overflow-wrap: break-word;
+ cursor: default;
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4
+}
+
+main {
+ display: block
+}
+
+body {
+ width: 100%;
+ margin: 0
+}
+
+body > footer, body > header, body > main {
+ width: 100%;
+ margin-right: auto;
+ margin-left: auto;
+ padding: 1rem
+}
+
+.container, .container-fluid {
+ width: 100%;
+ margin-right: auto;
+ margin-left: auto;
+ padding-right: var(--spacing);
+ padding-left: var(--spacing)
+}
+
+@media (min-width: 576px) {
+ .container {
+ max-width: 510px;
+ padding-right: 0;
+ padding-left: 0
+ }
+}
+
+@media (min-width: 768px) {
+ .container {
+ max-width: 700px
+ }
+}
+
+@media (min-width: 992px) {
+ .container {
+ max-width: 800px
+ }
+}
+
+section {
+ margin-bottom: var(--block-spacing-vertical)
+}
+
+.grid {
+ grid-column-gap: var(--grid-spacing-horizontal);
+ grid-row-gap: var(--grid-spacing-vertical);
+ display: grid;
+ grid-template-columns:1fr;
+ margin: 0
+}
+
+@media (min-width: 992px) {
+ .grid {
+ grid-template-columns:repeat(auto-fit, minmax(0%, 1fr))
+ }
+}
+
+.grid > * {
+ min-width: 0
+}
+
+b, strong {
+ font-weight: bolder
+}
+
+address, blockquote, dl, figure, form, ol, p, pre, table, ul {
+ margin-top: 0;
+ margin-bottom: var(--typography-spacing-vertical);
+ color: var(--color);
+ font-style: normal;
+ font-weight: var(--font-weight);
+ font-size: var(--font-size)
+}
+
+[role=link], a {
+ --color: var(--primary);
+ --background-color: transparent;
+ outline: 0;
+ background-color: var(--background-color);
+ color: var(--color);
+ -webkit-text-decoration: var(--text-decoration);
+ text-decoration: var(--text-decoration);
+ transition: background-color var(--transition), color var(--transition), box-shadow var(--transition), -webkit-text-decoration var(--transition);
+ transition: background-color var(--transition), color var(--transition), text-decoration var(--transition), box-shadow var(--transition);
+ transition: background-color var(--transition), color var(--transition), text-decoration var(--transition), box-shadow var(--transition), -webkit-text-decoration var(--transition)
+}
+
+[role=link]:is([aria-current],:hover,:active,:focus), a:is([aria-current],:hover,:active,:focus) {
+ --color: var(--primary-hover);
+ --text-decoration: underline
+}
+
+[role=link]:focus, a:focus {
+ --background-color: var(--primary-focus)
+}
+
+[role=link].secondary, a.secondary {
+ --color: var(--secondary)
+}
+
+[role=link].secondary:is([aria-current],:hover,:active,:focus), a.secondary:is([aria-current],:hover,:active,:focus) {
+ --color: var(--secondary-hover)
+}
+
+[role=link].secondary:focus, a.secondary:focus {
+ --background-color: var(--secondary-focus)
+}
+
+[role=link].contrast, a.contrast {
+ --color: var(--contrast)
+}
+
+[role=link].contrast:is([aria-current],:hover,:active,:focus), a.contrast:is([aria-current],:hover,:active,:focus) {
+ --color: var(--contrast-hover)
+}
+
+[role=link].contrast:focus, a.contrast:focus {
+ --background-color: var(--contrast-focus)
+}
+
+h1, h2, h3, h4, h5, h6 {
+ margin-top: 0;
+ margin-bottom: var(--typography-spacing-vertical);
+ color: var(--color);
+ font-weight: var(--font-weight);
+ font-size: var(--font-size);
+ font-family: var(--font-family)
+}
+
+h1 {
+ --color: var(--h1-color)
+}
+
+h2 {
+ --color: var(--h2-color)
+}
+
+h3 {
+ --color: var(--h3-color)
+}
+
+h4 {
+ --color: var(--h4-color)
+}
+
+h5 {
+ --color: var(--h5-color)
+}
+
+h6 {
+ --color: var(--h6-color)
+}
+
+:where(address,blockquote,dl,figure,form,ol,p,pre,table,ul) ~ :is(h1,h2,h3,h4,h5,h6) {
+ margin-top: var(--typography-spacing-vertical)
+}
+
+.headings, hgroup {
+ margin-bottom: var(--typography-spacing-vertical)
+}
+
+.headings > *, hgroup > * {
+ margin-bottom: 0
+}
+
+.headings > :last-child, hgroup > :last-child {
+ --color: var(--muted-color);
+ --font-weight: unset;
+ font-size: 1rem;
+ font-family: unset
+}
+
+p {
+ margin-bottom: var(--typography-spacing-vertical)
+}
+
+:where(dl,ol,ul) {
+ padding-right: 0;
+ padding-left: var(--spacing);
+ -webkit-padding-start: var(--spacing);
+ padding-inline-start: var(--spacing);
+ -webkit-padding-end: 0;
+ padding-inline-end: 0
+}
+
+:where(dl,ol,ul) li {
+ margin-bottom: calc(var(--typography-spacing-vertical) * .25)
+}
+
+:where(dl,ol,ul):is(dl,ol,ul) {
+ margin: calc(var(--typography-spacing-vertical) * .25) 0 0
+}
+
+ul li {
+ list-style: none
+}
+
+mark {
+ padding: 0.125rem 0.25rem;
+ background-color: var(--mark-background-color);
+ color: var(--mark-color);
+ vertical-align: baseline
+}
+
+abbr[title] {
+ border-bottom: 1px dotted;
+ text-decoration: none;
+ cursor: help
+}
+
+::-moz-selection {
+ background-color: var(--primary-focus)
+}
+
+::selection {
+ background-color: var(--primary-focus)
+}
+
+:where(audio,canvas,iframe,img,svg,video) {
+ vertical-align: middle
+}
+
+legend {
+ max-width: 100%;
+ padding: 0;
+ color: inherit;
+ white-space: normal
+}
+
+::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
+ height: auto
+}
+
+fieldset legend, label {
+ display: block;
+ margin-bottom: calc(var(--spacing) * .25);
+ font-weight: var(--form-label-font-weight, var(--font-weight))
+}
+
+[type=color]::-webkit-color-swatch-wrapper {
+ padding: 0
+}
+
+code, kbd, pre, samp {
+ font-size: 0.875em;
+ font-family: var(--font-family)
+}
+
+pre {
+ -ms-overflow-style: scrollbar;
+ overflow: auto
+}
+
+code, kbd, pre {
+ border-radius: var(--border-radius);
+ background: var(--code-background-color);
+ color: var(--code-color);
+ font-weight: var(--font-weight);
+ line-height: initial
+}
+
+code, kbd {
+ display: inline-block;
+ padding: 0.375rem 0.5rem
+}
+
+pre {
+ display: block;
+ margin-bottom: var(--spacing);
+ overflow-x: auto
+}
+
+pre > code {
+ display: block;
+ padding: var(--spacing);
+ background: 0 0;
+ font-size: 14px;
+ line-height: var(--line-height)
+}
+
+code b {
+ color: var(--code-tag-color);
+ font-weight: var(--font-weight)
+}
+
+code i {
+ color: var(--code-property-color);
+ font-style: normal
+}
+
+code u {
+ color: var(--code-value-color);
+ text-decoration: none
+}
+
+code em {
+ color: var(--code-comment-color);
+ font-style: normal
+}
+
+kbd {
+ background-color: var(--code-kbd-background-color);
+ color: var(--code-kbd-color);
+ vertical-align: baseline
+}
+
+hr {
+ height: 0;
+ border: 0;
+ border-top: 1px solid var(--muted-border-color);
+ color: inherit
+}
+
+[hidden], template {
+ display: none !important
+}
+
+article {
+ margin: var(--block-spacing-vertical) 0;
+ padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
+ border-radius: var(--border-radius);
+ background: var(--card-background-color);
+ box-shadow: var(--card-box-shadow)
+}
+
+article > footer, article > header {
+ margin-right: calc(var(--block-spacing-horizontal) * -1);
+ margin-left: calc(var(--block-spacing-horizontal) * -1);
+ padding: calc(var(--block-spacing-vertical) * .66) var(--block-spacing-horizontal);
+ background-color: var(--card-sectionning-background-color)
+}
+
+article > header {
+ margin-top: calc(var(--block-spacing-vertical) * -1);
+ margin-bottom: var(--block-spacing-vertical);
+ border-bottom: var(--border-width) solid var(--card-border-color)
+}
+
+article > footer {
+ margin-top: var(--block-spacing-vertical);
+ margin-bottom: calc(var(--block-spacing-vertical) * -1);
+ border-top: var(--border-width) solid var(--card-border-color)
+}
+
+:root {
+ --scrollbar-width: 0
+}
+
+dialog article {
+ max-height: calc(100vh - var(--spacing) * 2);
+ overflow: auto
+}
+
+@media (min-width: 576px) {
+ dialog article {
+ max-width: 510px
+ }
+}
+
+@media (min-width: 768px) {
+ dialog article {
+ max-width: 700px
+ }
+}
+
+dialog article > footer, dialog article > header {
+ padding: calc(var(--block-spacing-vertical) * .5) var(--block-spacing-horizontal)
+}
+
+dialog article > header .close {
+ margin: 0 0 0 var(--spacing);
+ float: right
+}
+
+dialog article > footer {
+ text-align: right
+}
+
+dialog article > footer [role=button] {
+ margin-bottom: 0
+}
+
+dialog article > footer [role=button]:not(:first-of-type) {
+ margin-left: calc(var(--spacing) * .5)
+}
+
+dialog article p:last-of-type {
+ margin: 0
+}
+
+dialog article .close {
+ display: block;
+ width: 1rem;
+ height: 1rem;
+ margin-top: calc(var(--block-spacing-vertical) * -.5);
+ margin-bottom: var(--typography-spacing-vertical);
+ margin-left: auto;
+ background-image: var(--icon-close);
+ background-position: center;
+ background-size: auto 1rem;
+ background-repeat: no-repeat;
+ opacity: 0.5;
+ transition: opacity var(--transition)
+}
+
+dialog article .close:is([aria-current],:hover,:active,:focus) {
+ opacity: 1
+}
+
+dialog:not([open]), dialog[open=false] {
+ display: none
+}
+
+.modal-is-open {
+ padding-right: var(--scrollbar-width, 0);
+ overflow: hidden;
+ pointer-events: none
+}
+
+.modal-is-open dialog {
+ pointer-events: auto
+}
+
+:where(.modal-is-opening,.modal-is-closing) dialog, :where(.modal-is-opening,.modal-is-closing) dialog > article {
+ -webkit-animation-duration: 0.2s;
+ animation-duration: 0.2s;
+ -webkit-animation-timing-function: ease-in-out;
+ animation-timing-function: ease-in-out;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both
+}
+
+:where(.modal-is-opening,.modal-is-closing) dialog {
+ -webkit-animation-duration: 0.8s;
+ animation-duration: 0.8s;
+ -webkit-animation-name: fadeIn;
+ animation-name: fadeIn
+}
+
+:where(.modal-is-opening,.modal-is-closing) dialog > article {
+ -webkit-animation-delay: 0.2s;
+ animation-delay: 0.2s;
+ -webkit-animation-name: slideInDown;
+ animation-name: slideInDown
+}
+
+.modal-is-closing dialog, .modal-is-closing dialog > article {
+ -webkit-animation-delay: 0s;
+ animation-delay: 0s;
+ animation-direction: reverse
+}
+
+:where(nav li)::before {
+ float: left;
+ content: "​"
+}
+
+nav, nav ul {
+ display: flex
+}
+
+nav {
+ justify-content: space-between
+}
+
+nav ol, nav ul {
+ align-items: center;
+ margin-bottom: 0;
+ padding: 0;
+ list-style: none
+}
+
+nav ol:first-of-type, nav ul:first-of-type {
+ margin-left: calc(var(--nav-element-spacing-horizontal) * -1)
+}
+
+nav ol:last-of-type, nav ul:last-of-type {
+ margin-right: calc(var(--nav-element-spacing-horizontal) * -1)
+}
+
+nav li {
+ display: inline-block;
+ margin: 0;
+ padding: var(--nav-element-spacing-vertical) var(--nav-element-spacing-horizontal)
+}
+
+nav li > * {
+ --spacing: 0
+}
+
+nav:where(a,[role=link]) {
+ display: inline-block;
+ margin: calc(var(--nav-link-spacing-vertical) * -1) calc(var(--nav-link-spacing-horizontal) * -1);
+ padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);
+ border-radius: var(--border-radius);
+ text-decoration: none
+}
+
+nav:where(a,[role=link]):is([aria-current],:hover,:active,:focus) {
+ text-decoration: none
+}
+
+nav [role=button] {
+ margin-right: inherit;
+ margin-left: inherit;
+ padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal)
+}
+
+details[role=list], li[role=list] {
+ position: relative
+}
+
+details[role=list] summary + ul, li[role=list] > ul {
+ display: flex;
+ z-index: 99;
+ position: absolute;
+ top: auto;
+ right: 0;
+ left: 0;
+ flex-direction: column;
+ margin: 0;
+ padding: 0;
+ border: var(--border-width) solid var(--dropdown-border-color);
+ border-radius: var(--border-radius);
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+ background-color: var(--dropdown-background-color);
+ box-shadow: var(--card-box-shadow);
+ color: var(--dropdown-color);
+ white-space: nowrap
+}
+
+details[role=list] summary + ul li, li[role=list] > ul li {
+ width: 100%;
+ margin-bottom: 0;
+ padding: calc(var(--form-element-spacing-vertical) * .5) var(--form-element-spacing-horizontal);
+ list-style: none
+}
+
+details[role=list] summary + ul li:first-of-type, li[role=list] > ul li:first-of-type {
+ margin-top: calc(var(--form-element-spacing-vertical) * .5)
+}
+
+details[role=list] summary + ul li:last-of-type, li[role=list] > ul li:last-of-type {
+ margin-bottom: calc(var(--form-element-spacing-vertical) * .5)
+}
+
+details[role=list] summary + ul li a, li[role=list] > ul li a {
+ display: block;
+ margin: calc(var(--form-element-spacing-vertical) * -.5) calc(var(--form-element-spacing-horizontal) * -1);
+ padding: calc(var(--form-element-spacing-vertical) * .5) var(--form-element-spacing-horizontal);
+ overflow: hidden;
+ color: var(--dropdown-color);
+ text-decoration: none;
+ text-overflow: ellipsis
+}
+
+details[role=list] summary + ul li a:hover, li[role=list] > ul li a:hover {
+ background-color: var(--dropdown-hover-background-color)
+}
+
+details[role=list] summary::after, li[role=list] > a::after {
+ display: block;
+ width: 1rem;
+ height: calc(1rem * var(--line-height, 1.5));
+ -webkit-margin-start: 0.5rem;
+ margin-inline-start: 0.5rem;
+ float: right;
+ transform: rotate(0);
+ background-position: right center;
+ background-size: 1rem auto;
+ background-repeat: no-repeat;
+ content: ""
+}
+
+nav details[role=list] summary + ul, nav li[role=list] > ul {
+ min-width: -webkit-fit-content;
+ min-width: -moz-fit-content;
+ min-width: fit-content;
+ border-radius: var(--border-radius)
+}
+
+nav details[role=list] summary + ul li a, nav li[role=list] > ul li a {
+ border-radius: 0
+}
+
+nav details[role=list] summary, nav details[role=list] summary:not([role]) {
+ height: auto;
+ padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal)
+}
+
+nav details[role=list][open] summary {
+ border-radius: var(--border-radius)
+}
+
+nav details[role=list] summary + ul {
+ margin-top: var(--outline-width);
+ -webkit-margin-start: 0;
+ margin-inline-start: 0
+}
+
+nav details[role=list] summary[role=link] {
+ margin-bottom: calc(var(--nav-link-spacing-vertical) * -1);
+ line-height: var(--line-height)
+}
+
+nav details[role=list] summary[role=link] + ul {
+ margin-top: calc(var(--nav-link-spacing-vertical) + var(--outline-width));
+ -webkit-margin-start: calc(var(--nav-link-spacing-horizontal) * -1);
+ margin-inline-start: calc(var(--nav-link-spacing-horizontal) * -1)
+}
+
+li[role=list] a:active ~ ul, li[role=list] a:focus ~ ul, li[role=list]:hover > ul {
+ display: flex
+}
+
+li[role=list] > ul {
+ display: none;
+ margin-top: calc(var(--nav-link-spacing-vertical) + var(--outline-width));
+ -webkit-margin-start: calc(var(--nav-element-spacing-horizontal) - var(--nav-link-spacing-horizontal));
+ margin-inline-start: calc(var(--nav-element-spacing-horizontal) - var(--nav-link-spacing-horizontal))
+}
+
+li[role=list] > a::after {
+ background-image: var(--icon-chevron)
+}
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..0c3565b
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,45 @@
+use std::convert::Infallible;
+use std::{include_str};
+use std::net::SocketAddr;
+use hyper::{Body, Request, Response, Server};
+use hyper::service::{make_service_fn, service_fn};
+use sailfish::TemplateOnce;
+
+
+#[derive(TemplateOnce)]
+#[template(path = "index.html")]
+struct IndexTemplate {
+ pico: &'static str,
+}
+
+const PICO_CSS: &str = include_str!("../assets/pico.min.css");
+
+async fn hello_world(_req: Request<Body>) -> Result<Response<Body>, Infallible> {
+ let body = IndexTemplate { pico: PICO_CSS }
+ .render_once()
+ .unwrap();
+
+ let resp: Response<Body> = Response::builder()
+ .status(200)
+ .header("content-type", "text/html")
+ .body(body.into())
+ .unwrap();
+
+ Ok(resp)
+}
+
+
+#[tokio::main]
+async fn main() {
+ let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
+
+ let make_svc = make_service_fn(|_conn| async {
+ Ok::<_, Infallible>(service_fn(hello_world))
+ });
+
+ let server = Server::bind(&addr).serve(make_svc);
+
+ if let Err(e) = server.await {
+ eprintln!("server error: {}", e);
+ }
+}
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..90826de
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html data-theme="light" lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Yet Another Blog</title>
+ <style>
+ <%- pico %>
+ </style>
+</head>
+<body>
+<header class="container">
+ <nav class="container-fluid">
+ <ul>
+ <li><strong>Yet Another Blog</strong></li>
+ </ul>
+ <ul>
+ <li><a class="secondary">Posts</a></li>
+ <li><a class="secondary">Projects</a></li>
+ <li><a class="secondary">Resume</a></li>
+ </ul>
+ </nav>
+ <hgroup>
+ <h2>
+ A gathering of information about some things I do on my spare time. You can find me on gitlab , twitter and
+ linkedin .
+ </h2>
+ </hgroup>
+</header>
+
+<main class="container">
+ <section>
+ <ul>
+ <li><a>K8S private gitlab registry using podman</a></li>
+ <li><a>K8S private gitlab registry using podman</a></li>
+ </ul>
+ </section>
+ <section>
+ <h2>Title</h2>
+ <p>
+ Nice content
+ <code>
+ My code here
+ </code>
+ </p>
+ </section>
+</main>
+</body>
+</html> \ No newline at end of file
diff --git a/watch b/watch
new file mode 100755
index 0000000..9f5acdb
--- /dev/null
+++ b/watch
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+sigint_handler()
+{
+ kill $PID
+ exit
+}
+
+trap sigint_handler SIGINT
+
+while true; do
+ cargo run &
+ PID=$!
+ inotifywait -e modify -e move -e create -e delete -e attrib -r src/ templates/ assets/
+ kill $PID
+done