0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 05:58:21 -05:00

Merge branch 'rolling' into rolling

This commit is contained in:
mergify[bot] 2023-12-25 13:13:46 +00:00 committed by GitHub
commit f59a68ea41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 467 additions and 284 deletions

204
Cargo.lock generated
View File

@ -14,7 +14,7 @@ dependencies = [
"futures-sink", "futures-sink",
"memchr", "memchr",
"pin-project-lite", "pin-project-lite",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-util", "tokio-util",
"tracing", "tracing",
] ]
@ -99,7 +99,7 @@ dependencies = [
"rand 0.8.5", "rand 0.8.5",
"sha1", "sha1",
"smallvec 1.11.2", "smallvec 1.11.2",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-util", "tokio-util",
"tracing", "tracing",
] ]
@ -111,7 +111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [ dependencies = [
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -134,7 +134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"tokio 1.35.0", "tokio 1.35.1",
] ]
[[package]] [[package]]
@ -149,8 +149,8 @@ dependencies = [
"futures-core", "futures-core",
"futures-util", "futures-util",
"mio 0.8.10", "mio 0.8.10",
"socket2 0.5.5", "socket2",
"tokio 1.35.0", "tokio 1.35.1",
"tracing", "tracing",
] ]
@ -210,8 +210,8 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded 0.7.1", "serde_urlencoded 0.7.1",
"smallvec 1.11.2", "smallvec 1.11.2",
"socket2 0.5.5", "socket2",
"time 0.3.30", "time 0.3.31",
"url 2.5.0", "url 2.5.0",
] ]
@ -222,9 +222,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5"
dependencies = [ dependencies = [
"actix-router", "actix-router",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -313,9 +313,9 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.75" version = "1.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355"
[[package]] [[package]]
name = "arc-swap" name = "arc-swap"
@ -352,7 +352,7 @@ dependencies = [
"futures-core", "futures-core",
"memchr", "memchr",
"pin-project-lite", "pin-project-lite",
"tokio 1.35.0", "tokio 1.35.1",
] ]
[[package]] [[package]]
@ -363,13 +363,13 @@ checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb"
[[package]] [[package]]
name = "async-trait" name = "async-trait"
version = "0.1.74" version = "0.1.75"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -679,7 +679,7 @@ dependencies = [
"futures-core", "futures-core",
"memchr", "memchr",
"pin-project-lite", "pin-project-lite",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-util", "tokio-util",
] ]
@ -698,7 +698,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a" checksum = "5e1e0fdd2e5d3041e530e1b21158aeeef8b5d0e306bc5c1e3d6cf0930d10e25a"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
] ]
@ -732,7 +732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
dependencies = [ dependencies = [
"percent-encoding 2.3.1", "percent-encoding 2.3.1",
"time 0.3.30", "time 0.3.31",
"version_check", "version_check",
] ]
@ -941,7 +941,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [ dependencies = [
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -979,7 +979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"rustc_version 0.4.0", "rustc_version 0.4.0",
"syn 1.0.109", "syn 1.0.109",
@ -1123,7 +1123,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
"synstructure", "synstructure",
@ -1294,9 +1294,9 @@ version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -1436,7 +1436,7 @@ dependencies = [
"http 0.2.11", "http 0.2.11",
"indexmap 2.1.0", "indexmap 2.1.0",
"slab", "slab",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-util", "tokio-util",
"tracing", "tracing",
] ]
@ -1477,11 +1477,11 @@ checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
[[package]] [[package]]
name = "home" name = "home"
version = "0.5.5" version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
dependencies = [ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.52.0",
] ]
[[package]] [[package]]
@ -1507,7 +1507,7 @@ dependencies = [
"log", "log",
"mac", "mac",
"markup5ever 0.11.0", "markup5ever 0.11.0",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
] ]
@ -1607,9 +1607,9 @@ dependencies = [
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.14.27" version = "0.14.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
dependencies = [ dependencies = [
"bytes 1.5.0", "bytes 1.5.0",
"futures-channel", "futures-channel",
@ -1622,8 +1622,8 @@ dependencies = [
"httpdate", "httpdate",
"itoa 1.0.10", "itoa 1.0.10",
"pin-project-lite", "pin-project-lite",
"socket2 0.4.10", "socket2",
"tokio 1.35.0", "tokio 1.35.1",
"tower-service", "tower-service",
"tracing", "tracing",
"want 0.3.1", "want 0.3.1",
@ -1637,9 +1637,9 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"http 0.2.11", "http 0.2.11",
"hyper 0.14.27", "hyper 0.14.28",
"rustls", "rustls",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-rustls", "tokio-rustls",
] ]
@ -1881,9 +1881,9 @@ dependencies = [
[[package]] [[package]]
name = "luajit-src" name = "luajit-src"
version = "210.5.2+113a168" version = "210.5.3+29b0b28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "823ec7bedb1819b11633bd583ae981b0082db08492b0c3396412b85dd329ffee" checksum = "0c2bb89013916ce5c949f01a1fbd6d435a58e1d980767a791d755911211d792d"
dependencies = [ dependencies = [
"cc", "cc",
"which", "which",
@ -1897,9 +1897,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
[[package]] [[package]]
name = "mach2" name = "mach2"
version = "0.4.1" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709"
dependencies = [ dependencies = [
"libc", "libc",
] ]
@ -1960,7 +1960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2" checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
dependencies = [ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
] ]
@ -2219,9 +2219,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.10.61" version = "0.10.62"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"cfg-if 1.0.0", "cfg-if 1.0.0",
@ -2238,9 +2238,9 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -2251,9 +2251,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.97" version = "0.9.98"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7"
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",
@ -2449,9 +2449,9 @@ checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
dependencies = [ dependencies = [
"phf_generator 0.11.2", "phf_generator 0.11.2",
"phf_shared 0.11.2", "phf_shared 0.11.2",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -2496,9 +2496,9 @@ version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -2515,9 +2515,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.27" version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a"
[[package]] [[package]]
name = "powerfmt" name = "powerfmt"
@ -2544,7 +2544,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [ dependencies = [
"proc-macro-error-attr", "proc-macro-error-attr",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
"version_check", "version_check",
@ -2556,7 +2556,7 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"version_check", "version_check",
] ]
@ -2572,9 +2572,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.70" version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -2631,7 +2631,7 @@ version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
] ]
[[package]] [[package]]
@ -2804,7 +2804,7 @@ dependencies = [
"percent-encoding 2.3.1", "percent-encoding 2.3.1",
"pin-project-lite", "pin-project-lite",
"ryu", "ryu",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-retry", "tokio-retry",
"tokio-util", "tokio-util",
"url 2.5.0", "url 2.5.0",
@ -2890,9 +2890,9 @@ dependencies = [
[[package]] [[package]]
name = "reqwest" name = "reqwest"
version = "0.11.22" version = "0.11.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41"
dependencies = [ dependencies = [
"async-compression", "async-compression",
"base64 0.21.5", "base64 0.21.5",
@ -2903,7 +2903,7 @@ dependencies = [
"h2 0.3.22", "h2 0.3.22",
"http 0.2.11", "http 0.2.11",
"http-body 0.4.6", "http-body 0.4.6",
"hyper 0.14.27", "hyper 0.14.28",
"hyper-rustls", "hyper-rustls",
"ipnet", "ipnet",
"js-sys", "js-sys",
@ -2918,7 +2918,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_urlencoded 0.7.1", "serde_urlencoded 0.7.1",
"system-configuration", "system-configuration",
"tokio 1.35.0", "tokio 1.35.1",
"tokio-rustls", "tokio-rustls",
"tokio-util", "tokio-util",
"tower-service", "tower-service",
@ -3176,9 +3176,9 @@ version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -3299,16 +3299,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "socket2"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]] [[package]]
name = "socket2" name = "socket2"
version = "0.5.5" version = "0.5.5"
@ -3377,7 +3367,7 @@ checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6"
dependencies = [ dependencies = [
"phf_generator 0.7.24", "phf_generator 0.7.24",
"phf_shared 0.7.24", "phf_shared 0.7.24",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"string_cache_shared", "string_cache_shared",
] ]
@ -3390,7 +3380,7 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
dependencies = [ dependencies = [
"phf_generator 0.10.0", "phf_generator 0.10.0",
"phf_shared 0.10.0", "phf_shared 0.10.0",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
] ]
@ -3417,18 +3407,18 @@ version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"unicode-ident", "unicode-ident",
] ]
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.41" version = "2.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" checksum = "5b7d0a2c048d661a1a59fcd7355baa232f7ed34e0ee4df2eef3c1c1c0d3852d8"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"unicode-ident", "unicode-ident",
] ]
@ -3439,7 +3429,7 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 1.0.109", "syn 1.0.109",
"unicode-xid 0.2.4", "unicode-xid 0.2.4",
@ -3525,9 +3515,9 @@ dependencies = [
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.30" version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e"
dependencies = [ dependencies = [
"deranged", "deranged",
"itoa 1.0.10", "itoa 1.0.10",
@ -3545,9 +3535,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]] [[package]]
name = "time-macros" name = "time-macros"
version = "0.2.15" version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f"
dependencies = [ dependencies = [
"time-core", "time-core",
] ]
@ -3598,9 +3588,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.35.0" version = "1.35.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"bytes 1.5.0", "bytes 1.5.0",
@ -3610,7 +3600,7 @@ dependencies = [
"parking_lot 0.12.1", "parking_lot 0.12.1",
"pin-project-lite", "pin-project-lite",
"signal-hook-registry", "signal-hook-registry",
"socket2 0.5.5", "socket2",
"tokio-macros", "tokio-macros",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -3663,9 +3653,9 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]
[[package]] [[package]]
@ -3695,7 +3685,7 @@ checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
dependencies = [ dependencies = [
"pin-project", "pin-project",
"rand 0.8.5", "rand 0.8.5",
"tokio 1.35.0", "tokio 1.35.1",
] ]
[[package]] [[package]]
@ -3705,7 +3695,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [ dependencies = [
"rustls", "rustls",
"tokio 1.35.0", "tokio 1.35.1",
] ]
[[package]] [[package]]
@ -3771,7 +3761,7 @@ dependencies = [
"futures-core", "futures-core",
"futures-sink", "futures-sink",
"pin-project-lite", "pin-project-lite",
"tokio 1.35.0", "tokio 1.35.1",
"tracing", "tracing",
] ]
@ -4001,9 +3991,9 @@ dependencies = [
"bumpalo", "bumpalo",
"log", "log",
"once_cell", "once_cell",
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4035,9 +4025,9 @@ version = "0.2.89"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4066,7 +4056,7 @@ checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10"
[[package]] [[package]]
name = "websurfx" name = "websurfx"
version = "1.6.3" version = "1.6.8"
dependencies = [ dependencies = [
"actix-cors", "actix-cors",
"actix-files", "actix-files",
@ -4090,14 +4080,14 @@ dependencies = [
"mlua", "mlua",
"redis", "redis",
"regex", "regex",
"reqwest 0.11.22", "reqwest 0.11.23",
"rusty-hook", "rusty-hook",
"scraper", "scraper",
"serde", "serde",
"serde_json", "serde_json",
"smallvec 1.11.2", "smallvec 1.11.2",
"tempfile", "tempfile",
"tokio 1.35.0", "tokio 1.35.1",
] ]
[[package]] [[package]]
@ -4319,20 +4309,20 @@ dependencies = [
[[package]] [[package]]
name = "zerocopy" name = "zerocopy"
version = "0.7.31" version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
dependencies = [ dependencies = [
"zerocopy-derive", "zerocopy-derive",
] ]
[[package]] [[package]]
name = "zerocopy-derive" name = "zerocopy-derive"
version = "0.7.31" version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [ dependencies = [
"proc-macro2 1.0.70", "proc-macro2 1.0.71",
"quote 1.0.33", "quote 1.0.33",
"syn 2.0.41", "syn 2.0.42",
] ]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "websurfx" name = "websurfx"
version = "1.6.3" version = "1.6.8"
edition = "2021" edition = "2021"
description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind." description = "An open-source alternative to Searx that provides clean, ad-free, and organic results with incredible speed while keeping privacy and security in mind."
repository = "https://github.com/neon-mmd/websurfx" repository = "https://github.com/neon-mmd/websurfx"

View File

@ -4,7 +4,7 @@
If you have built `websurfx` from the source then the configuration file will be located under the project directory (codebase) at `websurfx/` If you have built `websurfx` from the source then the configuration file will be located under the project directory (codebase) at `websurfx/`
> **Note** > [!Note]
> If you have built websurfx with an unstable/rolling/edge branch then you can copy the configuration file from `websurfx/config.lua` located under the project directory (codebase) to `~/.config/websurfx/` and make the changes there and rerun the websurfx server. _This is only available from unstable/rolling/edge version_. > If you have built websurfx with an unstable/rolling/edge branch then you can copy the configuration file from `websurfx/config.lua` located under the project directory (codebase) to `~/.config/websurfx/` and make the changes there and rerun the websurfx server. _This is only available from unstable/rolling/edge version_.
## Installed From Package ## Installed From Package
@ -48,7 +48,7 @@ Some of the configuration options provided in the file are stated below. These a
## Website ## Website
- **colorscheme:** The colorscheme name which should be used for the website theme (the name should be by the colorscheme file name present in the `public/static/colorschemes` folder). - **colorscheme:** The colorscheme name which should be used for the website theme (the name should be by the colorscheme file name present in the `public/static/colorschemes` folder).
> By Default we provide 12 colorschemes to choose from these are: > By Default we provide 12 colorschemes to choose from these are:
> >
@ -71,6 +71,12 @@ Some of the configuration options provided in the file are stated below. These a
> >
> 1. simple > 1. simple
- **animation:** The animation name that should be used for the website (again, the name should be by the animation file name present in the `public/static/animations` folder).
> By Default we provide 1 animation to choose from these are:
>
> 1. simple-frosted-glow
## Cache ## Cache
- **redis_url:** Redis connection URL address on which the client should connect. - **redis_url:** Redis connection URL address on which the client should connect.
@ -78,6 +84,8 @@ Some of the configuration options provided in the file are stated below. These a
> **Note** > **Note**
> This option can be commented out if you have compiled the app without the `redis-cache` feature. For more information, See [**building**](./building.md). > This option can be commented out if you have compiled the app without the `redis-cache` feature. For more information, See [**building**](./building.md).
- **cache_expiry_time:** The maximum time the server will store the cache for, after which it flushs/removes/expires/invalidates the cached results. (value provided to this option should be in seconds and the value should be greater than or equal to 60 seconds).
## Search Engines ## Search Engines
- **upstream_search_engines:** Select from the different upstream search engines from which the results should be fetched. - **upstream_search_engines:** Select from the different upstream search engines from which the results should be fetched.

View File

@ -12,7 +12,7 @@ This page of the docs outlines how to get **Websurfx** up and running in a devel
- [NixOS Dev Shell using Nix Flake](#nixos-dev-shell-using-nix-flake-) - [NixOS Dev Shell using Nix Flake](#nixos-dev-shell-using-nix-flake-)
- [Local Development with Docker Compose](#local-development-with-docker-compose-) - [Local Development with Docker Compose](#local-development-with-docker-compose-)
- [Project Commands](#project-commands) - [Project Commands](#project-commands)
+ - [Environment Variables](#environment-variables) - [Environment Variables](#environment-variables)
- [Git Strategy](#git-strategy) - [Git Strategy](#git-strategy)
- [Flow](#git-flow) - [Flow](#git-flow)
- [Branches](#git-branch-naming) - [Branches](#git-branch-naming)
@ -57,7 +57,7 @@ $ npm i -g stylelint
$ npm i -g stylelint stylelint-config-standard postcss-lit $ npm i -g stylelint stylelint-config-standard postcss-lit
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
- `Cargo-watch` installed on your system which will allow you to auto-build the project when any checks occur in the source code files in the codebase (`websurfx` directory). Before you install `cargo-watch` on your system, make sure you have `cargo` installed on your system. To install `cargo-watch` run the following command: - `Cargo-watch` installed on your system which will allow you to auto-build the project when any checks occur in the source code files in the codebase (`websurfx` directory). Before you install `cargo-watch` on your system, make sure you have `cargo` installed on your system. To install `cargo-watch` run the following command:
@ -69,7 +69,7 @@ cargo install cargo-watch
- `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). - `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
- Finally, The latest version of `Docker` is installed on your system which will be used to avoid introducing unexpected issues when working on the project. The installation instructions for this can be found [here](https://docs.docker.com/engine/install/). - Finally, The latest version of `Docker` is installed on your system which will be used to avoid introducing unexpected issues when working on the project. The installation instructions for this can be found [here](https://docs.docker.com/engine/install/).
> **Note** > [!Note]
> For **rolling release Linux distributions (distros)**, the above-mentioned required packages except for `stylelint` and `cargo-watch` can also be installed via the distro-specific package manager. > For **rolling release Linux distributions (distros)**, the above-mentioned required packages except for `stylelint` and `cargo-watch` can also be installed via the distro-specific package manager.
> >
> **For Example:** > **For Example:**
@ -149,7 +149,7 @@ Once you have finished running the above command, Websurfx should now be served
This section covers how to use and set up the Gitpod development environment for working on the project. This section covers how to use and set up the Gitpod development environment for working on the project.
> **Note** > [!Note]
> By default the project only supports the Vscode **IDE/Editor** for Gitpod. > By default the project only supports the Vscode **IDE/Editor** for Gitpod.
#### Launching Gitpod #### Launching Gitpod
@ -212,12 +212,6 @@ This section covers how to setup the project for development using the `NixOS de
Before you start working on the project. You will need the following packages installed on your system: Before you start working on the project. You will need the following packages installed on your system:
- `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). - `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
- Finally, The latest version of `Docker` is installed on your system which will be used to avoid introducing unexpected issues when working on the project. The installation instructions for this can be found [here](https://docs.docker.com/engine/install/).
> Optionally, On `NixOS` the above-mentioned required packages except for `stylelint` and `cargo-watch` could also be installed by following the link to the installation instructions provided below:
>
> - `Git`: https://search.nixos.org/packages?channel=23.05&show=git&from=0&size=50&sort=relevance&type=packages&query=git
> - `Docker`: https://search.nixos.org/packages?channel=23.05&show=docker&from=0&size=50&sort=relevance&type=packages&query=docker
#### Setting up Pre-commit Checks #### Setting up Pre-commit Checks
@ -234,7 +228,11 @@ Then run the following command to setup the `NixOS dev-shell`:
nix develop nix develop
``` ```
Once you have finished running the above commands then run the following command to setup the `pre-commit` checks: > You can use `nix-direnv` to simplify entering into the `nix-shell`. Its setup is beyond the scope of this guide. Read more about it here: [nix-direnv](https://github.com/nix-community/nix-direnv)
This will add `docker`, `cargo-watch`, and other dev environment essentials to your `nix-shell` so you don't have to install everything imperatively.
After finishing the commands above, run the following command to setup the `pre-commit` checks:
```shell ```shell
cargo test cargo test
@ -244,14 +242,16 @@ By running the above-mentioned command, it will automatically set up all the pre
#### Post Setup Requirements #### Post Setup Requirements
After you have done setting up pre-commit checks, then you may need to fulfill a few more requirements to finish setting up the development environment with `NixOS dev-shell`. These include: The final step is to run
- `Cargo-watch` installed on your system which will allow you to auto-build the project when any checks occur in the source code files in the codebase (`websurfx` directory). Before you install `cargo-watch` on your system, make sure you have `cargo` installed on your system. To install `cargo-watch` run the following command:
```shell ```shell
cargo install cargo-watch npm i -D stylelint-config-standard postcss-lit`
``` ```
This will add `node_modules` in the current directory.
Run `git commit` and if every thing is setup correctly, it should say that your branch is up to date.
#### Running the Project #### Running the Project
If you have followed the above section then you should now be inside a `dev-shell` environment. In the same environment run the following command to run the project: If you have followed the above section then you should now be inside a `dev-shell` environment. In the same environment run the following command to run the project:
@ -310,13 +310,13 @@ Before you start working on the project. You will need the following packages in
$ npm i -g stylelint $ npm i -g stylelint
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
- `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). - `Git` installed on your system. The installation instructions for this can be found [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
- Finally, The latest version of `Docker` is installed on your system which will be used to avoid introducing unexpected issues when working on the project. The installation instructions for this can be found [here](https://docs.docker.com/engine/install/). - Finally, The latest version of `Docker` is installed on your system which will be used to avoid introducing unexpected issues when working on the project. The installation instructions for this can be found [here](https://docs.docker.com/engine/install/).
> **Note** > [!Note]
> For **rolling release Linux distributions (distros)**, the above-mentioned all required packages can also be installed via the distro-specific package manager. > For **rolling release Linux distributions (distros)**, the above-mentioned all required packages can also be installed via the distro-specific package manager.
> >
> **For Example:** > **For Example:**
@ -355,7 +355,7 @@ If you have followed the above section then you should have a cloned repository
$ docker compose -f dev.docker-compose.yml up $ docker compose -f dev.docker-compose.yml up
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
Once you have finished running the above command, Websurfx should now be served on the address http://127.0.0.1:8080. Hot reload is enabled, so making changes to any of the files will trigger the project to be rebuilt. Once you have finished running the above command, Websurfx should now be served on the address http://127.0.0.1:8080. Hot reload is enabled, so making changes to any of the files will trigger the project to be rebuilt.
@ -366,13 +366,12 @@ Once you have finished running the above command, Websurfx should now be served
- `cargo build`: Builds the project. - `cargo build`: Builds the project.
> **Note** > [!Note]
> When you build the project first time with the above command it will require the app to compile every dependency in the project which will then be cached on your system. So when you compile the app next time it will only compile for the new changes. > When you build the project first time with the above command it will require the app to compile every dependency in the project which will then be cached on your system. So when you compile the app next time it will only compile for the new changes.
+ `cargo run`: Starts the app and serves the project on http://127.0.0.1:8080. - `cargo run`: Starts the app and serves the project on http://127.0.0.1:8080.
> [!Important]
> **Important**
> You must run the build command first. > You must run the build command first.
#### Development #### Development
@ -458,10 +457,10 @@ When you submit your pull request, include the required info, by filling out the
- If any dependencies were added, explain why it was needed, and state the cost. associated, and confirm it does not introduce any security, privacy, or speed issues - If any dependencies were added, explain why it was needed, and state the cost. associated, and confirm it does not introduce any security, privacy, or speed issues
- Optionally, provide a checklist of all the changes that were included in the pull request. - Optionally, provide a checklist of all the changes that were included in the pull request.
> **Important** > [!Important]
> Make sure to fill all the required/mandatory sections of the pull request as filling them helps us distinguish between spam pull requests and legitimate pull requests. > Make sure to fill all the required/mandatory sections of the pull request as filling them helps us distinguish between spam pull requests and legitimate pull requests.
> **Note** > [!Note]
> The pull request template contains comments in the following form `<!-- -->` which are used to provide a guide on what should be provided under each heading of the template. These comments are never rendered when the pull request is either created or updated and hence anything provided in such comments is never displayed. > The pull request template contains comments in the following form `<!-- -->` which are used to provide a guide on what should be provided under each heading of the template. These comments are never rendered when the pull request is either created or updated and hence anything provided in such comments is never displayed.
## Resources for Beginners ## Resources for Beginners
@ -498,7 +497,7 @@ For Rust, CSS, JS, HTML, Git, and Docker- you'll need an IDE (e.g. [VSCode](http
Linting is done using [Cargo Clippy](https://doc.rust-lang.org/clippy/) and [StyleLint](https://stylelint.io/) or [ESLint](https://eslint.org/). Also, linting is run as a git pre-commit hook. Linting is done using [Cargo Clippy](https://doc.rust-lang.org/clippy/) and [StyleLint](https://stylelint.io/) or [ESLint](https://eslint.org/). Also, linting is run as a git pre-commit hook.
> **Important** > [!Important]
> All lint checks must pass before any PR can be merged. > All lint checks must pass before any PR can be merged.
Styleguides to follow: Styleguides to follow:
@ -509,7 +508,7 @@ Styleguides to follow:
## Application Structure ## Application Structure
> **Important** > [!Important]
> We follow the Unix style naming conventions for all the files and folders in the project (except for all files under the `themes` and `colorschemes` folder in the frontend's source code which requires that the names of the files and folders should be in lowercase and the words be separated with a hyphen.) which includes the name of the files and folders should be in lowercase and every word should be separated with an underscore. > We follow the Unix style naming conventions for all the files and folders in the project (except for all files under the `themes` and `colorschemes` folder in the frontend's source code which requires that the names of the files and folders should be in lowercase and the words be separated with a hyphen.) which includes the name of the files and folders should be in lowercase and every word should be separated with an underscore.
**Files in the root of the codebase:** `./` **Files in the root of the codebase:** `./`
@ -541,30 +540,42 @@ Styleguides to follow:
./public/ ./public/
├── robots.txt # Robots file for the Website. ├── robots.txt # Robots file for the Website.
├── images # Images for the Website. ├── images # Images for the Website.
├── static # The directory containing all the UI handlers. └── static # The directory containing all the UI handlers.
│ ├── cookies.js # Handles the loading of saved cookies. ├── cookies.js # Handles the loading of saved cookies.
│ ├── error_box.js # Handles the toggling functionality of the error box on the search page. ├── error_box.js # Handles the toggling functionality of the error box on the search page.
│ ├── index.js # Functions to handle the search functionality of the search bar. ├── index.js # Functions to handle the search functionality of the search bar.
│ ├── pagination.js # Functions to handle the navigation between the previous and next page in the search page. ├── pagination.js # Functions to handle the navigation between the previous and next page in the search page.
│ ├── search_area_options.js # Changes the search options under the search bar in the search page according to the safe search level set using the URL safesearch parameter. ├── search_area_options.js # Changes the search options under the search bar in the search page according to the safe search level set using the URL safesearch parameter.
│ ├── settings.js # Handles the settings and saving of all the settings page options as a cookie. ├── settings.js # Handles the settings and saving of all the settings page options as a cookie.
│ ├── colorschemes # A folder containing all the popular colorscheme files as CSS files. ├── colorschemes # A folder containing all the popular colorscheme files as CSS files.
│ └── themes # A folder containing all the popular theme files as CSS files. └── themes # A folder containing all the popular theme files as CSS files.
└── templates # Folder containing all the template files for the different pages on the website. ```
├── 404.html # A 404-page template.
├── about.html # An about page template. **Fronted Maud HTML Framework Source:** `./src/templates/`
├── bar.html # A template for the search bar.
├── cookies_tab.html # A template for the cookies tab for the settings page. ```
├── engines_tab.html # A template for the engines tab for the settings page. ./src/templates/
├── footer.html # A footer template for all pages. ├── mod.rs # A module file for the rust project.
├── general_tab.html # A template for the general tab for the settings page. ├── partials # A folder containing the code for partials for the views.
├── header.html # A header template for all pages. │ ├── bar.rs # Provides partial code for the search bar.
├── index.html # A home page template. │ ├── footer.rs # Provides partial code for the footer section.
├── navbar.html # A navbar template for the header template. │ ├── header.rs # Provides partial code for the header section.
├── search.html # A search page template. │ ├── mod.rs # A module file for the rust project.
├── search_bar.html # A search bar template specifically for the search page. │ ├── navbar.rs # Provides partial code for the navbar inside the header section.
├── settings.html # A settings page template. │ ├── search_bar.rs # Provides partial code for the search bar present in the search page.
└── user_interface_tab.html # A template for the user interface tab for the settings page. │ └── settings_tabs # A folder containing all the partials for the settings page tabs.
│ ├── cookies.rs # Provides partial code for the cookies tab.
│ ├── engines.rs # Provides partial code for the engines tab.
│ ├── general.rs # Provides partial code for the general tab.
│ ├── mod.rs # A module file for the rust project.
│ └── user_interface.rs # Provides partial code for the user interface tab.
└── views # A folder containing the code for the views.
├── about.rs # Provides code for the about page view.
├── index.rs # Provides code for the homepage view.
├── mod.rs # A module file for the rust project.
├── not_found.rs # Provides code for the 404 page view.
├── search.rs # Provides code for the search page view.
└── settings.rs # Provides code for the settings page view.
``` ```
**Backend Source:** `./src/` **Backend Source:** `./src/`
@ -601,12 +612,13 @@ Styleguides to follow:
│ ├── aggregator.rs # Provides code aggregate and fetches results from the upstream engines. │ ├── aggregator.rs # Provides code aggregate and fetches results from the upstream engines.
│ ├── mod.rs # A module file for the rust project. │ ├── mod.rs # A module file for the rust project.
│ └── user_agent.rs # Provides a helper function to allow random user agents to pass in the server request code to improve user privacy and avoiding detected as a bot. │ └── user_agent.rs # Provides a helper function to allow random user agents to pass in the server request code to improve user privacy and avoiding detected as a bot.
└── server # A folder that holds code to handle the routes for the search engine website. ├── server # A folder that holds code to handle the routes for the search engine website.
├── mod.rs # A module file for the rust project. │ ├── mod.rs # A module file for the rust project.
├── router.rs # Provides functions to handle the different routes on the website. │ ├── router.rs # Provides functions to handle the different routes on the website.
└── routes # A folder that contains code to handle the bigger route for the website. │ └── routes # A folder that contains code to handle the bigger route for the website.
├── mod.rs # A module file for the rust project. │ ├── mod.rs # A module file for the rust project.
└── search.rs # Provides the function to handle the search route. │ └── search.rs # Provides the function to handle the search route.
└── templates # A module that provides and handles Maud HTML framework source code for the search engine website (subfolders and files are explained in the above frontend section.)
``` ```
## Development Tools ## Development Tools

View File

@ -44,7 +44,7 @@ nix build .#websurfx
nix run .#websurfx nix run .#websurfx
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in Privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in Privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
Once you have run the above set of commands, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx. Once you have run the above set of commands, open your preferred web browser and navigate to http://127.0.0.1:8080/ to start using Websurfx.
@ -89,7 +89,7 @@ nix build .#websurfx
nix run .#websurfx nix run .#websurfx
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
## Other Distros ## Other Distros
@ -128,6 +128,16 @@ cd websurfx
Once you have changed the directory to the `websurfx` directory then follow the build options listed below: Once you have changed the directory to the `websurfx` directory then follow the build options listed below:
> [!Note]
> Before you start building the search engine using one of the below listed command. We would strongly recommend setting the `PKG_ENV` enviroment variable as this applies some special optimization to code to reduce the file and improve the page load speed of the website.
> To set the `PKG_ENV` enviroment variable in the `bash` shell run the following command:
>
> ```bash
> export PKG_ENV="prod"
> ```
>
> For how to set the environment variables in other shells. You can follow the instructions on how to do so by visiting the documentation of the specific shell you are using.
### Hybrid Cache ### Hybrid Cache
> For more information on the features and their pros and cons. see: [**Features**](./features.md) > For more information on the features and their pros and cons. see: [**Features**](./features.md)
@ -285,22 +295,22 @@ Then run the following command to deploy the search engine:
$ docker compose up -d $ docker compose up -d
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec` or any other privileged access methods.
Then launch the browser of your choice and navigate to http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>. Then launch the browser of your choice and navigate to http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>.
> **Note** > [!Note]
> The official prebuild images only support `stable` versions of the app and will not support `rolling/edge/unstable` versions. But with support and contribution, it could be made available for these versions as well 🙂. > The official prebuild images only support `stable` versions of the app and will not support `rolling/edge/unstable` versions. But with support and contribution, it could be made available for these versions as well 🙂.
## Manual Deployment ## Manual Deployment
This section covers how to deploy the app with docker manually by manually building the image and deploying it. This section covers how to deploy the app with docker manually by manually building the image and deploying it.
> **Note** > [!Note]
> This section is provided for those who want to further customize the docker image or for those who are extra cautious about security. > This section is provided for those who want to further customize the docker image or for those who are extra cautious about security.
> **Warning** > [!Warning]
> A note of caution the project currently only supports **x86-64** architecture and as such we do not recommend deploying the project on devices with other architectures. Though if you still want to do it then **do it at your own risk**. > A note of caution the project currently only supports **x86-64** architecture and as such we do not recommend deploying the project on devices with other architectures. Though if you still want to do it then **do it at your own risk**.
### Unstable/Edge/Rolling ### Unstable/Edge/Rolling
@ -317,19 +327,19 @@ After that edit the config.lua file located under `websurfx` directory. In the c
```lua ```lua
-- ### General ### -- ### General ###
logging = true -- an option to enable or disable logs. logging = true -- an option to enable or disable logs.
debug = false -- an option to enable or disable debug mode. debug = false -- an option to enable or disable debug mode.
threads = 8 -- the amount of threads that the app will use to run (the value should be greater than 0). threads = 10 -- the amount of threads that the app will use to run (the value should be greater than 0).
-- ### Server ### -- ### Server ###
port = "8080" -- port on which server should be launched port = "8080" -- port on which server should be launched
binding_ip = "0.0.0.0" --ip address on the server should be launched. binding_ip = "127.0.0.1" --ip address on the which server should be launched.
production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one)) production_use = false -- whether to use production mode or not (in other words this option should be used if it is to be used to host it on the server to provide a service to a large number of users (more than one))
-- if production_use is set to true -- if production_use is set to true
-- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests. -- There will be a random delay before sending the request to the search engines, this is to prevent DDoSing the upstream search engines from a large number of simultaneous requests.
request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds). request_timeout = 30 -- timeout for the search requests sent to the upstream search engines to be fetched (value in seconds).
rate_limiter = { rate_limiter = {
number_of_requests = 20, -- The number of requests that are allowed within a provided time limit. number_of_requests = 20, -- The number of request that are allowed within a provided time limit.
time_limit = 3, -- The time limit in which the number of requests that should be accepted. time_limit = 3, -- The time limit in which the quantity of requests that should be accepted.
} }
-- ### Search ### -- ### Search ###
@ -360,15 +370,18 @@ safe_search = 2
-- tomorrow-night -- tomorrow-night
-- }} -- }}
colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme colorscheme = "catppuccin-mocha" -- the colorscheme name which should be used for the website theme
theme = "simple" -- the theme name which should be used for the website theme = "simple" -- the theme name which should be used for the website
-- ### Caching ### -- ### Caching ###
redis_url = "redis://redis:6379" -- redis connection url address on which the client should connect on. redis_url = "redis://127.0.0.1:8082" -- redis connection url address on which the client should connect on.
cache_expiry_time = 600 -- This option takes the expiry time of the search results (value in seconds and the value should be greater than or equal to 60 seconds).
-- ### Search Engines ### -- ### Search Engines ###
upstream_search_engines = { upstream_search_engines = {
DuckDuckGo = true, DuckDuckGo = true,
Searx = false, Searx = false,
Brave = false,
Startpage = false,
LibreX = false,
} -- select the upstream search engines from which the results should be fetched. } -- select the upstream search engines from which the results should be fetched.
``` ```
@ -378,7 +391,7 @@ After this make sure to edit the `docker-compose.yml` and `Dockerfile` files as
$ docker compose up -d --build $ docker compose up -d --build
``` ```
> **Note** > [!Note]
> In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods. > In the above command the dollar sign(**$**) refers to running the command in privileged mode by using utilities `sudo`, `doas`, `pkgexec`, or any other privileged access methods.
This will take around 5-10 mins for the first deployment, afterwards, the docker build stages will be cached so it will be faster to build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`. This will take around 5-10 mins for the first deployment, afterwards, the docker build stages will be cached so it will be faster to build from next time onwards. After the above step finishes launch your preferred browser and then navigate to `http://<ip_address_of_the_device>:<whatever_port_you_provided_in_the_config>`.

View File

@ -1,17 +1,25 @@
# Colorschemes # Theming
## Built-in ## Colorschemes
By default `websurfx` comes with 9 colorschemes to choose from which can be easily chosen using the config file. To how to change colorschemes please view the [Configuration](https://github.com/neon-mmd/websurfx/wiki/configuration) section of the wiki. ### Built-in
## Custom By default `websurfx` comes with 12 colorschemes to choose from which can be easily chosen using the config file or via the settings page on the website.
Creating coloschemes is as easy as it gets it requires the user to have a theme file name with the colorscheme in which every space should be replaced with a `-` (dash) and it should end with a `.css` file extension. After creating the file you need to add the following code with the `colors` you want: > To how to change colorschemes using the config file. See: [**Configuration**](https://github.com/neon-mmd/websurfx/wiki/configuration)
### Custom
To write a custom theme for the website, you will first need to create a new file under the `public/static/themes` folder with name of the theme containing each word seperated with a hyphen (**-**). Then after that edit the newly created file as required with new css code.
Creating coloschemes is as easy as it gets it requires the user to have a colorscheme file name with the name of the colorscheme that is to be provided in which every space should be replaced with a `-` (dash) and it should end with a `.css` file extension. After creating the file you need to add the following code with the `colors` you want to include:
```css ```css
:root { :root {
--background-color: <background color>; --background-color: <background color>;
--foreground-color: <foreground color (text color on the website) >; --foreground-color: <foreground color (text color on the website) >;
--logo-color: <logo color
(the color of the logo svg image on the website homepage) >;
--color-one: <color 1>; --color-one: <color 1>;
--color-two: <color 2>; --color-two: <color 2>;
--color-three: <color 3>; --color-three: <color 3>;
@ -22,7 +30,7 @@ Creating coloschemes is as easy as it gets it requires the user to have a theme
} }
``` ```
> **Note** > [!Note]
> Please infer the theme file located under `public/static/themes` to better understand where each color is being used. > Please infer the theme file located under `public/static/themes` to better understand where each color is being used.
**Example of `catppuccin-mocha` colorscheme:** **Example of `catppuccin-mocha` colorscheme:**
@ -31,6 +39,7 @@ Creating coloschemes is as easy as it gets it requires the user to have a theme
:root { :root {
--background-color: #1e1e2e; --background-color: #1e1e2e;
--foreground-color: #cdd6f4; --foreground-color: #cdd6f4;
--logo-color: #f5c2e7;
--color-one: #45475a; --color-one: #45475a;
--color-two: #f38ba8; --color-two: #f38ba8;
--color-three: #a6e3a1; --color-three: #a6e3a1;
@ -41,21 +50,31 @@ Creating coloschemes is as easy as it gets it requires the user to have a theme
} }
``` ```
# Themes ## Themes
## Built-in ### Built-in
By default `websurfx` comes with 1 theme to choose from which can be easily chosen using the config file. To how to change themes please view the [Configuration](https://github.com/neon-mmd/websurfx/wiki/configuration) section of the wiki. By default `websurfx` comes with 1 theme to choose from which can be easily chosen using the config file or via the settings page on the website.
## Custom > To how to change themes using the config file. See: [**Configuration**](https://github.com/neon-mmd/websurfx/wiki/configuration)
To write custom color scheme, it requires the user to have some knowledge of `css stylesheets`. ### Custom
**Here is an example of `simple theme` (which we provide by default with the app) which will give the user a better idea on how to create a custom theme using it as a template:** > This section expects the user to have some knowledge of `css`.
### General To write a custom theme for the website, you will first need to create a new file under the `public/static/themes` folder with name of the theme containing each word seperated with a hyphen (**-**). Then after that edit the newly created file as required with new css code.
Here is an example of `simple theme` (which we provide by default with the app) which will give you a better idea on how you can create your own custom theme for the website:
#### General
```css ```css
@font-face {
font-family: Rubik;
src: url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800&display=swap');
fallback: sans-serif;
}
* { * {
padding: 0; padding: 0;
margin: 0; margin: 0;
@ -72,11 +91,17 @@ body {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 100vh; height: 100vh;
background: var(--color-one); font-family: Rubik, sans-serif;
background-color: var(--background-color);
}
/* enforce font for buttons */
button {
font-family: Rubik, sans-serif;
} }
``` ```
### Styles for the index page #### Styles for the index page
```css ```css
.search-container { .search-container {
@ -87,44 +112,69 @@ body {
align-items: center; align-items: center;
} }
.search-container svg {
color: var(--logo-color);
}
.search-container div { .search-container div {
display: flex; display: flex;
} }
``` ```
### Styles for the search box and search button #### Styles for the search box and search button
```css ```css
.search_bar { .search_bar {
display: flex; display: flex;
gap: 10px;
align-items: center;
} }
.search_bar input { .search_bar input {
padding: 1rem; border-radius: 6px;
padding: 2.6rem 2.2rem;
width: 50rem; width: 50rem;
height: 3rem; height: 3rem;
outline: none; outline: none;
border: none; border: none;
box-shadow: rgba(0, 0, 0, 1); box-shadow: rgb(0 0 0 / 1);
background: var(--foreground-color); background-color: var(--color-one);
color: var(--foreground-color);
outline-offset: 3px;
font-size: 1.6rem;
}
.search_bar input:focus {
outline: 2px solid var(--foreground-color);
}
.search_bar input::placeholder {
color: var(--foreground-color);
opacity: 1;
} }
.search_bar button { .search_bar button {
padding: 1rem; padding: 2.6rem 3.2rem;
border-radius: 0; border-radius: 6px;
height: 3rem; height: 3rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
outline: none; outline-offset: 3px;
outline: 2px solid transparent;
border: none; border: none;
transition: 0.1s;
gap: 0; gap: 0;
background: var(--background-color); background-color: var(--color-six);
color: var(--color-three); color: var(--background-color);
font-weight: 600; font-weight: 600;
letter-spacing: 0.1rem; letter-spacing: 0.1rem;
} }
.search_bar button:active {
outline: 2px solid var(--color-three);
}
.search_bar button:active, .search_bar button:active,
.search_bar button:hover { .search_bar button:hover {
filter: brightness(1.2); filter: brightness(1.2);
@ -141,13 +191,19 @@ body {
width: 20rem; width: 20rem;
background-color: var(--color-one); background-color: var(--color-one);
color: var(--foreground-color); color: var(--foreground-color);
padding: 1rem 2rem; padding: 1.2rem 2rem;
border-radius: 0.5rem; border-radius: 0.5rem;
outline: none; outline-offset: 3px;
outline: 2px solid transparent;
border: none; border: none;
text-transform: capitalize; text-transform: capitalize;
} }
.search_area .search_options select:active,
.search_area .search_options select:hover {
outline: 2px solid var(--color-three);
}
.search_area .search_options option:hover { .search_area .search_options option:hover {
background-color: var(--color-one); background-color: var(--color-one);
} }
@ -170,9 +226,7 @@ body {
.result_not_found img { .result_not_found img {
width: 40rem; width: 40rem;
} }
```
```css
/* styles for the error box */ /* styles for the error box */
.error_box .error_box_toggle_button { .error_box .error_box_toggle_button {
background: var(--foreground-color); background: var(--foreground-color);
@ -188,9 +242,11 @@ body {
min-height: 20rem; min-height: 20rem;
min-width: 22rem; min-width: 22rem;
} }
.error_box .dropdown_error_box.show { .error_box .dropdown_error_box.show {
display: flex; display: flex;
} }
.error_box .dropdown_error_box .error_item, .error_box .dropdown_error_box .error_item,
.error_box .dropdown_error_box .no_errors { .error_box .dropdown_error_box .no_errors {
display: flex; display: flex;
@ -200,22 +256,25 @@ body {
padding: 1rem; padding: 1rem;
font-size: 1.2rem; font-size: 1.2rem;
} }
.error_box .dropdown_error_box .error_item { .error_box .dropdown_error_box .error_item {
justify-content: space-between; justify-content: space-between;
} }
.error_box .dropdown_error_box .no_errors { .error_box .dropdown_error_box .no_errors {
min-height: 18rem; min-height: 18rem;
justify-content: center; justify-content: center;
} }
.error_box .dropdown_error_box .error_item:hover { .error_box .dropdown_error_box .error_item:hover {
box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 100px 100px rgb(255 255 255 / 0.1);
} }
.error_box .error_item .severity_color { .error_box .error_item .severity_color {
width: 1.2rem; width: 1.2rem;
height: 1.2rem; height: 1.2rem;
} }
.results .result_disallowed, .results .result_disallowed,
.results .result_filtered, .results .result_filtered,
.results .result_engine_not_selected { .results .result_engine_not_selected {
@ -225,7 +284,7 @@ body {
gap: 10rem; gap: 10rem;
font-size: 2rem; font-size: 2rem;
color: var(--foreground-color); color: var(--foreground-color);
margin: 0rem 7rem; margin: 0 7rem;
} }
.results .result_disallowed .user_query, .results .result_disallowed .user_query,
@ -251,16 +310,34 @@ body {
} }
``` ```
### Styles for the footer and header #### Styles for the footer and header
```css ```css
header { header {
background: var(--background-color);
width: 100%; width: 100%;
background: var(--background-color);
display: flex; display: flex;
justify-content: right;
align-items: center; align-items: center;
padding: 1rem; justify-content: space-between;
padding: 2rem 3rem;
}
footer {
width: 100%;
background: var(--background-color);
display: flex;
align-items: center;
padding: 1.7rem 1.7rem 4rem;
gap: 1.8rem;
flex-direction: column;
justify-content: center;
}
header h1 a {
text-transform: capitalize;
text-decoration: none;
color: var(--foreground-color);
letter-spacing: 0.1rem;
} }
header ul, header ul,
@ -301,39 +378,9 @@ footer div {
display: flex; display: flex;
gap: 1rem; gap: 1rem;
} }
footer {
background: var(--background-color);
width: 100%;
padding: 1rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
footer div span {
font-size: 1.5rem;
color: var(--4);
}
footer div {
display: flex;
gap: 1rem;
}
footer {
background: var(--bg);
width: 100%;
padding: 1rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
``` ```
### Styles for the search page #### Styles for the search page
```css ```css
.results { .results {
@ -341,6 +388,11 @@ footer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
gap: 1rem;
}
.result {
gap: 1rem;
} }
.results .search_bar { .results .search_bar {
@ -352,6 +404,7 @@ footer {
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
margin: 2rem 0; margin: 2rem 0;
content-visibility: auto;
} }
.results_aggregated .result { .results_aggregated .result {
@ -361,10 +414,10 @@ footer {
} }
.results_aggregated .result h1 a { .results_aggregated .result h1 a {
font-size: 1.5rem; font-size: 1.7rem;
font-weight: normal;
color: var(--color-two); color: var(--color-two);
text-decoration: none; text-decoration: none;
letter-spacing: 0.1rem;
} }
.results_aggregated .result h1 a:hover { .results_aggregated .result h1 a:hover {
@ -377,14 +430,15 @@ footer {
.results_aggregated .result small { .results_aggregated .result small {
color: var(--color-three); color: var(--color-three);
font-size: 1.1rem; font-size: 1.3rem;
word-wrap: break-word; word-wrap: break-word;
line-break: anywhere; line-break: anywhere;
} }
.results_aggregated .result p { .results_aggregated .result p {
color: var(--foreground-color); color: var(--foreground-color);
font-size: 1.2rem; font-size: 1.4rem;
line-height: 2.4rem;
margin-top: 0.3rem; margin-top: 0.3rem;
word-wrap: break-word; word-wrap: break-word;
line-break: anywhere; line-break: anywhere;
@ -395,10 +449,13 @@ footer {
font-size: 1.2rem; font-size: 1.2rem;
padding: 1rem; padding: 1rem;
color: var(--color-five); color: var(--color-five);
display: flex;
gap: 1rem;
justify-content: right;
} }
``` ```
### Styles for the 404 page #### Styles for the 404 page
```css ```css
.error_container { .error_container {
@ -448,11 +505,11 @@ footer {
} }
``` ```
### Styles for the previous and next button on the search page #### Styles for the previous and next button on the search page
```css ```css
.page_navigation { .page_navigation {
padding: 0 0 2rem 0; padding: 0 0 2rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -472,7 +529,7 @@ footer {
} }
``` ```
### Styles for the about page #### Styles for the about page
This part is only available right now in the **rolling/edge/unstable** version This part is only available right now in the **rolling/edge/unstable** version
@ -517,7 +574,7 @@ This part is only available right now in the **rolling/edge/unstable** version
} }
``` ```
### Styles for the Settings Page #### Styles for the Settings Page
This part is only available right now in the **rolling/edge/unstable** version This part is only available right now in the **rolling/edge/unstable** version
@ -526,6 +583,7 @@ This part is only available right now in the **rolling/edge/unstable** version
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
width: 80dvw; width: 80dvw;
margin: 5rem 0;
} }
.settings h1 { .settings h1 {
@ -533,9 +591,18 @@ This part is only available right now in the **rolling/edge/unstable** version
font-size: 2.5rem; font-size: 2.5rem;
} }
.settings > h1 {
margin-bottom: 4rem;
margin-left: 2rem;
}
.settings hr { .settings hr {
border-color: var(--color-three); border-color: var(--color-three);
margin: 0.3rem 0 1rem 0; margin: 0.3rem 0 1rem;
}
.settings > hr {
margin-left: 2rem;
} }
.settings_container .sidebar { .settings_container .sidebar {
@ -548,7 +615,6 @@ This part is only available right now in the **rolling/edge/unstable** version
margin-left: -0.7rem; margin-left: -0.7rem;
padding: 0.7rem; padding: 0.7rem;
border-radius: 5px; border-radius: 5px;
font-weight: bold;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
color: var(--foreground-color); color: var(--foreground-color);
text-transform: capitalize; text-transform: capitalize;
@ -556,18 +622,30 @@ This part is only available right now in the **rolling/edge/unstable** version
} }
.settings_container .sidebar .btn { .settings_container .sidebar .btn {
padding: 0.5rem; padding: 2rem;
border-radius: 0.5rem; border-radius: 0.5rem;
outline-offset: 3px;
outline: 2px solid transparent;
}
.settings_container .sidebar .btn:active {
outline: 2px solid var(--color-two);
}
.settings_container .sidebar .btn:not(.active):hover {
color: var(--color-two);
} }
.settings_container .sidebar .btn.active { .settings_container .sidebar .btn.active {
background-color: var(--color-two); background-color: var(--color-two);
color: var(--background-color);
} }
.settings_container .main_container { .settings_container .main_container {
width: 70%; width: 70%;
border-left: 1.5px solid var(--color-three); border-left: 1.5px solid var(--color-three);
padding-left: 3rem; padding-left: 3rem;
border: none;
} }
.settings_container .tab { .settings_container .tab {
@ -576,6 +654,7 @@ This part is only available right now in the **rolling/edge/unstable** version
.settings_container .tab.active { .settings_container .tab.active {
display: flex; display: flex;
gap: 1.2rem;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
} }
@ -623,7 +702,7 @@ This part is only available right now in the **rolling/edge/unstable** version
.settings_container .general select { .settings_container .general select {
margin: 0.7rem 0; margin: 0.7rem 0;
width: 20rem; width: 20rem;
background-color: var(--background-color); background-color: var(--color-one);
color: var(--foreground-color); color: var(--foreground-color);
padding: 1rem 2rem; padding: 1rem 2rem;
border-radius: 0.5rem; border-radius: 0.5rem;
@ -641,16 +720,19 @@ This part is only available right now in the **rolling/edge/unstable** version
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
gap: 1rem;
padding: 1rem 0; padding: 1rem 0;
margin-bottom: 2rem;
gap: 2rem;
} }
.settings_container .engines .toggle_btn { .settings_container .engines .toggle_btn {
color: var(--foreground-color); color: var(--foreground-color);
font-size: 1.5rem; font-size: 1.5rem;
display: flex; display: flex;
gap: 0.5rem;
align-items: center; align-items: center;
border-radius: 100px;
gap: 1.5rem;
letter-spacing: 1px;
} }
.settings_container .engines hr { .settings_container .engines hr {
@ -658,11 +740,11 @@ This part is only available right now in the **rolling/edge/unstable** version
} }
.settings_container .cookies input { .settings_container .cookies input {
margin: 1rem 0rem; margin: 1rem 0;
} }
``` ```
### Styles for the Toggle Button #### Styles for the Toggle Button
This part is only available right now in the **rolling/edge/unstable** version This part is only available right now in the **rolling/edge/unstable** version
@ -686,25 +768,26 @@ This part is only available right now in the **rolling/edge/unstable** version
.slider { .slider {
position: absolute; position: absolute;
cursor: pointer; cursor: pointer;
top: 0; inset: 0;
left: 0; background-color: var(--foreground-color);
right: 0; transition: 0.2s;
bottom: 0; outline-offset: 3px;
background-color: var(--background-color); outline: 2px solid transparent;
-webkit-transition: 0.4s;
transition: 0.4s;
} }
.slider:before { .slider:active {
outline: 2px solid var(--foreground-color);
}
.slider::before {
position: absolute; position: absolute;
content: ''; content: '';
height: 2.6rem; height: 2.6rem;
width: 2.6rem; width: 2.6rem;
left: 0.4rem; left: 0.4rem;
bottom: 0.4rem; bottom: 0.4rem;
background-color: var(--foreground-color); background-color: var(--background-color);
-webkit-transition: 0.4s; transition: 0.2s;
transition: 0.4s;
} }
input:checked + .slider { input:checked + .slider {
@ -715,9 +798,7 @@ input:focus + .slider {
box-shadow: 0 0 1px var(--color-three); box-shadow: 0 0 1px var(--color-three);
} }
input:checked + .slider:before { input:checked + .slider::before {
-webkit-transform: translateX(2.6rem);
-ms-transform: translateX(2.6rem);
transform: translateX(2.6rem); transform: translateX(2.6rem);
} }
@ -726,9 +807,79 @@ input:checked + .slider:before {
border-radius: 3.4rem; border-radius: 3.4rem;
} }
.slider.round:before { .slider.round::before {
border-radius: 50%; border-radius: 50%;
} }
``` ```
## Animations
### Built-in
By default `websurfx` comes with 1 animation to choose from which can be easily chosen using the config file or via the settings page on the website.
> To how to change animations using the config file. See: [**Configuration**](https://github.com/neon-mmd/websurfx/wiki/configuration)
### Custom
To write custom animation, it requires the user to have some knowledge of `themes` and the `HTML of the page for which the animation is being provided for`.
The animations can be of 2 categories:
- Theme specific animations
- Universal animations
#### Theme Specific Animations
These animations can only be used with a specific theme and should not be used with other themes otherwise it either won't look good or won't work at all or would work partially.
Here is an example of `simple-frosted-glow` animation for the `simple theme` (which we provide by default with the app) which will give you a better idea on how to create a custom animation for a specific theme:
```css
.results_aggregated .result {
margin: 1rem;
padding: 1rem;
border-radius: 1rem;
}
.results_aggregated .result:hover {
box-shadow:
inset 0 0 3rem var(--color-two),
inset 0 0 6rem var(--color-five),
inset 0 0 9rem var(--color-three),
0 0 0.25rem var(--color-two),
0 0 0.5rem var(--color-five),
0 0 0.75rem var(--color-three);
}
```
#### Universal Animations
These animations are independent of the theme being used and can be used with all the themes.
Here is an example of `text-tilt` animation which will give you an idea on how to create universal animations for the search engine website.
```css
.results_aggregated .result:hover {
transform: skewX(10deg);
}
```
> [!Note]
> 1. The above-mentioned examples of animations was covered for the search page of the search engine website. While the same way of creating custom animations can also be done for other pages also.
> 2. While the naming the file for the new theme file. Follow the following naming conventions:
> 1. If the animation is theme specfic then name of the animation file should look like this:
> `<name of the theme which these animation is for><seperated by a hyphen or dash><name of the animation with whitespaces replaced with hyphens>`
> **For example:**
> If the animation to make search results frosty glow on hover was to be created for the `simple` theme then the name of the file would look something like this:
> `simple-frosted-glow`
> Where `simple` is the name of the theme the animation targets and `frosted-glow` is the name of the animation where each word has been seperated by a hyphen.
> 2. If the animation is not theme specfic (univeral theme) then name of the animation file should look like this:
> `<name of the animation with whitespaces replaced with hyphens>`
> **For example:**
> If the animation to make search results text tilt on hover was to be created then the name of the file would look something like this:
> `text-tilt`
> Where `text-tilt` is the name of the animation where each word has been seperated by a hyphen. (While naming the files for these types of themes, You do not need to add a theme name in frontend of the file name.).
[⬅️ Go back to Home](./README.md) [⬅️ Go back to Home](./README.md)

View File

@ -32,23 +32,32 @@
buildInputs = [ buildInputs = [
actionlint actionlint
cargo cargo
docker
haskellPackages.hadolint haskellPackages.hadolint
nodejs
nodePackages_latest.cspell nodePackages_latest.cspell
nodePackages_latest.eslint nodePackages_latest.eslint
nodePackages_latest.markdownlint-cli2 nodePackages_latest.markdownlint-cli2
nodePackages_latest.stylelint nodePackages_latest.stylelint
redis redis
rustPackages.clippy rustPackages.clippy
rust-analyzer
cargo-watch
rustc rustc
rustfmt
yamllint yamllint
openssl openssl
pkg-config pkg-config
]; ];
RUST_SRC_PATH = rustPlatform.rustLibSrc; RUST_SRC_PATH = rustPlatform.rustLibSrc;
shellHook = ''
export PATH="$PATH:$HOME/.cargo/bin"
export NODE_PATH="$NODE_PATH:./node_modules"
'';
}; };
# Build via "nix build .#websurfx", which is basically just # Build via "nix build .#websurfx", which is basically just
# calls the build function # calls the build function
packages.websurfx = packages.default; packages.websurfx = packages.default;
}); });
}