2023-10-15 20:58:20 +02:00
|
|
|
class Tag {
|
|
|
|
constructor(variant, style = "") {
|
|
|
|
this.variant = variant;
|
|
|
|
this.style = style;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener("load", () => {
|
|
|
|
const tags = [
|
|
|
|
new Tag("Comment ça marche un PC 😵💫"),
|
|
|
|
new Tag("Idiot certifié"),
|
|
|
|
new Tag("undefined", "font-family: monospace"),
|
|
|
|
new Tag("/api/v1/love", "font-family: monospace"),
|
|
|
|
new Tag("Étudiant qui va rater son master"),
|
|
|
|
new Tag("Peak D2 sur Valo 🤡"),
|
|
|
|
new Tag(
|
|
|
|
"1312",
|
|
|
|
`
|
2023-10-16 00:05:28 +02:00
|
|
|
display: inline;
|
2023-10-15 20:58:20 +02:00
|
|
|
background: linear-gradient(to bottom right, red 0%, red 50%, black 50%);
|
|
|
|
background-clip: text;
|
2023-10-23 01:42:59 +02:00
|
|
|
-webkit-background-clip: text; /* Chromium fix */
|
2023-10-15 20:58:20 +02:00
|
|
|
color: transparent;
|
|
|
|
`
|
|
|
|
),
|
|
|
|
new Tag("Nul en CSS", "font-family: 'Comic Sans MS', cursive"),
|
2023-12-12 22:14:59 +01:00
|
|
|
new Tag("Mention poufiasse"),
|
2023-10-15 20:58:20 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
const random = Math.round(Math.random() * (tags.length - 1));
|
|
|
|
const element = document.getElementById("subname");
|
|
|
|
element.textContent = tags[random].variant;
|
|
|
|
element.style = tags[random].style;
|
|
|
|
});
|