diff --git a/Cargo.lock b/Cargo.lock
index c9aa95f..0cca780 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1416,21 +1416,6 @@ version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
-[[package]]
-name = "handlebars"
-version = "4.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225"
-dependencies = [
- "log",
- "pest",
- "pest_derive",
- "serde",
- "serde_json",
- "thiserror",
- "walkdir",
-]
-
[[package]]
name = "hashbrown"
version = "0.12.3"
@@ -1925,6 +1910,30 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+[[package]]
+name = "maud"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0bab19cef8a7fe1c18a43e881793bfc9d4ea984befec3ae5bd0415abf3ecf00"
+dependencies = [
+ "actix-web",
+ "futures-util",
+ "itoa 1.0.9",
+ "maud_macros",
+]
+
+[[package]]
+name = "maud_macros"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2"
+dependencies = [
+ "proc-macro-error",
+ "proc-macro2 1.0.69",
+ "quote 1.0.33",
+ "syn 1.0.109",
+]
+
[[package]]
name = "maybe-uninit"
version = "2.0.0"
@@ -2329,51 +2338,6 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
-[[package]]
-name = "pest"
-version = "2.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5"
-dependencies = [
- "memchr",
- "thiserror",
- "ucd-trie",
-]
-
-[[package]]
-name = "pest_derive"
-version = "2.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2"
-dependencies = [
- "pest",
- "pest_generator",
-]
-
-[[package]]
-name = "pest_generator"
-version = "2.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227"
-dependencies = [
- "pest",
- "pest_meta",
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 2.0.39",
-]
-
-[[package]]
-name = "pest_meta"
-version = "2.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6"
-dependencies = [
- "once_cell",
- "pest",
- "sha2",
-]
-
[[package]]
name = "phf"
version = "0.7.24"
@@ -2548,6 +2512,30 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2 1.0.69",
+ "quote 1.0.33",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2 1.0.69",
+ "quote 1.0.33",
+ "version_check",
+]
+
[[package]]
name = "proc-macro2"
version = "0.4.30"
@@ -3223,17 +3211,6 @@ dependencies = [
"digest",
]
-[[package]]
-name = "sha2"
-version = "0.10.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
-dependencies = [
- "cfg-if 1.0.0",
- "cpufeatures",
- "digest",
-]
-
[[package]]
name = "signal-hook-registry"
version = "1.4.1"
@@ -3504,26 +3481,6 @@ dependencies = [
"utf-8",
]
-[[package]]
-name = "thiserror"
-version = "1.0.50"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
-dependencies = [
- "thiserror-impl",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.50"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
-dependencies = [
- "proc-macro2 1.0.69",
- "quote 1.0.33",
- "syn 2.0.39",
-]
-
[[package]]
name = "thousands"
version = "0.2.0"
@@ -3855,12 +3812,6 @@ version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
-[[package]]
-name = "ucd-trie"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
-
[[package]]
name = "unicase"
version = "2.7.0"
@@ -4104,9 +4055,9 @@ dependencies = [
"error-stack",
"fake-useragent",
"futures 0.3.29",
- "handlebars",
"lightningcss",
"log",
+ "maud",
"md5",
"mimalloc",
"mini-moka",
diff --git a/Cargo.toml b/Cargo.toml
index 3e33021..b3f1521 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ reqwest = {version="0.11.22", default-features=false, features=["rustls-tls","br
tokio = {version="1.32.0",features=["rt-multi-thread","macros"], default-features = false}
serde = {version="1.0.190", default-features=false, features=["derive"]}
serde_json = {version="1.0.108", default-features=false}
-handlebars = { version = "4.4.0", features = ["dir_source"], default-features = false }
+maud = {version="0.25.0", default-features=false, features=["actix-web"]}
scraper = {version="0.18.1", default-features = false}
actix-web = {version="4.4.0", features = ["cookies", "macros"], default-features=false}
actix-files = {version="0.6.2", default-features=false}
diff --git a/public/templates/404.html b/public/templates/404.html
deleted file mode 100644
index a8a9ac7..0000000
--- a/public/templates/404.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{{>header this}}
-
-
-
-
Aw! snap
-
404 Page Not Found!
-
Go to search page
-
-
-{{>footer}}
diff --git a/public/templates/about.html b/public/templates/about.html
deleted file mode 100644
index 9c4cbb0..0000000
--- a/public/templates/about.html
+++ /dev/null
@@ -1,29 +0,0 @@
-{{>header this}}
-
-
-
-
Websurfx
-
-
- A modern-looking, lightning-fast, privacy-respecting, secure meta search engine written in Rust. It provides a fast and secure search experience while respecting user privacy. It aggregates results from multiple search engines and presents them in an unbiased manner, filtering out trackers and ads.
-
-
- Some of the Top Features:
-
- Lightning fast - Results load within milliseconds for an instant search experience.
-
- Secure search - All searches are performed over an encrypted connection to prevent snooping.
-
- Ad free results - All search results are ad free and clutter free for a clean search experience.
-
- Privacy focused - Websurface does not track, store or sell your search data. Your privacy is our priority.
-
- Free and Open source - The entire project's code is open source and available for free on GitHub under an GNU Affero General Public License.
-
- Highly customizable - Websurface comes with 9 built-in color themes and supports creating custom themes effortlessly.
-
-
-
-
-{{>footer}}
-
diff --git a/public/templates/bar.html b/public/templates/bar.html
deleted file mode 100644
index 489b075..0000000
--- a/public/templates/bar.html
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
search
diff --git a/public/templates/cookies_tab.html b/public/templates/cookies_tab.html
deleted file mode 100644
index 4243bfe..0000000
--- a/public/templates/cookies_tab.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
Cookies
-
- This is the cookies are saved on your system and it contains the preferences
- you chose in the settings page
-
-
-
- The cookies stored are not used by us for any malicious intend or for
- tracking you in any way.
-
-
diff --git a/public/templates/engines_tab.html b/public/templates/engines_tab.html
deleted file mode 100644
index ffca881..0000000
--- a/public/templates/engines_tab.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
Engines
-
select search engines
-
- Select the search engines from the list of engines that you want results
- from
-
-
-
diff --git a/public/templates/footer.html b/public/templates/footer.html
deleted file mode 100644
index 8892b18..0000000
--- a/public/templates/footer.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-