WIP: Web3 files
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-04-14 17:57:10 +02:00
parent 962af8e94a
commit de2b9bb45a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 321 additions and 4 deletions

View file

@ -2,7 +2,7 @@ use actix_web::{get, web, HttpResponse, Responder};
use cached::proc_macro::once;
use ramhorns::Content;
use crate::{config::Config, template::read_md};
use crate::{config::Config, template::Infos};
#[get("/web3")]
pub async fn page(config: web::Data<Config>) -> impl Responder {
@ -12,7 +12,13 @@ pub async fn page(config: web::Data<Config>) -> impl Responder {
#[derive(Content)]
struct Web3Template {}
#[once(time = 60)]
pub fn get_page(_config: Config) -> String {
read_md("[WEB3](https://web3isgoinggreat.com/)").content
pub fn get_page(config: Config) -> String {
config.tmpl.render(
"web3.html",
Web3Template {},
Infos {
page_title: Some("Mylloon".to_string()),
page_desc: Some("Coin reculé de l'internet".to_string()),
},
)
}

47
static/css/web3.css Normal file
View file

@ -0,0 +1,47 @@
div.scroll-banner {
background-color: black;
position: absolute;
top: 0.2em;
left: 0.1%;
width: 99.8%;
overflow: hidden;
}
div.scroll-text {
text-align: right;
white-space: nowrap;
animation: marquee 13s linear infinite;
}
div.scroll-banner > div.scroll-text > * {
color: #ff6161;
font-size: 150%;
}
@keyframes marquee {
from {
transform: translateX(55%);
}
to {
transform: translateX(-100%);
}
}
@media only screen and (max-width: 850px) {
/* Mobile display */
div.info-text {
animation: marquee 9s linear infinite;
}
@keyframes marquee {
from {
transform: translateX(100%);
}
to {
transform: translateX(-210%);
}
}
}

15
static/js/web3.js Normal file
View file

@ -0,0 +1,15 @@
window.addEventListener("load", () => main());
const main = () => {
// Handle change of focus
const title = document.title;
const blurMessage = "Hey.. come back!";
window.addEventListener("blur", function () {
document.title = blurMessage;
});
window.addEventListener("focus", function () {
document.title = title;
});
};

249
templates/web3.html Normal file
View file

@ -0,0 +1,249 @@
<!DOCTYPE html>
<html class="index" lang="fr">
<head dir="ltr">
<title>{{page_title}}{{#page_title}} - {{/page_title}}{{app_name}}</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/web3.css" />
<meta name="author" content="Mylloon" />
<meta name="description" content="{{page_desc}} " />
<base target="_blank" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="icons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="icons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="icons/favicon-16x16.png"
/>
<link rel="manifest" href="icons/site.webmanifest" />
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="shortcut icon" href="icons/favicon.ico" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-config" content="icons/browserconfig.xml" />
<meta name="theme-color" content="#2a2424" />
<meta content="{{page_title}} " property="og:title" />
<meta content="{{page_desc}} " property="og:description" />
<meta content="icons/apple-touch-icon.png" property="og:image" />
<meta content="#43B581" data-react-helmet="true" name="theme-color" />
</head>
<body>
{{#data}}
<header>
<div id="scroll-banner">
<div id="scroll-text"></div>
</div>
</header>
<main></main>
<footer>
<div class="badges">
<a href="//en.wikipedia.org/wiki/Template:Smile">
<img
src="./badges/smile.gif"
alt="have a smile!"
title="yay be happy"
/>
</a>
<a href="//prismlauncher.org/">
<img
src="./badges/minecraft.gif"
alt="minecraft"
title="definitively a good game!"
/>
</a>
<a href="//p4bl0.net/post/2022/01/NFT-%3A-encore-plus-d%C3%A9bile">
<img
src="./badges/antinft.gif"
alt="anti-nft site"
title="fk you nft bros"
/>
</a>
<a href="//mylloon.fr">
<img
src="./badges/sucks.gif"
alt="this website sucks"
title="but i like it"
/>
</a>
<a href="//anybrowser.org/campaign/anybrowser_fr.html">
<img
src="./badges/anybrowser.gif"
alt="best viewed with any browser"
title="but uninstall brave"
/>
</a>
<a href="//web3isgoinggreat.com/">
<img
src="./badges/saynotoweb3.gif"
alt="keep the web free, say no to web3"
title="fuck /web3"
/>
</a>
<a href="//www.mozilla.org/fr/firefox/">
<img
src="./badges/firefox.gif"
alt="get firefox"
title="use firefox"
/>
</a>
<a href="//cyber.dabamos.de/88x31/">
<img
src="./badges/88x31.gif"
alt="88x31"
title="baaaaaaaaaaaaaaaadges"
/>
</a>
<img
onclick="javascript:alert('xdddddddddd what are you doin')"
src="./badges/noclick.gif"
alt="don't click here"
title="don't do it"
/>
<a href="//archlinux.org/">
<img
src="./badges/archlinux.gif"
alt="arch linux"
title="i use arch btw"
/>
</a>
<!-- <a href="Link to future app who have all my accounts indexed"> -->
<img
src="./badges/gamers.jpg"
alt="gamers"
title="i am a proud gamer"
/>
<!-- </a> -->
<iframe
src="//incr.easrng.net/badge?key=mylloon"
style="background: url(//incr.easrng.net/bg.gif)"
title="increment badge"
width="88"
height="31"
frameborder="0"
></iframe>
<a href="//bitwarden.com/">
<img
src="./badges/bitwarden.gif"
alt="bitwarden"
title="use a password manager"
/>
</a>
<img
src="./badges/banporn.gif"
alt="ban porn"
title="this is bad fr!!"
/>
<img
onclick="javascript:alert('jtm <3')"
src="./badges/cliquer.gif"
alt="cliquer ici"
title="do it"
/>
<a href="//www.counter-strike.net/cs2">
<img
src="./badges/csplayer.gif"
alt="counter strike player"
title="yes i am"
/>
</a>
<a href="//www.openmediavault.org/">
<img
src="./badges/debian-powered.gif"
alt="debian powered"
title="this website is hosted on debian"
/>
</a>
<a href="//discord.gg/Z5ePxH4">
<img
src="./badges/discord.gif"
alt="tired of skype? just get discord"
title="i have a discord server"
/>
</a>
<img
src="./badges/enhancedhtml.gif"
alt="enhanced html"
title="wow this html page is cool"
/>
<a href="//piaille.fr/@mylloon">
<img
src="./badges/mastodon.gif"
alt="mastodon"
title="follow my mastodon account"
/>
</a>
<a href="//open.spotify.com/user/mylloon">
<img
src="./badges/spotify.gif"
alt="spotify"
title="i use spotify, sorry"
/>
</a>
<a href="//www.mylloon.fr/web3">
<img
src="./badges/sendit.gif"
alt="send it to a friend!"
title="pls share my website"
/>
</a>
<a href="//git.mylloon.fr/Anri/csh">
<img
src="./badges/videogamescheat.gif"
alt="video game cheats"
title="have wrote only one cheat"
/>
</a>
<a href="//twitter.com/Mylloon">
<img
src="./badges/twitter.gif"
alt="twitter"
title="fk you elon musk"
/>
</a>
</div>
<br />
<p>
<a href="//fediring.net/previous?host=mylloon.fr/web3"></a>
<a href="//fediring.net/">Fediring</a>
<a href="//fediring.net/next?host=mylloon.fr/web3"></a>
</p>
</footer>
<script src="js/web3.js"></script>
{{/data}}
</body>
</html>