From bf7f85e777503a3d3cf7f06b79efd38027d2b98a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:12:21 +0200 Subject: [PATCH] funny statement randomized for subtitle --- static/css/index.css | 8 ++++---- static/js/index.js | 14 ++++++++++++++ templates/index.html | 16 +++++++++------- 3 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 static/js/index.js diff --git a/static/css/index.css b/static/css/index.css index cd8cd28..1fb2aa1 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -21,24 +21,24 @@ } /* Name header */ -.name { +#name { font-size: calc(var(--font-size) * 2.5); font-weight: var(--title-weight); color: var(--name-color); } -.subname { +#subname { margin-top: 0; font-size: calc(var(--font-size) * 1.07); margin-bottom: 1.5em; } -.pronouns { +#pronouns { font-size: calc(var(--font-size) * 0.8); color: var(--pronouns-color); } -.avatar { +#avatar { width: calc(var(--font-size) * 5); border-radius: 50%; float: right; diff --git a/static/js/index.js b/static/js/index.js new file mode 100644 index 0000000..8d7cdee --- /dev/null +++ b/static/js/index.js @@ -0,0 +1,14 @@ +window.addEventListener("load", () => { + const tags = [ + "Comment ça marche un PC 😵‍💫", + "Idiot certifié", + "undefined", + "/api/v1/love", + "Étudiant qui va rater son master", + "Peak D2 sur Valo", + "1312", + ]; + + let tagElement = document.getElementById("subname"); + tagElement.textContent = tags[Math.round(Math.random() * (tags.length - 1))]; +}); diff --git a/templates/index.html b/templates/index.html index 3bb89ab..16c549c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,17 +10,17 @@ {{#data}}
- {{fullname}} - (il/lui, he/him) + {{fullname}} + (il/lui, he/him) Avatar
-

Étudiant qui va rater son master

+

Bienvenue !

@@ -40,11 +40,12 @@ target="_blank" rel="noreferrer" >AGPLv3. Vous pouvez voir mon portfolio ici ! + >. Vous pouvez voir mon portfolio ici, ainsi + que mes contributions sur GitHub ici.

- Il m'arrive parfois d'écrire dans - mon blog disponible ici. + Il m'arrive aussi, parfois, d'écrire dans + sur mon blog.

@@ -71,5 +72,6 @@ {{/data}} +