diff --git a/src/pages/mod.rs b/src/pages/mod.rs
index 0dd86e2..da08c11 100644
--- a/src/pages/mod.rs
+++ b/src/pages/mod.rs
@@ -22,7 +22,7 @@ mod panel;
pub mod routes;
//mod sitemap;
-pub const NAME: &str = "Kaizen";
+pub const NAME: &str = "mCaptcha";
pub fn services(cfg: &mut ServiceConfig) {
auth::services(cfg);
diff --git a/src/pages/panel/mod.rs b/src/pages/panel/mod.rs
index d834afb..47d9e23 100644
--- a/src/pages/panel/mod.rs
+++ b/src/pages/panel/mod.rs
@@ -13,8 +13,10 @@
*
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see .
*/
-use actix_web::{http, HttpResponse, Responder};
+use actix_web::{HttpResponse, Responder};
+use lazy_static::lazy_static;
use my_codegen::get;
+use sailfish::TemplateOnce;
use crate::PAGES;
@@ -31,7 +33,7 @@ pub mod routes {
pub const fn new() -> Panel {
let campaigns = Campaigns::new();
Panel {
- home: "/admin/home",
+ home: "/",
campaigns,
}
}
@@ -48,12 +50,19 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
campaigns::services(cfg);
}
-#[get(
- path = "PAGES.panel.home",
- wrap = "crate::pages::get_page_check_login()"
-)]
-pub async fn home() -> impl Responder {
- HttpResponse::Found()
- .insert_header((http::header::LOCATION, PAGES.panel.campaigns.home))
- .finish()
+#[derive(TemplateOnce, Default)]
+#[template(path = "index.html")]
+struct HomePage;
+
+const PAGE: &str = "Survey";
+
+lazy_static! {
+ static ref INDEX: String = HomePage::default().render_once().unwrap();
+}
+
+#[get(path = "PAGES.panel.home")]
+pub async fn home() -> impl Responder {
+ HttpResponse::Ok()
+ .content_type("text/html; charset=utf-8")
+ .body(&*INDEX)
}
diff --git a/src/static_assets/static_files.rs b/src/static_assets/static_files.rs
index 9c2d8fa..dfe0874 100644
--- a/src/static_assets/static_files.rs
+++ b/src/static_assets/static_files.rs
@@ -47,6 +47,10 @@ pub mod assets {
path: FILES.get("./static/cache/img/headsets.jpg").unwrap(),
name: "Headsets image"
};
+ pub static ref EXTERNAL_LINK: Img = Img {
+ path: FILES.get("./static/cache/img/external-link.svg").unwrap(),
+ name: "External Link"
+ };
}
}
diff --git a/static/cache/img/external-link.svg b/static/cache/img/external-link.svg
new file mode 100644
index 0000000..feb2d26
--- /dev/null
+++ b/static/cache/img/external-link.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
index b5ef88c..b2877a1 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,63 +1,88 @@
<. include!("./components/base/top.html"); .>
-
-
-
mCaptcha device benchmark survey
-
Why should I participate
-
- mCaptcha
- is a cutting edge, privacy respecting CAPTCHA system. We use a
- proof of work
- based mechanism to defend against
- denial-of-service attacks
- which allows for a non-interactive CAPTCHA experience. We require
- performance metrics measured on a wide range of devices to fine-tune the
- system for optimal user experience, see for yourself!
-
-
-
-
+
+
+
mCaptcha benchmark survey
+
+
Why should I participate
+
+ mCaptcha
+ is a cutting edge, privacy respecting CAPTCHA system. We use a
+ proof of work
+ based mechanism to defend against
+ denial-of-service attacks
+ which allows for a non-interactive CAPTCHA experience. We require
+ performance metrics measured on a wide range of devices to fine-tune the
+ system for optimal user experience, see for yourself!
+
+
+
+
+
+
+
What do I get?
+
+
+ We are conducting a lucky draw. Two lucky participants, selected at
+ random, will win a pair of JBL headsets worth over ₹2,500! Also, you
+ will be helping us make the internet healthier :)
+
- We are conducting a lucky draw. Two lucky participants, selected at
- random, will win a pair of
- JBL headsets worth over ₹2,500! Also, you will be helping us make the internet healthier :)
-
+
+
Privacy policy
+
This survey collects the following information:
+
+
Device name
+
Operating system
+
Processor information
+
Benchmark results
+
+ No Personally identifying information is collected
+
-