From f851c569f95133ca159644685fadcf3b274bd41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 11 Oct 2020 14:40:14 +0200 Subject: [PATCH] split css into a separate file, update actix versions --- Cargo.lock | 714 ++++++++++++++++++++++++++------------------ Cargo.toml | 10 +- src/main.rs | 1 + templates/main.css | 97 ++++++ templates/main.html | 100 +------ 5 files changed, 524 insertions(+), 398 deletions(-) create mode 100644 templates/main.css diff --git a/Cargo.lock b/Cargo.lock index 22fbf29..e6f9499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,44 +2,29 @@ # It is not intended for manual editing. [[package]] name = "actix" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4af87564ff659dee8f9981540cac9418c45e910c8072fdedd643a262a38fcaf" +checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" dependencies = [ - "actix-http", "actix-rt", - "actix_derive 0.5.0", + "actix_derive", "bitflags", "bytes", "crossbeam-channel", "derive_more", - "futures", - "lazy_static", + "futures-channel", + "futures-util", "log", - "parking_lot 0.10.2", + "once_cell", + "parking_lot", "pin-project", "smallvec", "tokio", - "tokio-util 0.2.0", + "tokio-util", "trust-dns-proto", "trust-dns-resolver", ] -[[package]] -name = "actix-codec" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e55f0a5c2ca15795035d90c46bd0e73a5123b72f68f12596d6ba5282051380" -dependencies = [ - "bitflags", - "bytes", - "futures-core", - "futures-sink", - "log", - "tokio", - "tokio-util 0.2.0", -] - [[package]] name = "actix-codec" version = "0.3.0" @@ -53,22 +38,22 @@ dependencies = [ "log", "pin-project", "tokio", - "tokio-util 0.3.1", + "tokio-util", ] [[package]] name = "actix-connect" -version = "1.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95cc9569221e9802bf4c377f6c18b90ef10227d787611decf79fd47d2a8e76c" +checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ - "actix-codec 0.2.0", + "actix-codec", "actix-rt", "actix-service", - "actix-utils 1.0.6", + "actix-utils", "derive_more", "either", - "futures", + "futures-util", "http", "log", "trust-dns-proto", @@ -77,11 +62,10 @@ dependencies = [ [[package]] name = "actix-files" -version = "0.2.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193b22cb1f7b4ff12a4eb2415d6d19e47e44ea93e05930b30d05375ea29d3529" +checksum = "5fc0a9181e93c91dc7eb401a0debaed5c8294e12019c307c72fd7a1731b672fc" dependencies = [ - "actix-http", "actix-service", "actix-web", "bitflags", @@ -98,26 +82,25 @@ dependencies = [ [[package]] name = "actix-http" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019" +checksum = "05dd80ba8f27c4a34357c07e338c8f5c38f8520e6d626ca1727d8fecc41b0cab" dependencies = [ - "actix-codec 0.2.0", + "actix-codec", "actix-connect", "actix-rt", "actix-service", "actix-threadpool", - "actix-utils 1.0.6", + "actix-utils", "base64", "bitflags", "brotli2", "bytes", - "chrono", + "cookie", "copyless", "derive_more", "either", "encoding_rs", - "failure", "flate2", "futures-channel", "futures-core", @@ -127,6 +110,7 @@ dependencies = [ "http", "httparse", "indexmap", + "itoa", "language-tags", "lazy_static", "log", @@ -138,9 +122,9 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sha1", + "sha-1 0.9.1", "slab", - "time", + "time 0.2.22", ] [[package]] @@ -149,8 +133,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a60f9ba7c4e6df97f3aacb14bb5c0cd7d98a49dcbaed0d7f292912ad9a6a3ed2" dependencies = [ - "quote 1.0.7", - "syn 1.0.42", + "quote", + "syn", ] [[package]] @@ -187,10 +171,10 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ - "actix-codec 0.3.0", + "actix-codec", "actix-rt", "actix-service", - "actix-utils 2.0.0", + "actix-utils", "futures-channel", "futures-util", "log", @@ -236,42 +220,20 @@ dependencies = [ "lazy_static", "log", "num_cpus", - "parking_lot 0.11.0", + "parking_lot", "threadpool", ] [[package]] name = "actix-tls" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e5b4faaf105e9a6d389c606c298dcdb033061b00d532af9df56ff3a54995a8" +checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" dependencies = [ - "actix-codec 0.2.0", - "actix-rt", + "actix-codec", "actix-service", - "actix-utils 1.0.6", - "derive_more", - "either", - "futures", - "log", -] - -[[package]] -name = "actix-utils" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e" -dependencies = [ - "actix-codec 0.2.0", - "actix-rt", - "actix-service", - "bitflags", - "bytes", - "either", - "futures", - "log", - "pin-project", - "slab", + "actix-utils", + "futures-util", ] [[package]] @@ -280,7 +242,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ - "actix-codec 0.3.0", + "actix-codec", "actix-rt", "actix-service", "bitflags", @@ -296,11 +258,11 @@ dependencies = [ [[package]] name = "actix-web" -version = "2.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3158e822461040822f0dbf1735b9c2ce1f95f93b651d7a7aded00b1efbb1f635" +checksum = "c1b12fe25e11cd9ed2ef2e428427eb6178a1b363f3f7f0dab8278572f11b2da1" dependencies = [ - "actix-codec 0.2.0", + "actix-codec", "actix-http", "actix-macros", "actix-router", @@ -310,46 +272,38 @@ dependencies = [ "actix-testing", "actix-threadpool", "actix-tls", - "actix-utils 1.0.6", + "actix-utils", "actix-web-codegen", "awc", "bytes", "derive_more", "encoding_rs", - "futures", + "futures-channel", + "futures-core", + "futures-util", "fxhash", "log", "mime", - "net2", "pin-project", "regex", "serde", "serde_json", "serde_urlencoded", - "time", + "socket2", + "time 0.2.22", + "tinyvec 1.0.1", "url", ] [[package]] name = "actix-web-codegen" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a71bf475cbe07281d0b3696abb48212db118e7e23219f13596ce865235ff5766" +checksum = "750ca8fb60bbdc79491991650ba5d2ae7cd75f3fc00ead51390cfe9efda0d4d8" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", -] - -[[package]] -name = "actix_derive" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e9431455322ae393d43a2ba1ef96b8080573c0fc23b196219efedfb6ba69" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -358,9 +312,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -414,9 +368,9 @@ version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -438,11 +392,11 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "awc" -version = "1.0.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7601d4d1d7ef2335d6597a41b5fe069f6ab799b85f53565ab390e7b7065aac5" +checksum = "150e00c06683ab44c5f97d033950e5d87a7a042d06d77f5eecb443cbd23d0575" dependencies = [ - "actix-codec 0.2.0", + "actix-codec", "actix-http", "actix-rt", "actix-service", @@ -474,10 +428,16 @@ dependencies = [ ] [[package]] -name = "base64" -version = "0.11.0" +name = "base-x" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +checksum = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" [[package]] name = "bitflags" @@ -494,7 +454,16 @@ dependencies = [ "block-padding", "byte-tools", "byteorder", - "generic-array", + "generic-array 0.12.3", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array 0.14.4", ] [[package]] @@ -535,6 +504,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "buf-min" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6ae7069aad07c7cdefe6a22a671f00650728bd2331a4cc62e1e5d0becdf9ca4" +dependencies = [ + "bytes", +] + +[[package]] +name = "bumpalo" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" + [[package]] name = "byte-tools" version = "0.3.1" @@ -583,7 +567,7 @@ dependencies = [ "libc", "num-integer", "num-traits", - "time", + "time 0.1.44", "winapi 0.3.9", ] @@ -612,15 +596,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "cloudabi" version = "0.1.0" @@ -630,12 +605,35 @@ dependencies = [ "bitflags", ] +[[package]] +name = "const_fn" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce90df4c658c62f12d78f7508cf92f9173e5184a539c10bfe54a3107b3ffd0f2" + +[[package]] +name = "cookie" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1373a16a4937bc34efec7b391f9c1500c30b8478a701a4f44c9165cc0475a6e0" +dependencies = [ + "percent-encoding", + "time 0.2.22", + "version_check 0.9.2", +] + [[package]] name = "copyless" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" +[[package]] +name = "cpuid-bool" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" + [[package]] name = "crc32fast" version = "1.2.0" @@ -672,9 +670,9 @@ version = "0.99.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -689,9 +687,24 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "generic-array", + "generic-array 0.12.3", ] +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array 0.14.4", +] + +[[package]] +name = "discard" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" + [[package]] name = "dtoa" version = "0.4.6" @@ -720,9 +733,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" dependencies = [ "heck", - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -738,28 +751,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", - "synstructure", -] - [[package]] name = "fake-simd" version = "0.1.2" @@ -808,7 +799,6 @@ checksum = "5d8e3078b7b2a8a671cb7a3d17b4760e4181ea243227776ba83fd043b4ca034e" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -831,17 +821,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d674eaa0056896d5ada519900dbf97ead2e46a7b6621e8160d79e2f2e1e2784b" -[[package]] -name = "futures-executor" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc709ca1da6f66143b8c9bec8e6260181869893714e9b5a490b169b0414144ab" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.6" @@ -855,9 +834,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f57ed14da4603b2554682e9f2ff3c65d7567b53188db96cb71538217fc64581b" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -912,7 +891,7 @@ dependencies = [ "actix-files", "actix-rt", "actix-web", - "actix_derive 0.3.2", + "actix_derive", "anyhow", "chrono", "clap", @@ -934,6 +913,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "generic-array" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +dependencies = [ + "typenum", + "version_check 0.9.2", +] + [[package]] name = "getopts" version = "0.2.21" @@ -999,7 +988,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.3.1", + "tokio-util", "tracing", ] @@ -1188,15 +1177,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.1" @@ -1391,14 +1371,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] -name = "parking_lot" -version = "0.10.2" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parking_lot" @@ -1407,22 +1383,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" dependencies = [ "instant", - "lock_api 0.4.1", - "parking_lot_core 0.8.0", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if", - "cloudabi 0.0.3", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -1432,7 +1394,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" dependencies = [ "cfg-if", - "cloudabi 0.1.0", + "cloudabi", "instant", "libc", "redox_syscall", @@ -1482,9 +1444,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1495,7 +1457,7 @@ checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" dependencies = [ "maplit", "pest", - "sha-1", + "sha-1 0.8.2", ] [[package]] @@ -1513,9 +1475,9 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82fb1329f632c3552cf352d14427d57a511b1cf41db93b3a7d77906a82dcc8e" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1548,22 +1510,13 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.2.1", + "unicode-xid", ] [[package]] @@ -1584,22 +1537,13 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ - "proc-macro2 1.0.24", + "proc-macro2", ] [[package]] @@ -1683,6 +1627,15 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2610b7f643d18c87dff3b489950269617e6601a51f1f05aa5daefee36f64f0b" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1704,6 +1657,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" version = "1.0.116" @@ -1719,9 +1687,9 @@ version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1753,10 +1721,23 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" dependencies = [ - "block-buffer", - "digest", + "block-buffer 0.7.3", + "digest 0.8.1", "fake-simd", - "opaque-debug", + "opaque-debug 0.2.3", +] + +[[package]] +name = "sha-1" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpuid-bool", + "digest 0.9.0", + "opaque-debug 0.3.0", ] [[package]] @@ -1808,44 +1789,79 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "standback" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e0831040d2cf2bdfd51b844be71885783d489898a192f254ae25d57cce725c" +dependencies = [ + "version_check 0.9.2", +] + +[[package]] +name = "stdweb" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" +dependencies = [ + "discard", + "rustc_version", + "stdweb-derive", + "stdweb-internal-macros", + "stdweb-internal-runtime", + "wasm-bindgen", +] + +[[package]] +name = "stdweb-derive" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_derive", + "syn", +] + +[[package]] +name = "stdweb-internal-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" +dependencies = [ + "base-x", + "proc-macro2", + "quote", + "serde", + "serde_derive", + "serde_json", + "sha1", + "syn", +] + +[[package]] +name = "stdweb-internal-runtime" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" + [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "unicode-xid 0.2.1", -] - -[[package]] -name = "synstructure" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" -dependencies = [ - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", - "unicode-xid 0.2.1", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -1888,6 +1904,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "thiserror" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "thread_local" version = "1.0.1" @@ -1917,12 +1953,65 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b7151c9065e80917fbf285d9a5d1432f60db41d170ccafc749a136b41a93af" +dependencies = [ + "const_fn", + "libc", + "standback", + "stdweb", + "time-macros", + "version_check 0.9.2", + "winapi 0.3.9", +] + +[[package]] +name = "time-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" +dependencies = [ + "proc-macro-hack", + "time-macros-impl", +] + +[[package]] +name = "time-macros-impl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "standback", + "syn", +] + [[package]] name = "tinyvec" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +[[package]] +name = "tinyvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b78a366903f506d2ad52ca8dc552102ffdd3e937ba8a227f024dc1d1eae28575" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + [[package]] name = "tokio" version = "0.2.22" @@ -1944,20 +2033,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "tokio-util" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-util" version = "0.3.1" @@ -1966,6 +2041,7 @@ checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" dependencies = [ "bytes", "futures-core", + "futures-io", "futures-sink", "log", "pin-project-lite", @@ -1995,32 +2071,32 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.18.0-alpha.2" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a7f3a2ab8a919f5eca52a468866a67ed7d3efa265d48a652a9a3452272b413f" +checksum = "cdd7061ba6f4d4d9721afedffbfd403f20f39a4301fee1b70d6fcd09cca69f28" dependencies = [ "async-trait", + "backtrace", "enum-as-inner", - "failure", "futures", "idna", "lazy_static", "log", "rand", "smallvec", - "socket2", + "thiserror", "tokio", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.18.0-alpha.2" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f90b1502b226f8b2514c6d5b37bafa8c200d7ca4102d57dc36ee0f3b7a04a2f" +checksum = "0f23cdfdc3d8300b3c50c9e84302d3bd6d860fb9529af84ace6cf9665f181b77" dependencies = [ + "backtrace", "cfg-if", - "failure", "futures", "ipconfig", "lazy_static", @@ -2028,6 +2104,7 @@ dependencies = [ "lru-cache", "resolv-conf", "smallvec", + "thiserror", "tokio", "trust-dns-proto", ] @@ -2118,7 +2195,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" dependencies = [ - "tinyvec", + "tinyvec 0.3.4", ] [[package]] @@ -2133,12 +2210,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.1" @@ -2158,30 +2229,31 @@ dependencies = [ [[package]] name = "v_escape" -version = "0.7.4" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660b101c07b5d0863deb9e7fb3138777e858d6d2a79f9e6049a27d1cc77c6da6" +checksum = "5b6314c83e6ae8556969799ae20138813dfc3d0959c16208d867cbdd7fe73eb3" dependencies = [ + "buf-min", "v_escape_derive", ] [[package]] name = "v_escape_derive" -version = "0.5.6" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ca2a14bc3fc5b64d188b087a7d3a927df87b152e941ccfbc66672e20c467ae" +checksum = "b84a391de8678b76ec6c1ff762a77688a6132f6ea58a35c744afd8ad070786c2" dependencies = [ "nom", - "proc-macro2 1.0.24", - "quote 1.0.7", - "syn 1.0.42", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "v_htmlescape" -version = "0.4.5" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33e939c0d8cf047514fb6ba7d5aac78bc56677a6938b2ee67000b91f2e97e41" +checksum = "42ed178900cccc57f65a0f6515376b8673a2f165ddfa0b509c708c761a372b4b" dependencies = [ "cfg-if", "v_escape", @@ -2228,6 +2300,60 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasm-bindgen" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" + [[package]] name = "widestring" version = "0.4.3" diff --git a/Cargo.toml b/Cargo.toml index 09f8e11..016e522 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,11 @@ anyhow = "1.0" env_logger = "0.7.1" log = "0.4" -actix = "0.9.0" -actix-files = "0.2.2" -actix-rt = "1.0.0" -actix-web = "2.0" -actix_derive = "0.3.2" +actix = "0.10" +actix-files = "0.4" +actix-rt = "1.1" +actix-web = "3.1" +actix_derive = "0.5" pulldown-cmark = "0.8.0" diff --git a/src/main.rs b/src/main.rs index 8601741..9682649 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,6 +89,7 @@ fn main() -> anyhow::Result<()> { App::new() .wrap(middleware::Logger::default()) .data(state.clone()) + .service(actix_files::Files::new("/static", "templates")) .service(render) }) .bind(&bind)? diff --git a/templates/main.css b/templates/main.css new file mode 100644 index 0000000..a0a1f22 --- /dev/null +++ b/templates/main.css @@ -0,0 +1,97 @@ +body { + font-family: 'Montserrat', sans-serif; +} + +h1, h2, h3, h4, h5 { + font-family: 'Merriweather', serif; +} + +body { + display: flex; +} + +img { + max-width: 100%; + max-height: 100vh; +} + +blockquote { + margin: 0; + padding-left: 2em; + border-left: 3px solid lightgray; +} + +aside h1 { + font-size: 16pt; + text-decoration: underline; + font-variant: small-caps; +} + +main { + flex-grow: 1; +} + +nav, main { + padding: 0 2em; +} + +@media screen and (max-width: 800px) { + body { + flex-direction: column-reverse; + } + + aside { + border-top: 1px solid gray; + } + + aside h1 { + text-align: center; + } + + aside li { + display: inline-block; + } +} + +@media screen and (min-width: 800px) { + aside { + display: flex; + flex-direction: column; + justify-content: space-between; + min-width: 15em; + width: 15em; + min-height: 100vh; + border-right: 1px solid gray; + } +} + +nav ul { + list-style: none; + padding-left: 0; +} + +nav li { + margin: .5em 0; +} + +nav .file { + font-style: italic; + opacity: .8; +} + +footer { + padding: 1em 0; + color: gray; +} + +aside footer { + text-align: center; +} + +aside footer a { + color: gray; +} + +main footer { + text-align: right; +} diff --git a/templates/main.html b/templates/main.html index 151ac3a..44d7785 100644 --- a/templates/main.html +++ b/templates/main.html @@ -7,105 +7,7 @@ - +