From ccf1d7f8a55cb76617abaceca18ac6ea6e29fa90 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 14 Sep 2023 17:55:01 +0200 Subject: [PATCH 01/70] Remove old style, add navbar --- static/css/style.css | 191 ++---------------------------------------- templates/index.html | 11 +-- templates/navbar.html | 19 +++++ 3 files changed, 29 insertions(+), 192 deletions(-) create mode 100644 templates/navbar.html diff --git a/static/css/style.css b/static/css/style.css index 45f0a20..d4cda74 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,189 +1,12 @@ -/* Normal font */ -@font-face { - font-family: "Luciole"; - font-style: normal; - font-weight: normal; - src: url(/css/fonts/Luciole-Regular.ttf); -} - -/* Italic font */ -@font-face { - font-family: "Luciole"; - font-style: italic; - font-weight: normal; - src: url(/css/fonts/Luciole-Regular-Italic.ttf); -} - -/* Bold fond */ -@font-face { - font-family: "Luciole"; - font-style: normal; - font-weight: bold; - src: url(/css/fonts/Luciole-Bold.ttf); -} - -/* Bold italic font */ -@font-face { - font-family: "Luciole"; - font-style: italic; - font-weight: bold; - src: url(/css/fonts/Luciole-Bold-Italic.ttf); -} - -/* Page bottom */ -footer { - margin-top: 1em; - height: 3rem; -} - -/* Regular tags */ -html { - position: relative; - min-height: 100vh; - height: 100%; - scroll-behavior: smooth; -} - -body { - position: relative; - padding-bottom: 3em; - min-height: 90%; - background-color: rgb(24, 24, 24); -} - -p, -h1, -h2, -h3, -li, -a { - font-family: "Luciole", sans-serif; -} - -::selection { - color: rgb(255, 255, 255); - background: rgba(124, 75, 173, 0.486); -} - -/* Frames */ -h1.subtitle { - text-decoration: none; - color: rgb(28, 118, 236); -} - -h1#title { - text-align: center; - color: rgb(28, 236, 174); -} - -h2.subtitle, -h2.subtitle a { - color: rgb(28, 118, 236) !important; -} - -h3.subsubtitle, -#content h3.subsubtitle a { - text-align: left; - color: rgb(149, 87, 201); -} - -#content h3.subsubtitle a:hover { - color: rgb(0, 181, 236); - transition: color 0.1s; -} - -div#content { - margin-left: auto; - margin-right: auto; - margin-top: 2%; - padding: 0.9% 0.9% 0.9% 0.9%; - width: 42%; - border-radius: 6px; - border: 1px solid rgb(170, 170, 170); - text-align: center; -} - -@media only screen and (max-width: 850px) { - /* Mobile display */ - div#content { - width: 90%; - } -} - -#content a, -#content a:visited, -#content ul { - text-decoration: none; - color: rgb(201, 201, 201); - text-align: center; -} - -#content p { - text-decoration: none; - color: rgb(201, 201, 201); - text-align: center; - padding: 0.7em; -} - -#content a:hover { - color: rgb(0, 181, 236); - transition: color 0.1s; -} - -/* https://stackoverflow.com/a/40244401/15436737 */ - -#content a { - position: relative; - text-decoration: none; +.navbar li { display: inline-block; } -#content a:after { - display: block; +.navbar p::after { + content: "·"; + padding: 10px; +} + +.navbar li:last-child p::after { content: ""; - border-bottom: solid 3px; - transform: scaleX(0); - transition: transform 250ms ease-in-out; - transform-origin: 100% 50%; -} - -#content a:hover:after { - transform: scaleX(1); - transform-origin: 0 50%; -} - -/* ------------------------------------------- */ - -div.subcontent { - margin-left: auto; - margin-right: auto; - margin-top: 5%; - padding: 1.2% 1.2% 1.2% 1.2%; - width: 78%; - border-radius: 6px; - border: 1px solid rgb(170, 170, 170); - text-align: center; -} - -#listecontent li { - margin-bottom: 0.5em; -} - -/* Back links going to the index */ -footer.backToIndexPage { - text-align: center; -} - -footer.backToIndexPage a { - color: rgb(114, 180, 76); - text-decoration: none; -} - -footer.backToIndexPage a:hover { - color: rgb(152, 187, 132); -} - -/* Hide content */ -.hide { - display: none; } diff --git a/templates/index.html b/templates/index.html index b86b402..4d4d99e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,14 +1,9 @@ - + {{>head.html}} - -
-

Blog

-

Portfolio

-

Réseaux

-

Contributions

-

Cours (external)

+ + {{>navbar.html}} diff --git a/templates/navbar.html b/templates/navbar.html new file mode 100644 index 0000000..81640ba --- /dev/null +++ b/templates/navbar.html @@ -0,0 +1,19 @@ + -- 2.45.2 From 8bbc0a8c56b808214e0b6ba707a64024bdf1c5f6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 14 Sep 2023 22:57:29 +0200 Subject: [PATCH 02/70] clippy --- src/routes/blog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/blog.rs b/src/routes/blog.rs index 053989b..b29f12e 100644 --- a/src/routes/blog.rs +++ b/src/routes/blog.rs @@ -234,7 +234,7 @@ fn get_post( page_title: Some(format!("Post: {}", title)), page_desc: Some(format!("Blog d'{name}")), page_kw: Some( - vec!["blog", "blogging", "write", "writing"] + ["blog", "blogging", "write", "writing"] .iter() .map(|&tag| tag.to_owned()) .chain(tags.into_iter().map(|t| t.name)) -- 2.45.2 From a83256b2699b4f056c0890e09f93c4e708c75c03 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 14 Sep 2023 23:46:48 +0200 Subject: [PATCH 03/70] keep bang --- src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.rs b/src/config.rs index d6601f6..e3d6b1e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -124,6 +124,7 @@ fn init(dist_dir: String, static_dir: String, templates_dir: String) -> String { keep_closing_tags: true, minify_css: true, minify_js: true, + remove_bangs: false, ..minify_html::Cfg::spec_compliant() }; -- 2.45.2 From dfe1d9f263d7fc09a5f46bddcebaa7447342043a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 14 Sep 2023 23:50:21 +0200 Subject: [PATCH 04/70] Add bold --- src/routes/index.rs | 19 +++++++++++++++++-- src/template.rs | 10 ++++++++++ static/css/style.css | 4 ++++ templates/navbar.html | 27 ++++++++++++++++++++++----- 4 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/routes/index.rs b/src/routes/index.rs index e09e85b..b6707a5 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -1,7 +1,12 @@ use actix_web::{get, web, HttpRequest, HttpResponse, Responder}; use cached::proc_macro::once; +use ramhorns::Content; -use crate::{config::Config, misc::utils::get_url, template::Infos}; +use crate::{ + config::Config, + misc::utils::get_url, + template::{Infos, NavBar}, +}; #[get("/")] pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { @@ -11,11 +16,21 @@ pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder )) } +#[derive(Content, Debug)] +struct IndexTemplate { + navbar: NavBar, +} + #[once(time = 60)] pub fn build_page(config: Config, url: String) -> String { config.tmpl.render( "index.html", - (), + IndexTemplate { + navbar: NavBar { + index: true, + ..NavBar::default() + }, + }, Infos { page_title: config.fc.fullname, page_desc: Some("Page principale".into()), diff --git a/src/template.rs b/src/template.rs index c0bc404..14f8341 100644 --- a/src/template.rs +++ b/src/template.rs @@ -22,6 +22,16 @@ pub struct Infos { pub url: String, } +#[derive(Content, Debug, Default)] +pub struct NavBar { + pub index: bool, + pub blog: bool, + pub portfolio: bool, + pub networks: bool, + pub contrib: bool, + pub cours: bool, +} + /// Final structure given to template #[derive(Content, Debug)] struct Data { diff --git a/static/css/style.css b/static/css/style.css index d4cda74..a974097 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -10,3 +10,7 @@ .navbar li:last-child p::after { content: ""; } + +.bold { + font-weight: bold; +} diff --git a/templates/navbar.html b/templates/navbar.html index 81640ba..63c5048 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -1,19 +1,36 @@ +{{#data}}{{#navbar}} +{{/navbar}}{{/data}} -- 2.45.2 From 7f3e2b7f38fd734e3759f12bc0eb9e843b9aff88 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 14 Sep 2023 23:52:51 +0200 Subject: [PATCH 05/70] ahah, no errors :) --- templates/navbar.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/navbar.html b/templates/navbar.html index 63c5048..13dcbce 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -2,32 +2,32 @@
+ {{/error}} {{/data}} {{>footer.html}} diff --git a/templates/index.html b/templates/index.html index 135e0aa..af8009a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,7 +19,7 @@ loading="lazy" /> -

Etudiant qui va rater son master

+

Étudiant qui va rater son master

Bienvenue !

diff --git a/templates/networks.html b/templates/networks.html index 4565554..ddafc5d 100644 --- a/templates/networks.html +++ b/templates/networks.html @@ -4,7 +4,8 @@ {{>head.html}} -
+
{{>navbar.html}}
+

Contacts et réseaux sociaux

Keyoxide

-
+ {{>footer.html}} diff --git a/templates/portfolio.html b/templates/portfolio.html index 82f2017..d2df116 100644 --- a/templates/portfolio.html +++ b/templates/portfolio.html @@ -4,47 +4,50 @@ {{>head.html}} +
{{>navbar.html}}
{{#data}} -

Projets qui me tiennent à coeur

-
-

Bots

-
- {{#bots_app}} {{#metadata}} {{#info}} -

- {{title}} -

- {{/info}} {{/metadata}} -
{{&content}}
- {{/bots_app}} {{^bots_app}} -

{{bots_loc}} {{err_msg}}

- {{/bots_app}} -
-
-

- Projet de l'université -

-
- {{&univ_content}} {{^univ_content}} -

{{univ_loc}} {{err_msg}}

- {{/univ_content}} -
+
+

Projets qui me tiennent à coeur

+
+

Bots

+
+ {{#bots_app}} {{#metadata}} {{#info}} +

+ {{title}} +

+ {{/info}} {{/metadata}} +
{{&content}}
+ {{/bots_app}} {{^bots_app}} +

{{bots_loc}} {{err_msg}}

+ {{/bots_app}} +
+
+

+ Projet de l'université +

+
+ {{&univ_content}} {{^univ_content}} +

{{univ_loc}} {{err_msg}}

+ {{/univ_content}} +
-

Projets perso

-
- {{#persos_app}} {{#metadata}} {{#info}} -

- {{title}} -

- {{/info}} {{/metadata}} -
{{&content}}
- {{/persos_app}} {{^persos_app}} -

{{persos_loc}} {{err_msg}}

- {{/persos_app}} -
+

Projets perso

+
+ {{#persos_app}} {{#metadata}} {{#info}} +

+ {{title}} +

+ {{/info}} {{/metadata}} +
{{&content}}
+ {{/persos_app}} {{^persos_app}} +

{{persos_loc}} {{err_msg}}

+ {{/persos_app}} +
+
-
+
{{/data}} {{>footer.html}} -- 2.45.2 From d0042dfa65c9a7674afcc4e77448cb6bb53981e3 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 12:52:20 +0200 Subject: [PATCH 12/70] Update colors and sizes --- static/css/constants.css | 2 +- static/css/index.css | 44 +++++++++++++++++++++++++++++++--------- static/css/style.css | 6 ++++++ templates/index.html | 6 ++++++ 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/static/css/constants.css b/static/css/constants.css index 760d563..a68e57d 100644 --- a/static/css/constants.css +++ b/static/css/constants.css @@ -18,5 +18,5 @@ /* Global parameters */ :root { - --font-size: 17px; + --font-size: 1.15rem; } diff --git a/static/css/index.css b/static/css/index.css index 3f7c9bc..487b7bb 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -1,41 +1,50 @@ /* Parameters light */ @media (prefers-color-scheme: light) { :root { - --name-color: #e61515; - --pronouns-color: #646062; + --name-color: #d30f39; + --pronouns-color: #6c6f85; + --font-color: #4c4f69; } } /* Parameters dark */ @media (prefers-color-scheme: dark) { :root { - --name-color: #ee9cc5; - --pronouns-color: #7c7579; + --name-color: #f38ba8; + --pronouns-color: #a6adc8; + --font-color: #c8d0ee; } } +:root { + --title-weight: 600; +} + /* Page theme */ main { color: var(--font-color); font-size: var(--font-size); - margin-inline: 25%; + margin-inline: 27%; padding: 2em 1em; + font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; + color: var(--font-color); } /* Name header */ .name { - font-size: 2.2rem; + font-size: calc(var(--font-size) * 2.5); + font-weight: var(--title-weight); color: var(--name-color); } .subname { margin-top: 0; - font-size: large; + font-size: calc(var(--font-size) * 1.07); margin-bottom: 1.5em; } .pronouns { - font-size: smaller; + font-size: calc(var(--font-size) * 0.8); color: var(--pronouns-color); } @@ -45,8 +54,23 @@ main { float: right; } +@media only screen and (max-width: 640px) { + main { + margin-inline: 0; + } + .avatar { + visibility: collapse; + } +} + /* Description */ -h1 { - font-weight: 600; +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: var(--title-weight); + font-size: calc(var(--font-size) * 1.6); margin-bottom: 0; } diff --git a/static/css/style.css b/static/css/style.css index d4e3614..7bcb88d 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -25,6 +25,12 @@ a { padding: 10px; } +@media only screen and (max-width: 640px) { + .navbar p::after { + padding: 4px; + } +} + .navbar li:last-child p::after { content: ""; } diff --git a/templates/index.html b/templates/index.html index af8009a..c54e1c4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -26,6 +26,12 @@

Content de vous voir ici !

+ + {{/data}} -- 2.45.2 From 7690c3d56c60b89893c7d68a7a9486f7e907fdb1 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 13:11:31 +0200 Subject: [PATCH 13/70] Add better resizable window and increase avatar size --- static/css/index.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index 487b7bb..285d7c2 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -24,10 +24,11 @@ main { color: var(--font-color); font-size: var(--font-size); - margin-inline: 27%; padding: 2em 1em; font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; color: var(--font-color); + margin: 0 auto; + max-width: 640px; /* breakpoint */ } /* Name header */ @@ -49,17 +50,18 @@ main { } .avatar { - width: 65px; + width: 90px; border-radius: 50%; float: right; } +/* breakpoint */ @media only screen and (max-width: 640px) { main { margin-inline: 0; } .avatar { - visibility: collapse; + visibility: hidden; } } -- 2.45.2 From 010fbabb48561164be7a17923f36ffffca3889e6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 13:19:28 +0200 Subject: [PATCH 14/70] move avatar to top of screen when screen is smol --- static/css/index.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/css/index.css b/static/css/index.css index 285d7c2..52662fa 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -60,8 +60,11 @@ main { main { margin-inline: 0; } + .avatar { - visibility: hidden; + float: none; + width: 80px; + transform: translate(-350px, -50px); } } -- 2.45.2 From f38df6aed2b2f77d8557795ecd40555db4120a4b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 13:29:47 +0200 Subject: [PATCH 15/70] ooupsie --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index c54e1c4..19c242d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,7 +27,7 @@ -- 2.45.2 From 4e775242b6e529223d27b6803d3632480c0a0ce2 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 13:29:52 +0200 Subject: [PATCH 16/70] scale with font size --- static/css/index.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/css/index.css b/static/css/index.css index 52662fa..b7f22c6 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -64,7 +64,10 @@ main { .avatar { float: none; width: 80px; - transform: translate(-350px, -50px); + transform: translate( + calc(var(--font-size) * -19), + calc(var(--font-size) * -3) + ); } } -- 2.45.2 From b077879759de9fd11994a4c0aa9139a0267879b7 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 13:46:55 +0200 Subject: [PATCH 17/70] scale avatar size on font size --- static/css/index.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index b7f22c6..6b87291 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -50,7 +50,7 @@ main { } .avatar { - width: 90px; + width: calc(var(--font-size) * 5); border-radius: 50%; float: right; } @@ -62,11 +62,11 @@ main { } .avatar { - float: none; - width: 80px; + position: absolute; + width: calc(var(--font-size) * 4); transform: translate( calc(var(--font-size) * -19), - calc(var(--font-size) * -3) + calc(var(--font-size) * -3.7) ); } } -- 2.45.2 From 1a98f8af01c33ba9f5a4abe9ccadbec15dd43e41 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 14:00:01 +0200 Subject: [PATCH 18/70] nailed in 21_12 --- templates/index.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index 19c242d..e2e4770 100644 --- a/templates/index.html +++ b/templates/index.html @@ -28,8 +28,13 @@ {{/data}} -- 2.45.2 From 4d2db6b4f03464467fdb6b1304e8ac132be0ff46 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 14:03:28 +0200 Subject: [PATCH 19/70] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71cf1d2..8604739 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ onion = "http://youraddress.onion/" ## Example of [`config.toml`](./config/config.toml) ```toml -mail = your.mail at host.com" +mail = "your.mail at host.com" lang = "lang" onion = "http://youraddress.onion/" app_name = "Nickname" -- 2.45.2 From 39a28ea745791b7b5db1649f0490039a27358faf Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:04:09 +0200 Subject: [PATCH 20/70] font family as global variable --- static/css/constants.css | 1 + static/css/index.css | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/static/css/constants.css b/static/css/constants.css index a68e57d..ffcb394 100644 --- a/static/css/constants.css +++ b/static/css/constants.css @@ -19,4 +19,5 @@ /* Global parameters */ :root { --font-size: 1.15rem; + --font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; } diff --git a/static/css/index.css b/static/css/index.css index 6b87291..d0d9287 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -25,7 +25,7 @@ main { color: var(--font-color); font-size: var(--font-size); padding: 2em 1em; - font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: var(--font-family); color: var(--font-color); margin: 0 auto; max-width: 640px; /* breakpoint */ @@ -72,12 +72,7 @@ main { } /* Description */ -h1, -h2, -h3, -h4, -h5, -h6 { +h1 { font-weight: var(--title-weight); font-size: calc(var(--font-size) * 1.6); margin-bottom: 0; -- 2.45.2 From 7aa32aabf639f9d762e947d2d3c38e389e1d7093 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:10:03 +0200 Subject: [PATCH 21/70] networks to contact --- src/main.rs | 4 ++-- src/routes/{networks.rs => contact.rs} | 8 ++++---- src/routes/mod.rs | 2 +- src/template.rs | 2 +- templates/{networks.html => contact.html} | 0 templates/navbar.html | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) rename src/routes/{networks.rs => contact.rs} (87%) rename templates/{networks.html => contact.html} (100%) diff --git a/src/main.rs b/src/main.rs index d21a16e..98d5f0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use actix_web::{middleware::DefaultHeaders, web, App, HttpServer}; use std::io::Result; use crate::routes::{ - agreements, api_v1, blog, contrib, cours, cv, gaming, index, memorial, networks, not_found, + agreements, api_v1, blog, contact, contrib, cours, cv, gaming, index, memorial, not_found, portfolio, setup, web3, }; @@ -47,7 +47,7 @@ async fn main() -> Result<()> { .service(cv::page) .service(gaming::page) .service(memorial::page) - .service(networks::page) + .service(contact::page) .service(portfolio::page) .service(setup::page) .service(web3::page) diff --git a/src/routes/networks.rs b/src/routes/contact.rs similarity index 87% rename from src/routes/networks.rs rename to src/routes/contact.rs index 35b184f..cb02464 100644 --- a/src/routes/networks.rs +++ b/src/routes/contact.rs @@ -8,7 +8,7 @@ use crate::{ template::{Infos, NavBar}, }; -#[get("/networks")] +#[get("/contact")] pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), @@ -24,15 +24,15 @@ struct NetworksTemplate { #[once(time = 60)] pub fn build_page(config: Config, url: String) -> String { config.tmpl.render( - "networks.html", + "contact.html", NetworksTemplate { navbar: NavBar { - networks: true, + contact: true, ..NavBar::default() }, }, Infos { - page_title: Some("Mes réseaux".into()), + page_title: Some("Contacts".into()), page_desc: Some(format!("Réseaux d'{}", config.fc.name.unwrap_or_default())), page_kw: None, url, diff --git a/src/routes/mod.rs b/src/routes/mod.rs index da3bd5d..137a5c4 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,13 +1,13 @@ pub mod agreements; pub mod api_v1; pub mod blog; +pub mod contact; pub mod contrib; pub mod cours; pub mod cv; pub mod gaming; pub mod index; pub mod memorial; -pub mod networks; pub mod not_found; pub mod portfolio; pub mod setup; diff --git a/src/template.rs b/src/template.rs index 14f8341..e01279a 100644 --- a/src/template.rs +++ b/src/template.rs @@ -27,7 +27,7 @@ pub struct NavBar { pub index: bool, pub blog: bool, pub portfolio: bool, - pub networks: bool, + pub contact: bool, pub contrib: bool, pub cours: bool, } diff --git a/templates/networks.html b/templates/contact.html similarity index 100% rename from templates/networks.html rename to templates/contact.html diff --git a/templates/navbar.html b/templates/navbar.html index bf71270..2edf67f 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -28,10 +28,10 @@
  • RéseauxContact

  • -- 2.45.2 From 73d7dd0b8a1fd9b783078563ad818a7c9c59c920 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:22:55 +0200 Subject: [PATCH 22/70] useless statement --- static/css/index.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index d0d9287..e703844 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -57,10 +57,6 @@ main { /* breakpoint */ @media only screen and (max-width: 640px) { - main { - margin-inline: 0; - } - .avatar { position: absolute; width: calc(var(--font-size) * 4); -- 2.45.2 From 13f2cd3dbfcbc2292b6ba7a2767d709d5a86c3b0 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:45:58 +0200 Subject: [PATCH 23/70] target blank since univ.* isnt www.* --- templates/navbar.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/navbar.html b/templates/navbar.html index 2edf67f..e3b0d17 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -51,6 +51,7 @@ class="_ {{#cours}}bold{{/cours}}" href="https://univ.mylloon.fr" title="Page des cours" + target="_blank" >Cours

    -- 2.45.2 From 35a0882feaa5cd34640aedba6f2313ad31a38703 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:52:49 +0200 Subject: [PATCH 24/70] azaz --- templates/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index e2e4770..ed34227 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,7 +33,14 @@ title="21_12's GitHub" target="_blank" rel="noreferrer" - >21_1221_12 + Azazoul --> -- 2.45.2 From 5d91c0ebd11f5ee84b6c383eed0c1d02c6450f57 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:53:26 +0200 Subject: [PATCH 25/70] rework contact page --- static/css/contact.css | 29 +++++ templates/contact.html | 283 +++++++++++++++++++++++++++-------------- 2 files changed, 215 insertions(+), 97 deletions(-) create mode 100644 static/css/contact.css diff --git a/static/css/contact.css b/static/css/contact.css new file mode 100644 index 0000000..31a89ae --- /dev/null +++ b/static/css/contact.css @@ -0,0 +1,29 @@ +/* Parameters light */ +@media (prefers-color-scheme: light) { + :root { + } +} + +/* Parameters dark */ +@media (prefers-color-scheme: dark) { + :root { + } +} + +:root { +} + +/* Page theme */ +main { + color: var(--font-color); + font-size: var(--font-size); + padding: 2em 1em; + font-family: var(--font-family); + color: var(--font-color); + margin: 0 auto; + max-width: 640px; /* breakpoint */ +} + +/* breakpoint */ +@media only screen and (max-width: 640px) { +} diff --git a/templates/contact.html b/templates/contact.html index ddafc5d..f6c50a6 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -2,107 +2,196 @@ {{>head.html}} +
    {{>navbar.html}}
    -

    Contacts et réseaux sociaux

    -

    - Email -

    -

    - Twitter / - Mastodon -

    -

    - Compte et - Serveur Discord / - Serveur Revolt -

    -

    - Reddit -

    -

    - Instagram / - Pixelfed -

    -

    - Github / - Gitlab / - Codeberg / - Mon Git -

    -

    - Kitsu -

    -

    - Steam -

    -

    - Youtube / - Twitch -

    -

    - Keyoxide -

    +

    Réseaux sociaux

    + + +

    Forges

    +
      +
    • +

      + Github : + Mylloon +

      +
    • +
    • +

      + Gitlab : + Mylloon +

      +
    • +
    • +

      + Codeberg : + Mylloon +

      +
    • +
    • +

      + Forgejo (mon instance) : + Anri +

      +
    • +
    + +

    Autre

    +
    - {{>footer.html}} -- 2.45.2 From df7e9d068b524f99babef9b945d61af6a7004897 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 16:20:49 +0200 Subject: [PATCH 26/70] remove useless pub keywords --- src/misc/markdown.rs | 2 +- src/routes/agreements.rs | 8 ++++---- src/routes/api_v1.rs | 2 +- src/routes/blog.rs | 8 ++++---- src/routes/contact.rs | 4 ++-- src/routes/contrib.rs | 4 ++-- src/routes/cours.rs | 2 +- src/routes/cv.rs | 2 +- src/routes/gaming.rs | 2 +- src/routes/index.rs | 4 ++-- src/routes/memorial.rs | 2 +- src/routes/not_found.rs | 2 +- src/routes/portfolio.rs | 4 ++-- src/routes/setup.rs | 2 +- src/routes/web3.rs | 4 ++-- 15 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/misc/markdown.rs b/src/misc/markdown.rs index a58b242..932875b 100644 --- a/src/misc/markdown.rs +++ b/src/misc/markdown.rs @@ -86,7 +86,7 @@ pub fn get_options() -> ComrakOptions { } /// Transform markdown string to File structure -pub fn read(raw_text: &str) -> File { +fn read(raw_text: &str) -> File { let arena = Arena::new(); let options = get_options(); diff --git a/src/routes/agreements.rs b/src/routes/agreements.rs index 91a87a7..1aaca6d 100644 --- a/src/routes/agreements.rs +++ b/src/routes/agreements.rs @@ -6,7 +6,7 @@ use ramhorns::Content; #[routes] #[get("/.well-known/security.txt")] #[get("/security.txt")] -pub async fn security(req: HttpRequest, config: web::Data) -> impl Responder { +async fn security(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_securitytxt( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -34,7 +34,7 @@ fn build_securitytxt(config: Config, url: String) -> String { } #[get("/humans.txt")] -pub async fn humans(config: web::Data) -> impl Responder { +async fn humans(config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_humanstxt(config.get_ref().to_owned())) } @@ -59,7 +59,7 @@ fn build_humanstxt(config: Config) -> String { } #[get("/robots.txt")] -pub async fn robots() -> impl Responder { +async fn robots() -> impl Responder { HttpResponse::Ok().body(build_robotstxt()) } @@ -69,7 +69,7 @@ fn build_robotstxt() -> String { } #[get("/sitemap.xml")] -pub async fn sitemap() -> impl Responder { +async fn sitemap() -> impl Responder { // TODO actix_web::web::Redirect::to("/") } diff --git a/src/routes/api_v1.rs b/src/routes/api_v1.rs index e56c0ef..5068f02 100644 --- a/src/routes/api_v1.rs +++ b/src/routes/api_v1.rs @@ -7,7 +7,7 @@ struct Info { } #[get("/love")] -pub async fn love() -> impl Responder { +async fn love() -> impl Responder { HttpResponse::Ok().json(Info { unix_epoch: 1605576600, }) diff --git a/src/routes/blog.rs b/src/routes/blog.rs index b29f12e..779f90b 100644 --- a/src/routes/blog.rs +++ b/src/routes/blog.rs @@ -27,7 +27,7 @@ use crate::{ const MIME_TYPE_RSS: &str = "application/rss+xml"; #[get("/blog")] -pub async fn index(req: HttpRequest, config: web::Data) -> impl Responder { +async fn index(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_index( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -41,7 +41,7 @@ struct BlogIndexTemplate { } #[once(time = 120)] -pub fn build_index(config: Config, url: String) -> String { +fn build_index(config: Config, url: String) -> String { let mut posts = get_posts("data/blog"); // Sort from newest to oldest @@ -177,7 +177,7 @@ struct BlogPostTemplate { } #[get("/blog/p/{id}")] -pub async fn page( +async fn page( req: HttpRequest, path: web::Path<(String,)>, config: web::Data, @@ -248,7 +248,7 @@ fn get_post( } #[get("/blog/rss")] -pub async fn rss(req: HttpRequest, config: web::Data) -> impl Responder { +async fn rss(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok() .append_header(("content-type", MIME_TYPE_RSS)) .body(build_rss( diff --git a/src/routes/contact.rs b/src/routes/contact.rs index cb02464..0636a1d 100644 --- a/src/routes/contact.rs +++ b/src/routes/contact.rs @@ -9,7 +9,7 @@ use crate::{ }; #[get("/contact")] -pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { +async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -22,7 +22,7 @@ struct NetworksTemplate { } #[once(time = 60)] -pub fn build_page(config: Config, url: String) -> String { +fn build_page(config: Config, url: String) -> String { config.tmpl.render( "contact.html", NetworksTemplate { diff --git a/src/routes/contrib.rs b/src/routes/contrib.rs index 9bc7b1c..4d134fc 100644 --- a/src/routes/contrib.rs +++ b/src/routes/contrib.rs @@ -13,7 +13,7 @@ use cached::proc_macro::once; use ramhorns::Content; #[get("/contrib")] -pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { +async fn page(req: HttpRequest, config: web::Data) -> impl Responder { let url = get_url(req.connection_info()); HttpResponse::Ok().body(build_page(config.get_ref().to_owned(), url).await) } @@ -46,7 +46,7 @@ struct Pull { } #[once(time = 120)] -pub async fn build_page(config: Config, url: String) -> String { +async fn build_page(config: Config, url: String) -> String { let navbar = NavBar { contrib: true, ..NavBar::default() diff --git a/src/routes/cours.rs b/src/routes/cours.rs index f43ea62..b86662c 100644 --- a/src/routes/cours.rs +++ b/src/routes/cours.rs @@ -1,7 +1,7 @@ use actix_web::{get, Responder}; #[get("/cours")] -pub async fn page() -> impl Responder { +async fn page() -> impl Responder { // TODO actix_web::web::Redirect::to("/") } diff --git a/src/routes/cv.rs b/src/routes/cv.rs index c9e4cdd..de687ca 100644 --- a/src/routes/cv.rs +++ b/src/routes/cv.rs @@ -1,7 +1,7 @@ use actix_web::{get, Responder}; #[get("/cv")] -pub async fn page() -> impl Responder { +async fn page() -> impl Responder { // TODO actix_web::web::Redirect::to("/") } diff --git a/src/routes/gaming.rs b/src/routes/gaming.rs index 5885bcc..c8ab433 100644 --- a/src/routes/gaming.rs +++ b/src/routes/gaming.rs @@ -1,7 +1,7 @@ use actix_web::{get, Responder}; #[get("/gaming")] -pub async fn page() -> impl Responder { +async fn page() -> impl Responder { // TODO actix_web::web::Redirect::to("/") } diff --git a/src/routes/index.rs b/src/routes/index.rs index fe13f4b..c3f3dce 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -9,7 +9,7 @@ use crate::{ }; #[get("/")] -pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { +async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -23,7 +23,7 @@ struct IndexTemplate { } #[once(time = 60)] -pub fn build_page(config: Config, url: String) -> String { +fn build_page(config: Config, url: String) -> String { config.tmpl.render( "index.html", IndexTemplate { diff --git a/src/routes/memorial.rs b/src/routes/memorial.rs index 2ade9da..595f411 100644 --- a/src/routes/memorial.rs +++ b/src/routes/memorial.rs @@ -1,7 +1,7 @@ use actix_web::{get, Responder}; #[get("/memorial")] -pub async fn page() -> impl Responder { +async fn page() -> impl Responder { // Memorial? J'espere ne jamais faire cette page lol actix_web::web::Redirect::to("/") } diff --git a/src/routes/not_found.rs b/src/routes/not_found.rs index 21650e7..014c0cf 100644 --- a/src/routes/not_found.rs +++ b/src/routes/not_found.rs @@ -17,7 +17,7 @@ struct NotFoundTemplate { } #[once(time = 60)] -pub fn build_page(config: Config) -> String { +fn build_page(config: Config) -> String { config.tmpl.render( "404.html", NotFoundTemplate { diff --git a/src/routes/portfolio.rs b/src/routes/portfolio.rs index fb1f0f6..b27416b 100644 --- a/src/routes/portfolio.rs +++ b/src/routes/portfolio.rs @@ -13,7 +13,7 @@ use crate::{ }; #[get("/portfolio")] -pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { +async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -33,7 +33,7 @@ struct PortfolioTemplate<'a> { } #[once(time = 60)] -pub fn build_page(config: Config, url: String) -> String { +fn build_page(config: Config, url: String) -> String { let projects_dir = "data/projects"; let ext = ".md"; diff --git a/src/routes/setup.rs b/src/routes/setup.rs index 4a8d1f2..dc6bf2a 100644 --- a/src/routes/setup.rs +++ b/src/routes/setup.rs @@ -1,7 +1,7 @@ use actix_web::{get, Responder}; #[get("/setup")] -pub async fn page() -> impl Responder { +async fn page() -> impl Responder { // Explication de l'histoire de par exemple wiki/cat et le follow up // avec les futures video youtube probablement un shortcut // vers un billet de blog diff --git a/src/routes/web3.rs b/src/routes/web3.rs index 93e2c9e..0c8ccc8 100644 --- a/src/routes/web3.rs +++ b/src/routes/web3.rs @@ -4,7 +4,7 @@ use cached::proc_macro::once; use crate::{config::Config, misc::utils::get_url, template::Infos}; #[get("/web3")] -pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { +async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), get_url(req.connection_info()), @@ -12,7 +12,7 @@ pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder } #[once(time = 60)] -pub fn build_page(config: Config, url: String) -> String { +fn build_page(config: Config, url: String) -> String { config.tmpl.render( "web3.html", (), -- 2.45.2 From 56661ec4367cc460d4ddb403f19b466166f9a74b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 17:17:46 +0200 Subject: [PATCH 27/70] use custom redirection --- src/main.rs | 1 + src/routes/contact.rs | 45 +++++++++++++++++++++++++++++++++++++++++- templates/contact.html | 30 ++++++++++++++-------------- 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/src/main.rs b/src/main.rs index 98d5f0d..9b13a10 100644 --- a/src/main.rs +++ b/src/main.rs @@ -48,6 +48,7 @@ async fn main() -> Result<()> { .service(gaming::page) .service(memorial::page) .service(contact::page) + .service(contact::service_redirection) .service(portfolio::page) .service(setup::page) .service(web3::page) diff --git a/src/routes/contact.rs b/src/routes/contact.rs index 0636a1d..20187ff 100644 --- a/src/routes/contact.rs +++ b/src/routes/contact.rs @@ -1,4 +1,4 @@ -use actix_web::{get, web, HttpRequest, HttpResponse, Responder}; +use actix_web::{get, routes, web, HttpRequest, HttpResponse, Responder}; use cached::proc_macro::once; use ramhorns::Content; @@ -16,6 +16,49 @@ async fn page(req: HttpRequest, config: web::Data) -> impl Responder { )) } +#[routes] +#[get("/contact/{service}")] +#[get("/contact/{service}/{scope}")] +async fn service_redirection(req: HttpRequest) -> impl Responder { + let info = req.match_info(); + let find_redirection = match info.query("service") { + /* Socials links */ + "twitter" => Some("https://twitter.com/Mylloon".to_owned()), + "mastodon" => Some("https://piaille.fr/@mylloon".to_owned()), + "discord" => match info.get("scope") { + Some("user") => Some("https://discord.com/users/158260864623968257/".to_owned()), + Some("guild") => Some("https://discord.gg/Z5ePxH4".to_owned()), + _ => None, + }, + "reddit" => Some("https://www.reddit.com/user/mylloon".to_owned()), + "instagram" => Some("https://www.instagram.com/mylloon/".to_owned()), + "kitsu" => Some("https://kitsu.io/users/Mylloon/library?status=completed".to_owned()), + "steam" => Some("https://steamcommunity.com/id/mylloon/".to_owned()), + "youtube" => Some("https://www.youtube.com/c/Mylloon".to_owned()), + "twitch" => Some("https://www.twitch.tv/mylloon".to_owned()), + + /* Forges */ + "github" => Some("https://github.com/Mylloon".to_owned()), + "gitlab" => Some("https://gitlab.com/Mylloon".to_owned()), + "codeberg" => Some("https://codeberg.org/Mylloon".to_owned()), + "forgejo" => Some("https://git.mylloon.fr/Anri".to_owned()), + + /* Others */ + "keyoxide" => { + Some("https://keyoxide.org/27024A99057E58B8087A5022A82D63DFF8D1317F".to_owned()) + } + _ => None, + }; + + if let Some(redirection) = find_redirection { + // Redirect to the desired service + actix_web::web::Redirect::to(redirection) + } else { + // By default, returns to the contact page + actix_web::web::Redirect::to("/contact") + } +} + #[derive(Content, Debug)] struct NetworksTemplate { navbar: NavBar, diff --git a/templates/contact.html b/templates/contact.html index f6c50a6..33e1e20 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -15,7 +15,7 @@ @Mylloon

    @@ -27,7 +27,7 @@ target="_blank" rel="noopener noreferrer me" title="Alternative à Twitter" - href="https://piaille.fr/@mylloon" + href="/contact/mastodon" >Mylloon@piaille.fr

    @@ -38,14 +38,14 @@ mylloon et mon serveur

    @@ -56,7 +56,7 @@ mylloon

    @@ -67,7 +67,7 @@ mylloon

    @@ -79,7 +79,7 @@ target="_blank" rel="noopener noreferrer me" title="Anime tracker" - href="https://kitsu.io/users/Mylloon/library?status=completed" + href="/contact/kitsu" >Mylloon

    @@ -90,7 +90,7 @@ Mylloon

    @@ -101,7 +101,7 @@ Mylloon

    @@ -112,7 +112,7 @@ mylloon

    @@ -127,7 +127,7 @@ Mylloon

    @@ -138,7 +138,7 @@ Mylloon

    @@ -149,7 +149,7 @@ Mylloon

    @@ -160,7 +160,7 @@ Anri

    @@ -186,7 +186,7 @@ 27024A99057E58B8087A5022A82D63DFF8D1317F

    -- 2.45.2 From 991495893ae75bff2b3283c8250f706ff92d7f6f Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 17:22:22 +0200 Subject: [PATCH 28/70] Add header, cf #34 --- src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9b13a10..f1dc440 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,10 +29,14 @@ async fn main() -> Result<()> { HttpServer::new(move || { App::new() .app_data(web::Data::new(config.to_owned())) - .wrap(DefaultHeaders::new().add(( - "Onion-Location", - config.fc.onion.as_deref().unwrap_or_default(), - ))) + .wrap( + DefaultHeaders::new() + .add(( + "Onion-Location", + config.fc.onion.as_deref().unwrap_or_default(), + )) + .add(("Permissions-Policy", "interest-cohort=()")), + ) .service(web::scope("/api").service(web::scope("v1").service(api_v1::love))) .service(index::page) .service(agreements::security) -- 2.45.2 From f8a68933c55d66a23bb29c5849aeda59d79c67fa Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 17:36:33 +0200 Subject: [PATCH 29/70] more global style --- static/css/index.css | 11 ----------- static/css/style.css | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index e703844..cd8cd28 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -20,17 +20,6 @@ --title-weight: 600; } -/* Page theme */ -main { - color: var(--font-color); - font-size: var(--font-size); - padding: 2em 1em; - font-family: var(--font-family); - color: var(--font-color); - margin: 0 auto; - max-width: 640px; /* breakpoint */ -} - /* Name header */ .name { font-size: calc(var(--font-size) * 2.5); diff --git a/static/css/style.css b/static/css/style.css index 7bcb88d..822f620 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -10,6 +10,21 @@ a { font-size: var(--font-size); } +a:hover { + opacity: 0.6; + transition: opacity 0.2s; +} + +main { + color: var(--font-color); + font-size: var(--font-size); + padding: 2em 1em; + font-family: var(--font-family); + color: var(--font-color); + margin: 0 auto; + max-width: 640px; /* breakpoint */ +} + /* Navigation bar across all of the pages */ .navbar { text-align: center; @@ -42,8 +57,6 @@ a { .navbar a:hover { text-decoration: underline; - opacity: 0.6; - transition: opacity 0.2s; } .bold { -- 2.45.2 From fe140496fd71f19ba8591fa8bfed44c3f026a4e6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 17:38:43 +0200 Subject: [PATCH 30/70] rename --- static/css/constants.css | 4 ++-- static/css/style.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/css/constants.css b/static/css/constants.css index ffcb394..97e1a78 100644 --- a/static/css/constants.css +++ b/static/css/constants.css @@ -3,7 +3,7 @@ :root { --background: #f1f1f1; --font-color: #18181b; - --link-hover-color: #df5a9c; + --link-color: #df5a9c; } } @@ -12,7 +12,7 @@ :root { --background: #171e26; --font-color: #bcbcc5; - --link-hover-color: #ff80bf; + --link-color: #ff80bf; } } diff --git a/static/css/style.css b/static/css/style.css index 822f620..e3f9e5f 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -52,7 +52,7 @@ main { .navbar a { text-decoration: none; - color: var(--link-hover-color); + color: var(--link-color); } .navbar a:hover { -- 2.45.2 From c179eb3e0dedeb202aa8c2ddcf545df74a838bfb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 18:31:31 +0200 Subject: [PATCH 31/70] rename --- templates/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index ed34227..7ae616c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,14 +33,14 @@ title="21_12's GitHub" target="_blank" rel="noreferrer" - >21_1221_12 AzazoulAzazouille --> -- 2.45.2 From 6a63d2d7d0de5df39238b947a145df2e1aa176c2 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 18:31:44 +0200 Subject: [PATCH 32/70] css contact --- static/css/contact.css | 60 +++++++++++++++++++++++++++++------------- templates/contact.html | 10 ++++--- 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/static/css/contact.css b/static/css/contact.css index 31a89ae..3d6c9a0 100644 --- a/static/css/contact.css +++ b/static/css/contact.css @@ -1,29 +1,53 @@ -/* Parameters light */ -@media (prefers-color-scheme: light) { - :root { - } +/* https://stackoverflow.com/a/40244401/15436737 */ + +/* Title */ +h1 { + margin: 0; } -/* Parameters dark */ -@media (prefers-color-scheme: dark) { - :root { - } +h1 + p { + margin: 8px; } -:root { +/* List */ +main ul { + column-count: 2; + column-gap: 5em; } -/* Page theme */ -main { - color: var(--font-color); - font-size: var(--font-size); - padding: 2em 1em; - font-family: var(--font-family); - color: var(--font-color); - margin: 0 auto; - max-width: 640px; /* breakpoint */ +main li > p { + margin: 0; + padding: 3%; } /* breakpoint */ @media only screen and (max-width: 640px) { + main ul { + column-count: 1; + } +} + +/* Links */ +main a { + text-decoration: none; + display: inline-block; + color: color-mix(in srgb, var(--font-color) 30%, var(--link-color)); +} + +main a:after { + display: block; + content: ""; + border-bottom: solid 3px; + transform: scaleX(0); + transition: transform 250ms ease-in-out; + transform-origin: 100% 50%; +} + +main a:hover:after { + transform: scaleX(1); + transform-origin: 0 50%; +} + +main a:hover { + text-decoration: none; } diff --git a/templates/contact.html b/templates/contact.html index 33e1e20..75adcd1 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -7,7 +7,9 @@
    {{>navbar.html}}
    -

    Réseaux sociaux

    +

    Contact

    +

    Je suis présent relativement partout sur internet 😸

    +

    Réseaux sociaux

    • @@ -119,7 +121,7 @@

    -

    Forges

    +

    Forges

    • @@ -167,7 +169,7 @@

    -

    Autre

    +

    Autre

    • @@ -187,7 +189,7 @@ target="_blank" rel="noopener noreferrer me" href="/contact/keyoxide" - >27024A99057E58B8087A5022A82D63DFF8D1317FMylloon

    • -- 2.45.2 From adf8b2f33ac28193436f828283ec745ca4384551 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 18:46:31 +0200 Subject: [PATCH 33/70] rename index to info --- templates/navbar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/navbar.html b/templates/navbar.html index e3b0d17..5faea27 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -4,7 +4,7 @@
    • IndexInfos

    • -- 2.45.2 From 663f07971107c60cd56a593d034b8a8083ff4cd7 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 18:46:35 +0200 Subject: [PATCH 34/70] Add little desc --- templates/index.html | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7ae616c..3bb89ab 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,7 +15,8 @@ Mon avatar @@ -26,7 +27,28 @@

      Content de vous voir ici !

      - + {{/data}}
    -- 2.45.2 From c431da38e1e06dc7873dd7a158165685850890b7 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:12:07 +0200 Subject: [PATCH 35/70] fix on release --- static/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/style.css b/static/css/style.css index e3f9e5f..eade3b7 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -42,7 +42,7 @@ main { @media only screen and (max-width: 640px) { .navbar p::after { - padding: 4px; + padding: 6px; } } -- 2.45.2 From bf7f85e777503a3d3cf7f06b79efd38027d2b98a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:12:21 +0200 Subject: [PATCH 36/70] 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

    +

    @@ -71,5 +72,6 @@ {{/data}} + -- 2.45.2 From 7db7aa153640cf90625794682533210b99f090b6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:12:41 +0200 Subject: [PATCH 37/70] oneline --- static/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 8d7cdee..9e39f12 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -9,6 +9,6 @@ window.addEventListener("load", () => { "1312", ]; - let tagElement = document.getElementById("subname"); - tagElement.textContent = tags[Math.round(Math.random() * (tags.length - 1))]; + document.getElementById("subname").textContent = + tags[Math.round(Math.random() * (tags.length - 1))]; }); -- 2.45.2 From 3d66ed0e2da3351d569af6fb1dfc3e1b582e3413 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:43:05 +0200 Subject: [PATCH 38/70] Add webp files --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 58b8264..71cf752 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.png filter=lfs diff=lfs merge=lfs -text *.gif filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text +*.webp filter=lfs diff=lfs merge=lfs -text -- 2.45.2 From cdcfab8120eca8fcd9e0070d03aefc8b2dd0f760 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 19:43:19 +0200 Subject: [PATCH 39/70] Add friends and co --- static/badges/friends/21_12.webp | Bin 0 -> 1816 bytes static/badges/friends/azazouille.webp | Bin 0 -> 2284 bytes static/css/index.css | 9 +++++++++ templates/index.html | 6 +++--- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 static/badges/friends/21_12.webp create mode 100644 static/badges/friends/azazouille.webp diff --git a/static/badges/friends/21_12.webp b/static/badges/friends/21_12.webp new file mode 100644 index 0000000000000000000000000000000000000000..9b1cca3abf6afda86b39a5005521cf2a8b30a4c5 GIT binary patch literal 1816 zcmaKqdpwj`7{?!Er*X@z%{3#IvPF_;lr&1Y#kyo%y3CARmKmCH-I7^itRyR;HX)2Q zh3Zp75fw#^F5}*fl>0T862|Nq?Pu$c+VlCG_k7Rqd4A_T&-1=c)>c-s7y!5J1jpTu zrbGzgogwRITNuW#gF8T z_!8pPbaX+)Z9<*=nTLezyTA)YDbih>EKzNWNXPkp#pJJ;;zy^Vob@P2+nY*5=Zg|Q zv$v2B3z-@iite^BgcV91pt(AuRU1t;*a6mH500p7_D27M5G7+;;#jQiJt&4Cjs~=0>Nyq zK)^o_AodcVn)byXlmlQoh4hp!nszq8lA{1OYQAXX3;+%bK&d^LL?*Naz>MHPterf9F3PZ znUPGs*Hq-BQJ=`%qd60zTMlL@gWY=7Z6rK@GneLC7ZD zYDT{r1fh{jqmMbbpMSjW{+9Y$Zv5!g(Pu~0hX+p+QgVy)+P1ElV0oSWZInl7meE%| zK`MyqeU~)v(PKs*OfA)jsjgxjErQwC;sNZG`M&&NEmD`4Id$O5cz9E$nN#{lvFCD? zRX3N$-_pfM4|>nxRT7Lzc^J%d10}X$>HNX$ln0akUB){L{PEhwdwaySxSY~KUJEn& zn)-zjmmjbeY4aNW_Smx2?-Hli zJIY4gDwA@yW@IdEJ+$!Ae1!u^^0?W;(1^018&{LUu64^+Q_M4Whumgn8r*#Ce1rAt zJ&wv9)%VK-Qx^%62Rf@)G;mZxHtzI(9v-jwRD4)+)?%|MwJaKYIr7gpztCoCoIdi3`fW_wq_67)A!*9&rihTv;f#l=#yT7#TyfVjQ25YdMHb^dpgc5I8s5xQZswIMcbcn(kwwC%SDrRVqkwdnYa0rO-$5u zT^!TAz*Uuk505XvuCy9imBfw<3n~&%>|1v6(^!mrS9x@Ewc2s5Rl0BLde+{rh?G1> z33;d7R55&Z%r%|xS3sTDglZw~alsIU8|p2~4v-NfD^(V0ry1aRIro;Tyh@+roiI7` Pen*gH_HuSap9R1_aImwD literal 0 HcmV?d00001 diff --git a/static/badges/friends/azazouille.webp b/static/badges/friends/azazouille.webp new file mode 100644 index 0000000000000000000000000000000000000000..5ea992cefde10358ad19ab673088796cc14ab8d6 GIT binary patch literal 2284 zcmaKtdpJ~EAII0=m|P={%QTrOmu@o&6^;`!nAff3E-8!}c^Mkl#E@>v2@_=$GX|$A z(sV+j5=zqLtwb&%%3aZwrzzrCJkdpJ2d4le`1 z*TK%+$KAqD5deUNr!N3{05}l{?!_|jEs!aWAVtQ=*#ZzriKTiF?XZ6Sd$7ncpa@ie zI#>&S3ns-xyLmc#NwfcXeCq@VX`~%5-RqxoeyXa39*7|UfWX2TwxnokEX+YLZ%c@c zmNEloO;T8JD9qPk#!=xHgt=R)hkWNrDU+9YsVGgVmj?l^O%v9!7{f9C-ZbZOlP4(BIImFo)t3N8U)M27d? z`;)ri^Z280|2OA<{ew>~R!<%PcMK>(Z14jZV2xKhWyfZ#NUXe+5g`F!t!p_O`33Vw z|C1VM5?XRUwd$JNknBf`Y)R9rfqeYGYy#+s2HKrZ zTpr`!&&__I*>eNfrlc0LhELW8uSfOIYoLa56L_+eb|T9Af-6y;!d}zAmG&Gz#%1Tn zFX)O5JUh;W%L;D{f1Yc#R;NCGR>CLxo3M5+uF^`3Endk}geIvFM)`0LiL;{l^>S^W z=P9MXZZM3=f8l`=JXW=|4)@D#c$@TghW|QsmD=Hh$m15;-5BKj>wT5^viI}@G)JLcKW|cgUm?DU5%6Hd)sl2d;kki; zV=1?h{Y?+|yCcDNxMy!$rKY!yENPwKjZRVQ4Bn42M~*vP1&Nr%!}V9Ggq-knhVAaa z+kwpd(c{5>%+*F4JhLKHR%8y^6H08~D^GG)Li5))p%*xrP3Tdf?@&&!kC?R40f{i@ z+z}pso+WB4MU`|DUv75YRE}xa+B#5v0eNIaclvwndgzRf#GyOoVpvpl%(1gU?#H+D zOBvd#k$ovgxLGej;bddTZ z4cWRb1?!EBiqGw{z$_dYZ4Z6Wl{==b8d`6$oz7|x>=)WK>4tYDyTt2Jp@D;QUPjrO z$*MV|YU8stC1Hm$g<6CwoVQ)6!}g`k5rMicm#s$1u>sc#h>*Z-FePbU#~?#Kv}cc8 z0(jee0)za;HyGi1vZJM~NcH;Ow7gc0SEibN^M>f`W9xAgxh;}60_Q(weg}iBBg&Og zr*^t*(Lfo>8F1R2!*K0;$}T?8(a5-Z=SZ`@FP^PL*-zsZ4mfq5H`B7@3STE5=({pi3@{&&X$tqpOS`W~kYay;i4X9g=Au z9}s`-Lo~d*fylIGs;)8#8tn7FKEuyTZ>TjT9X(~6w%pL(Tg3Rf+wEzIiQbnrC~JvK zl;B>){Knwu1d}V^)~Ovz4{3j5)uV%JtrHZ-lnatL^#fWT$*T{?wbXr3w$!?%^jG82 z8E%ipOO}IC2H);kC%G4Qqk8MUA?@vJw%MHC&##L?%x+H(VF}f}p)*%*qSDLR*vY&e z{p!bTCpT|Cl;?9aDZr}PgB`2fSDEph$$#bl8GTdx+#GQuq$xMTD z*zT#z^}#fWQh-_HQL;|#ERJ;H-|1P2|)Tw$`^3~HRT**VWQdO&ObSJs=CPScaUxNIK zXk0c?tym7!KR8_Mq8KP b4xXlQT)4Sg>Z>5xGPKF=^vQS9f6#vc^W>M# literal 0 HcmV?d00001 diff --git a/static/css/index.css b/static/css/index.css index 1fb2aa1..6e85ea3 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -62,3 +62,12 @@ h1 { font-size: calc(var(--font-size) * 1.6); margin-bottom: 0; } + +/* Friends */ +#friends a:hover { + opacity: 1; +} + +#friends a { + padding-right: 10px; +} diff --git a/templates/index.html b/templates/index.html index 16c549c..103e0c3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -49,18 +49,18 @@

    -
    +

    Personnes incroyables

    21_12 Date: Fri, 13 Oct 2023 20:13:00 +0200 Subject: [PATCH 40/70] Add titles, format --- templates/contact.html | 78 ++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/templates/contact.html b/templates/contact.html index 75adcd1..1a845b7 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -15,9 +15,10 @@

    Twitter : @Mylloon

    @@ -26,10 +27,10 @@

    Mastodon : Mylloon@piaille.fr

    @@ -38,16 +39,18 @@

    Discord : mylloon et mon serveur

    @@ -56,9 +59,10 @@

    Reddit : mylloon

    @@ -67,9 +71,10 @@

    Instagram : mylloon

    @@ -78,10 +83,10 @@

    Kitsu : Mylloon

    @@ -90,9 +95,10 @@

    Steam : Mylloon

    @@ -101,9 +107,10 @@

    Youtube : Mylloon

    @@ -112,9 +119,10 @@

    Twitch : mylloon

    @@ -127,9 +135,10 @@

    Github : Mylloon

    @@ -138,9 +147,10 @@

    Gitlab : Mylloon

    @@ -149,9 +159,10 @@

    Codeberg : Mylloon

    @@ -160,9 +171,10 @@

    Forgejo (mon instance) : Anri

    @@ -175,7 +187,6 @@

    Mail : kennel.anri at tutanota.com Keyoxide : Mylloon

    -- 2.45.2 From 2eadcb213fb434ff37a4b758faf8e3e47e15ada9 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 20:53:00 +0200 Subject: [PATCH 41/70] comment --- static/css/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/static/css/style.css b/static/css/style.css index eade3b7..26da1c9 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -40,6 +40,7 @@ main { padding: 10px; } +/* breakpoint */ @media only screen and (max-width: 640px) { .navbar p::after { padding: 6px; -- 2.45.2 From 8c0f002e219a314b4c8285a1d1d24c247e9d3d1b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 20:53:20 +0200 Subject: [PATCH 42/70] add prettier-ignore for debug version --- templates/navbar.html | 80 ++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 43 deletions(-) diff --git a/templates/navbar.html b/templates/navbar.html index 5faea27..2fccc2e 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -2,59 +2,53 @@ -- 2.45.2 From 4e85732ed8cb313f5a52478f8b9f41fbc441e6f0 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 20:53:40 +0200 Subject: [PATCH 43/70] /contrib done! --- static/css/contrib.css | 35 ++++++++++++++++++++ templates/contrib.html | 75 +++++++++++++++++++++++++++++------------- 2 files changed, 87 insertions(+), 23 deletions(-) create mode 100644 static/css/contrib.css diff --git a/static/css/contrib.css b/static/css/contrib.css new file mode 100644 index 0000000..c93caf3 --- /dev/null +++ b/static/css/contrib.css @@ -0,0 +1,35 @@ +h2 { + padding-left: 1rem; +} + +/* Element of lists */ +main li { + display: inline-block; +} + +main h1, +h2 { + font-weight: 800; +} + +/* Links */ +main a { + text-decoration: none; + font-weight: 600; +} + +main a:hover { + text-decoration: underline; +} + +p { + margin: 0; +} + +main p::after { + content: ", "; +} + +main li:last-child p::after { + content: ""; +} diff --git a/templates/contrib.html b/templates/contrib.html index 460c89b..b1c5085 100644 --- a/templates/contrib.html +++ b/templates/contrib.html @@ -2,41 +2,70 @@ {{>head.html}} +
    {{>navbar.html}}
    - {{#data}} {{#error}} + {{#data}}
    -

    Github ne veut pas que tu vois ces informations...

    - - {{/error}} {{^error}} -
    -

    Mes contributions

    - +

    Mes contributions GitHub

    + {{#error}} +

    GitHub ne veut pas que tu vois ces informations...

    + {{/error}} {{^error}} + + {{#projects}} -

    {{name}}

    -

    +

    {{name}}

    +
      {{#pulls_merged}} - #{{id}} +
    • + +

      + #{{id}}

      +
    • + {{/pulls_merged}} -

      +
    {{/projects}} -

    En attente

    -

    + +

    En attente

    + + +

    Non mergées

    +
    {{/error}} {{/data}} {{>footer.html}} -- 2.45.2 From 01c106fabbb242602eef11d01af120636346e1ad Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 20:59:08 +0200 Subject: [PATCH 44/70] update index --- static/js/index.js | 2 +- templates/index.html | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 9e39f12..1aa2558 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -5,7 +5,7 @@ window.addEventListener("load", () => { "undefined", "/api/v1/love", "Étudiant qui va rater son master", - "Peak D2 sur Valo", + "Peak D2 sur Valo 🤡", "1312", ]; diff --git a/templates/index.html b/templates/index.html index 103e0c3..9e67a08 100644 --- a/templates/index.html +++ b/templates/index.html @@ -40,12 +40,12 @@ target="_blank" rel="noreferrer" >AGPLv3. Vous pouvez voir mon portfolio ici, ainsi - que mes contributions sur GitHub ici. + >.

    - Il m'arrive aussi, parfois, d'écrire dans - sur mon blog. + Vous pouvez voir mon portfolio ici, ainsi que + mes contributions sur GitHub ici. Il m'arrive + aussi, parfois, d'écrire sur mon blog.

    -- 2.45.2 From 2712269132ecf91af8b2be523d0e6956d42349f3 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 21:02:38 +0200 Subject: [PATCH 45/70] Add server name --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index f1dc440..5aafe56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,6 +35,7 @@ async fn main() -> Result<()> { "Onion-Location", config.fc.onion.as_deref().unwrap_or_default(), )) + .add(("Server", format!("ewp/{}", env!("CARGO_PKG_VERSION")))) .add(("Permissions-Policy", "interest-cohort=()")), ) .service(web::scope("/api").service(web::scope("v1").service(api_v1::love))) -- 2.45.2 From cda62654a0ddc33e0736af99d33a6fb73548dd12 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 16:56:14 +0200 Subject: [PATCH 46/70] completly fix avatar position on smol screen --- static/css/index.css | 8 +++----- static/css/style.css | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/static/css/index.css b/static/css/index.css index 6e85ea3..69f1014 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -46,13 +46,11 @@ /* breakpoint */ @media only screen and (max-width: 640px) { - .avatar { + #avatar { position: absolute; width: calc(var(--font-size) * 4); - transform: translate( - calc(var(--font-size) * -19), - calc(var(--font-size) * -3.7) - ); + left: 10px; + top: -30px; } } diff --git a/static/css/style.css b/static/css/style.css index 26da1c9..078bef8 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -16,6 +16,7 @@ a:hover { } main { + position: relative; color: var(--font-color); font-size: var(--font-size); padding: 2em 1em; -- 2.45.2 From 1abbc86cc744c932a0c97684ec1eaa3f590f9e08 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 17:07:14 +0200 Subject: [PATCH 47/70] add custom style for tags --- static/js/index.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 1aa2558..1f9a0b3 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -1,14 +1,23 @@ +class Tag { + constructor(variant, style = "") { + this.variant = variant; + this.style = style; + } +} + 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", + new Tag("Comment ça marche un PC 😵‍💫"), + new Tag("Idiot certifié"), + new Tag("undefined"), + 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"), ]; - document.getElementById("subname").textContent = - tags[Math.round(Math.random() * (tags.length - 1))]; + const random = Math.round(Math.random() * (tags.length - 1)); + const element = document.getElementById("subname"); + element.textContent = tags[random].variant; + element.style = tags[random].style; }); -- 2.45.2 From 75d5865ac83b4b5ccdefbcbbcfec305048c2465b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 17:27:47 +0200 Subject: [PATCH 48/70] update tags --- static/js/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index 1f9a0b3..3ab4e20 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -9,11 +9,12 @@ window.addEventListener("load", () => { const tags = [ new Tag("Comment ça marche un PC 😵‍💫"), new Tag("Idiot certifié"), - new Tag("undefined"), + 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"), + new Tag("Nul en CSS", "font-family: cursive"), ]; const random = Math.round(Math.random() * (tags.length - 1)); -- 2.45.2 From 56a7b80f1797eece9a3e3bade113c4f648f231b7 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 17:58:14 +0200 Subject: [PATCH 49/70] ON POINT --- static/js/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 3ab4e20..e2a8306 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -13,8 +13,16 @@ window.addEventListener("load", () => { 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"), - new Tag("Nul en CSS", "font-family: cursive"), + new Tag( + "1312", + ` + display: inline-block; + background: linear-gradient(to bottom right, red 0%, red 50%, black 50%); + background-clip: text; + color: transparent; + ` + ), + new Tag("Nul en CSS", "font-family: 'Comic Sans MS', cursive"), ]; const random = Math.round(Math.random() * (tags.length - 1)); -- 2.45.2 From dd6237ff4ed8066b308c84acb1cba04bee4c3a20 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 17:58:22 +0200 Subject: [PATCH 50/70] fallback to systemui --- static/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/css/style.css b/static/css/style.css index 078bef8..74e30f6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,7 +1,7 @@ /* Theme of the pages */ html { background-color: var(--background); - font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; + font-family: "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol", system-ui; } p, -- 2.45.2 From 267737854c14268d17c96a346cd3e92e841d678c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 14 Oct 2023 18:39:29 +0200 Subject: [PATCH 51/70] less class! --- static/css/style.css | 14 +++++++------- templates/navbar.html | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 74e30f6..b6d73b4 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -27,37 +27,37 @@ main { } /* Navigation bar across all of the pages */ -.navbar { +header nav { text-align: center; } -.navbar li { +header nav li { display: inline-block; } /* Maybe do this only with 'large' screens */ -.navbar p::after { +header nav p::after { content: "·"; padding: 10px; } /* breakpoint */ @media only screen and (max-width: 640px) { - .navbar p::after { + header nav p::after { padding: 6px; } } -.navbar li:last-child p::after { +header nav li:last-child p::after { content: ""; } -.navbar a { +header nav a { text-decoration: none; color: var(--link-color); } -.navbar a:hover { +header nav a:hover { text-decoration: underline; } diff --git a/templates/navbar.html b/templates/navbar.html index 2fccc2e..2f4f490 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -1,5 +1,5 @@ {{#data}}{{#navbar}} -