survey index page
This commit is contained in:
parent
115b096008
commit
d640c7d5a2
6 changed files with 173 additions and 81 deletions
|
@ -22,7 +22,7 @@ mod panel;
|
||||||
pub mod routes;
|
pub mod routes;
|
||||||
//mod sitemap;
|
//mod sitemap;
|
||||||
|
|
||||||
pub const NAME: &str = "Kaizen";
|
pub const NAME: &str = "mCaptcha";
|
||||||
|
|
||||||
pub fn services(cfg: &mut ServiceConfig) {
|
pub fn services(cfg: &mut ServiceConfig) {
|
||||||
auth::services(cfg);
|
auth::services(cfg);
|
||||||
|
|
|
@ -13,8 +13,10 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
use actix_web::{http, HttpResponse, Responder};
|
use actix_web::{HttpResponse, Responder};
|
||||||
|
use lazy_static::lazy_static;
|
||||||
use my_codegen::get;
|
use my_codegen::get;
|
||||||
|
use sailfish::TemplateOnce;
|
||||||
|
|
||||||
use crate::PAGES;
|
use crate::PAGES;
|
||||||
|
|
||||||
|
@ -31,7 +33,7 @@ pub mod routes {
|
||||||
pub const fn new() -> Panel {
|
pub const fn new() -> Panel {
|
||||||
let campaigns = Campaigns::new();
|
let campaigns = Campaigns::new();
|
||||||
Panel {
|
Panel {
|
||||||
home: "/admin/home",
|
home: "/",
|
||||||
campaigns,
|
campaigns,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,12 +50,19 @@ pub fn services(cfg: &mut actix_web::web::ServiceConfig) {
|
||||||
campaigns::services(cfg);
|
campaigns::services(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[get(
|
#[derive(TemplateOnce, Default)]
|
||||||
path = "PAGES.panel.home",
|
#[template(path = "index.html")]
|
||||||
wrap = "crate::pages::get_page_check_login()"
|
struct HomePage;
|
||||||
)]
|
|
||||||
pub async fn home() -> impl Responder {
|
const PAGE: &str = "Survey";
|
||||||
HttpResponse::Found()
|
|
||||||
.insert_header((http::header::LOCATION, PAGES.panel.campaigns.home))
|
lazy_static! {
|
||||||
.finish()
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,10 @@ pub mod assets {
|
||||||
path: FILES.get("./static/cache/img/headsets.jpg").unwrap(),
|
path: FILES.get("./static/cache/img/headsets.jpg").unwrap(),
|
||||||
name: "Headsets image"
|
name: "Headsets image"
|
||||||
};
|
};
|
||||||
|
pub static ref EXTERNAL_LINK: Img = Img {
|
||||||
|
path: FILES.get("./static/cache/img/external-link.svg").unwrap(),
|
||||||
|
name: "External Link"
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
static/cache/img/external-link.svg
vendored
Normal file
1
static/cache/img/external-link.svg
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="icon" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>
|
After Width: | Height: | Size: 398 B |
|
@ -1,63 +1,88 @@
|
||||||
<. include!("./components/base/top.html"); .>
|
<. include!("./components/base/top.html"); .>
|
||||||
<body class="panel__body">
|
<body class="survey__body">
|
||||||
<main class="panel__container">
|
<main class="survey__container">
|
||||||
<h1>mCaptcha device benchmark survey</h1>
|
<h1>mCaptcha benchmark survey</h1>
|
||||||
<h2>Why should I participate</h2>
|
<section>
|
||||||
<p>
|
<h2>Why should I participate</h2>
|
||||||
<a href="https://mcaptcha.org" target="_blank">mCaptcha</a>
|
<p>
|
||||||
is a cutting edge, privacy respecting CAPTCHA system. We use a
|
<a href="https://mcaptcha.org" target="_blank">mCaptcha</a>
|
||||||
<a href="https://en.wikipedia.org/wiki/Proof_of_work" target="_blank"
|
is a cutting edge, privacy respecting CAPTCHA system. We use a
|
||||||
>proof of work</a
|
<a href="https://en.wikipedia.org/wiki/Proof_of_work" target="_blank"
|
||||||
>
|
>proof of work</a
|
||||||
based mechanism to defend against
|
>
|
||||||
<a href="https://en.wikipedia.org/wiki/Proof_of_work" target="_blank"
|
based mechanism to defend against
|
||||||
>denial-of-service attacks</a
|
<a href="https://en.wikipedia.org/wiki/Proof_of_work" target="_blank"
|
||||||
>
|
>denial-of-service attacks</a
|
||||||
which allows for a non-interactive CAPTCHA experience. We require
|
>
|
||||||
performance metrics measured on a wide range of devices to fine-tune the
|
which allows for a non-interactive CAPTCHA experience. We require
|
||||||
system for optimal user experience, see for yourself!
|
performance metrics measured on a wide range of devices to fine-tune the
|
||||||
</p>
|
system for optimal user experience, see for yourself!
|
||||||
<div style="width: 304px; height: 78px">
|
</p>
|
||||||
<iframe
|
<div class="survey__captcha-widget" style="width: 304px; height: 78px">
|
||||||
title="mCaptcha"
|
<iframe
|
||||||
src="https://demo.mcaptcha.org/widget/?sitekey=6o3p1Fx94hJRFm8g8IHBB7sv8D0em20k"
|
title="mCaptcha"
|
||||||
role="presentation"
|
src="https://demo.mcaptcha.org/widget/?sitekey=6o3p1Fx94hJRFm8g8IHBB7sv8D0em20k"
|
||||||
name="mcaptcha-widget__iframe"
|
role="presentation"
|
||||||
id="mcaptcha-widget__iframe"
|
name="mcaptcha-widget__iframe"
|
||||||
scrolling="no"
|
id="mcaptcha-widget__iframe"
|
||||||
sandbox="allow-same-origin allow-scripts"
|
scrolling="no"
|
||||||
width="304"
|
sandbox="allow-same-origin allow-scripts"
|
||||||
height="78"
|
width="304"
|
||||||
data-mcaptcha_host="https://demo.mcaptcha.org"
|
height="78"
|
||||||
frameborder="0"
|
data-mcaptcha_host="https://demo.mcaptcha.org"
|
||||||
></iframe>
|
frameborder="0"
|
||||||
</div>
|
></iframe>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h2>What do I get?</h2>
|
||||||
|
<div class="survey__prize-section">
|
||||||
|
<p>
|
||||||
|
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 :)
|
||||||
|
</p>
|
||||||
|
<a
|
||||||
|
target="_blank"
|
||||||
|
class="prize__preview"
|
||||||
|
href="https://www.amazon.in/JBL-Detachable-Directional-Headphones-Conference/dp/B0948TG7H8"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="<.= crate::assets::HEADSETS.path .>"
|
||||||
|
alt="<.= crate::assets::HEADSETS.name .>"
|
||||||
|
class="survey__prize"
|
||||||
|
/>
|
||||||
|
<p>
|
||||||
|
Product details
|
||||||
|
<img
|
||||||
|
src="<.= crate::assets::EXTERNAL_LINK.path .>"
|
||||||
|
alt="<.= crate::assets::EXTERNAL_LINK.name .>"
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<h2>What do I get?</h2>
|
<section>
|
||||||
<p>
|
<h2>Privacy policy</h2>
|
||||||
We are conducting a lucky draw. Two lucky participants, selected at
|
<p>This survey collects the following information:</p>
|
||||||
random, will win a pair of
|
<ul>
|
||||||
<a
|
<li>Device name</li>
|
||||||
target="_blank"
|
<li>Operating system</li>
|
||||||
href="https://www.amazon.in/JBL-Detachable-Directional-Headphones-Conference/dp/B0948TG7H8"
|
<li>Processor information</li>
|
||||||
>JBL headsets worth over ₹2,500</a
|
<li>Benchmark results</li>
|
||||||
>! Also, you will be helping us make the internet healthier :)
|
</ul>
|
||||||
</p>
|
<b>No Personally identifying information is collected</b>
|
||||||
|
</section>
|
||||||
|
|
||||||
<h2>Privacy policy</h2>
|
<a
|
||||||
<p>This survey collects the following information:</p>
|
class="link__btn"
|
||||||
<ul>
|
href="<.= crate::V1_API_ROUTES.benches.register .>"
|
||||||
<li>Device name</li>
|
target="_blank"
|
||||||
<li>Operating system</li>
|
>Get started</a
|
||||||
<li>Processor information</li>
|
>
|
||||||
<li>Benchmark results</li>
|
|
||||||
</ul>
|
|
||||||
<b>No Personally identifying information is collected</b>
|
|
||||||
</main>
|
</main>
|
||||||
<. include!("../components/footer/index.html"); .>
|
<. include!("./components/footer/index.html"); .>
|
||||||
<a href="<.= crate::V1_API_ROUTES.benches.register .>" target="_blank"
|
|
||||||
>Get started</a
|
|
||||||
>
|
|
||||||
</body>
|
</body>
|
||||||
<script src="./dist/bundle.js"></script>
|
<script src="<.= &*crate::GLUE .>./dist/bundle.js"></script>
|
||||||
<. include!("./components/base/bottom.html"); .>
|
<. include!("./components/base/bottom.html"); .>
|
||||||
|
|
|
@ -25,27 +25,80 @@
|
||||||
@import "./errors/main";
|
@import "./errors/main";
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
|
|
||||||
font-family: "Inter UI", -apple-system, BlinkMacSystemFont, "Roboto",
|
font-family: "Inter UI", -apple-system, BlinkMacSystemFont, "Roboto",
|
||||||
"Segoe UI", Helvetica, Arial, sans-serif;
|
"Segoe UI", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: rgb(0, 86, 179);
|
color: rgb(0, 86, 179);
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__body {
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__container {
|
||||||
|
width: 60%;
|
||||||
|
margin: 50px auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__container {
|
||||||
|
h1 {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 10px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link__btn {
|
||||||
|
margin: auto;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin: 30px 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__prize-section {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.prize__preview {
|
||||||
|
display: flex;
|
||||||
|
margin: auto;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__prize {
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.survey__captcha-widget {
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue