From f832599a311d617d339dd1d7b18a0a5982cc3909 Mon Sep 17 00:00:00 2001 From: cybrejon Date: Thu, 22 Feb 2024 00:10:06 +0800 Subject: [PATCH] chore: remove lines between or after svg string literals to conform with proper rust formatting --- src/templates/views/about.rs | 136 +++++++++++++++++++++++++++++++---- 1 file changed, 122 insertions(+), 14 deletions(-) diff --git a/src/templates/views/about.rs b/src/templates/views/about.rs index 3f34819..2b4de53 100644 --- a/src/templates/views/about.rs +++ b/src/templates/views/about.rs @@ -1,6 +1,6 @@ //! A module that handles the view for the about page in the `websurfx` frontend. -use maud::{html, Markup}; +use maud::{html, Markup, PreEscaped}; use crate::templates::partials::{footer::footer, header::header}; @@ -15,33 +15,141 @@ use crate::templates::partials::{footer::footer, header::header}; /// /// It returns the compiled html markup code as a result. pub fn about(colorscheme: &str, theme: &str, animation: &Option) -> Markup { + let logo_svg = r#" + + + + + + + + "#; + let feature_lightning = r#" + + "#; + let feature_secure = r#" + + "#; + let feature_clean = r#" + + "#; + let feature_privacy = r#" + + "#; + let feature_foss = r#" + + "#; + let feature_customizable = r#" + + "#; html!( (header(colorscheme, theme, animation)) main class="about-container"{ article { - div{ - h1{"Websurfx"} - hr size="4" width="100%" color="#a6e3a1"{} - } - p{"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."br{}" It aggregates results from multiple search engines and presents them in an unbiased manner, filtering out trackers and ads." + div class="logo-container" { + (PreEscaped(logo_svg)) } - h2{"Some of the Top Features:"} + div class="text-block" { + h3 class="text-block-title" {"Why Websurfx?"} + div class="hero-text-container" { + p class="hero-text" {"Websurfx aggregates results from multiple search engines and presents them in an unbiased manner, filtering out trackers and ads."} + } + } - ul{strong{"Lightning fast "}"- Results load within milliseconds for an instant search experience."} + div class="feature-list" { + h3 class="feature-list-title" {"Features"} + div class="features" { - ul{strong{"Secure search"}" - All searches are performed over an encrypted connection to prevent snooping."} + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_lightning)) } + h4 { + "Lightning-fast" + } + } + div class="feature-card-body" { + p { + "Results load within milliseconds for an instant search experience." + } + } + } - ul{strong{"Ad free results"}" - All search results are ad free and clutter free for a clean search experience."} + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_secure)) } + h4 { + "Secure Search" + } + } + div class="feature-card-body" { + p { + "All searches are performed over an encrypted connection to prevent snooping." + } + } + } - ul{strong{"Privacy focused"}" - Websurfx does not track, store or sell your search data. Your privacy is our priority."} + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_clean)) } + h4 { + "Ad-free Results" + } + } + div class="feature-card-body" { + p { + "All search results are ad free and clutter free for a clean search experience." + } + } + } - ul{strong{"Free and Open source"}" - The entire project's code is open source and available for free on "{a href="https://github.com/neon-mmd/websurfx"{"GitHub"}}" under an GNU Affero General Public License."} + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_privacy)) } + h4 { + "Privacy-focused" + } + } + div class="feature-card-body" { + p { + "Websurfx does not track, store or sell your search data. Your privacy is our priority." + } + } + } + + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_foss)) } + h4 { + "Free and Open-source" + } + } + div class="feature-card-body" { + p { + "The entire project's code is open source and available for free on "{a href="https://github.com/neon-mmd/websurfx"{"GitHub"}}"." + } + } + } + + div class="feature-card" { + div class="feature-card-header" { + div class="feature-card-icon" { (PreEscaped(feature_customizable)) } + h4 { + "Highly Customizable" + } + } + div class="feature-card-body" { + p { + "Websurfx comes with 9 built-in color themes and supports creating custom themes effortlessly." + } + } + } + } + } - ul{strong{"Highly customizable"}" - Websurfx comes with 9 built-in color themes and supports creating custom themes effortlessly."} } - h3{"Devoloped by: "{a href="https://github.com/neon-mmd/websurfx"{"Websurfx team"}}} + h3 class="about-footnote" {"Developed by the "{a href="https://github.com/neon-mmd/websurfx"{"Websurfx team"}}} } (footer()) )