csp headers and img compression

This commit is contained in:
realaravinth 2021-05-29 17:31:11 +05:30
parent fd67a9fa42
commit fd32f5be32
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88
9 changed files with 68 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

After

Width:  |  Height:  |  Size: 224 KiB

View file

@ -0,0 +1,4 @@
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self' *.mcaptcha.org mcaptcha.org mcaptcha.io *.mcaptcha.io; img-src 'self'; style-src 'self'; child-src 'none'; script-src 'self';"
/>

View file

@ -1,2 +1,8 @@
<. include!("./raw-headers.html"); .>
<!DOCTYPE html>
<html lang="en">
<head>
<. include!("./preview-data.html"); .>
<. include!("./favicon.html"); .>
<. include!("./csp.html"); .>
</head>
<body class="layout">

View file

@ -0,0 +1,43 @@
<meta charset="UTF-8" />
<title><.= PAGE .> | <.= crate::pages::NAME .></title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta name="author" content="Aravinth Manivannan" />
<meta name="twitter:card" value="summary_large_image" />
<meta name="twitter:site" content="@realaravinth" />
<meta
name="twitter:title"
content="<.= PAGE .> | <.= crate::pages::NAME .>"
/>
<meta
name="twitter:description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta name="twitter:creator" content="@realaravinth" />
<meta name="twitter:image"
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
/>
<meta
property="og:title"
content="<.= PAGE .> | <.= crate::pages::NAME .>"
/>
<meta property="og:type" content="article" />
<meta property="og:url" content="https://mcaptcaha.org" />
<meta property="og:image"
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
/>
<meta
property="og:description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta property="og:site_name"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>

View file

@ -1,49 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title><.= PAGE .> | <.= crate::pages::NAME .></title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta name="author" content="Aravinth Manivannan" />
<meta name="twitter:card" value="summary_large_image" />
<meta name="twitter:site" content="@realaravinth" />
<meta
name="twitter:title"
content="<.= PAGE .> | <.= crate::pages::NAME .>"
/>
<meta
name="twitter:description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta name="twitter:creator" content="@realaravinth" />
<meta name="twitter:image"
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
/>
<meta
property="og:title"
content="<.= PAGE .> | <.= crate::pages::NAME .>"
/>
<meta property="og:type" content="article" />
<meta property="og:url" content="https://mcaptcaha.org" />
<meta property="og:image"
content="<.= crate::FILES.get("./static/cache/img/icon-trans.png").unwrap().>"
/>
<meta
property="og:description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<meta property="og:site_name"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
<. include!("./favicon.html"); .>
</head>

View file

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<. include!("./preview-data.html"); .>
<. include!("./favicon.html"); .>
</head>

View file

@ -1,4 +1,4 @@
<. include!("../components/headers/raw-headers.html"); .>
<. include!("../components/headers/widget-headers.html"); .>
<body>
<form class="widget__contaienr">
<noscript>

View file

@ -18,8 +18,8 @@
@import '../reset';
.widget__contaienr {
max-width: 350px;
max-height: 90px;
max-width: 300px;
max-height: 74px;
display: flex;
box-sizing: border-box;
}
@ -73,18 +73,19 @@
.widget__mcaptcha-logo-container {
flex: 2;
padding-top: 5px;
padding-top: 3px;
}
.widget__mcaptcha-brand-name {
font-size: 0.6rem;
font-size: 0.7rem;
font-weight: 600;
margin: auto;
text-align: center;
}
.widget__mcaptcha-logo {
display: block;
width: 45px;
width: 35px;
margin: auto;
}
@ -95,5 +96,5 @@
.widget__mcaptcha-info-link {
font-size: 0.5rem;
margin: 5px;
margin: 2px;
}