mylloon.fr/static/js/index.js

73 lines
2.3 KiB
JavaScript
Raw Normal View History

class Tag {
constructor(variant, style = "") {
this.variant = variant;
this.style = style;
}
}
window.addEventListener("load", () => {
2024-05-30 02:25:49 +02:00
const clipping_text = `
display: inline;
background-clip: text;
-webkit-background-clip: text; /* Chromium fix */
color: transparent;
`;
2024-06-29 13:06:59 +02:00
const mono = "font-family: monospace";
2024-05-30 02:25:49 +02:00
const tags = [
2024-06-02 17:16:09 +02:00
new Tag("Comment fonctionne un PC 😵‍💫"),
2024-06-29 13:06:59 +02:00
new Tag("undefined", mono),
new Tag("/api/v1/love", mono),
2024-09-19 15:50:37 +02:00
new Tag("/api/v1/websites", mono),
new Tag("Peak D2 sur Valo 🤡"),
new Tag(
2024-03-05 13:23:59 +01:00
"0x520",
`
background: linear-gradient(to bottom right, red 0%, red 50%, black 50%);
2024-05-30 02:25:49 +02:00
${clipping_text}
2024-05-30 10:13:22 +02:00
text-shadow: 0px 0px 20px light-dark(transparent, var(--font-color));
`
),
2024-06-02 17:16:09 +02:00
new Tag("Nul en CSS", "font-family: 'Comic Sans MS', TSCu_Comic, cursive"),
2024-03-06 13:07:39 +01:00
new Tag("anri k... caterpillar 🐛☝️"),
2024-05-30 02:25:49 +02:00
new Tag(
"Free Ukraine",
`
background: linear-gradient(to bottom, DodgerBlue 57%, gold 43%);
${clipping_text}
2024-05-30 11:24:46 +02:00
text-shadow: 0px 0px 20px light-dark(var(--font-color), transparent);
2024-05-30 02:25:49 +02:00
`
),
new Tag(
"Free Palestine",
`
background: conic-gradient(at 30% 60%, transparent 230deg, red 0, red 310deg, transparent 0),
linear-gradient(to bottom, black 45%, white 45%, white 67%, DarkGreen 67%);
2024-05-30 02:25:49 +02:00
${clipping_text}
2024-05-30 10:13:22 +02:00
text-shadow: 0px 0px 20px var(--font-color);
2024-05-30 02:25:49 +02:00
`
),
2024-06-02 17:16:09 +02:00
new Tag("School hater"),
2024-09-22 17:02:03 +02:00
new Tag("Étudiant"),
2024-06-17 15:08:08 +02:00
new Tag("Rempli de malice"),
2024-06-17 15:15:46 +02:00
new Tag(
"#NouveauFrontPopulaire ✊",
`
2024-06-17 15:20:30 +02:00
background: linear-gradient(to bottom, #4fb26b 0%, #4fb26b 36%, \
#e62e35 36%, #e62e35 50%, \
#feeb25 50%, #feeb25 62%, \
#724e99 62%, #724e99 77%, \
#e73160 77%);
2024-06-17 15:15:46 +02:00
${clipping_text}
2024-06-17 16:24:45 +02:00
text-shadow: 0px 0px 20px light-dark(var(--font-color), transparent);
2024-06-17 15:15:46 +02:00
`
),
2024-06-29 13:06:59 +02:00
new Tag("s/centre/droite/g", mono),
];
const random = Math.round(Math.random() * (tags.length - 1));
const element = document.getElementById("subname");
element.textContent = tags[random].variant;
element.style = tags[random].style;
});