From b78508ee151275cdba6208feefc0d2282c365bb7 Mon Sep 17 00:00:00 2001 From: trisua Date: Wed, 9 Apr 2025 19:25:41 -0400 Subject: [PATCH] add: mirror other user's theme when viewing other user profiles fix: community/profile name sizing --- Cargo.lock | 8 +++--- crates/app/Cargo.toml | 2 +- crates/app/src/public/css/style.css | 7 ++--- .../app/src/public/html/communities/base.html | 2 +- .../src/public/html/communities/settings.html | 24 ++++++++++------- crates/app/src/public/html/components.html | 20 ++++++++++++-- crates/app/src/public/html/profile/base.html | 2 +- .../app/src/public/html/profile/settings.html | 26 ++++++++++++------- crates/app/src/public/js/atto.js | 5 ++++ crates/core/Cargo.toml | 2 +- crates/l10n/Cargo.toml | 2 +- crates/shared/Cargo.toml | 2 +- example/tetratto.toml | 2 +- 13 files changed, 70 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10a2ce1..f9ad075 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3155,7 +3155,7 @@ dependencies = [ [[package]] name = "tetratto" -version = "0.1.0" +version = "1.0.0" dependencies = [ "axum", "axum-extra", @@ -3179,7 +3179,7 @@ dependencies = [ [[package]] name = "tetratto-core" -version = "0.1.0" +version = "1.0.0" dependencies = [ "async-recursion", "bb8-postgres", @@ -3198,7 +3198,7 @@ dependencies = [ [[package]] name = "tetratto-l10n" -version = "0.1.0" +version = "1.0.0" dependencies = [ "pathbufd", "serde", @@ -3207,7 +3207,7 @@ dependencies = [ [[package]] name = "tetratto-shared" -version = "0.1.0" +version = "1.0.0" dependencies = [ "ammonia", "chrono", diff --git a/crates/app/Cargo.toml b/crates/app/Cargo.toml index f637c1c..e3adc21 100644 --- a/crates/app/Cargo.toml +++ b/crates/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tetratto" -version = "0.1.0" +version = "1.0.0" edition = "2024" [features] diff --git a/crates/app/src/public/css/style.css b/crates/app/src/public/css/style.css index c82d85d..b26dd19 100644 --- a/crates/app/src/public/css/style.css +++ b/crates/app/src/public/css/style.css @@ -158,15 +158,16 @@ p { } .name { - max-width: 200px; + max-width: 250px; overflow: hidden; - overflow-wrap: break-word; + /* overflow-wrap: break-word; */ + overflow-wrap: anywhere; text-overflow: ellipsis; } @media screen and (min-width: 901px) { .name.shorter { - max-width: 180px; + max-width: 215px; } .name.lg\:long { diff --git a/crates/app/src/public/html/communities/base.html b/crates/app/src/public/html/communities/base.html index c9a2130..8b5c2ee 100644 --- a/crates/app/src/public/html/communities/base.html +++ b/crates/app/src/public/html/communities/base.html @@ -38,7 +38,7 @@
diff --git a/crates/app/src/public/html/communities/settings.html b/crates/app/src/public/html/communities/settings.html index d987d88..22d5904 100644 --- a/crates/app/src/public/html/communities/settings.html +++ b/crates/app/src/public/html/communities/settings.html @@ -190,20 +190,26 @@
- +
+ - + +
+ + Use an image of 1100x350px for the best results.
diff --git a/crates/app/src/public/html/components.html b/crates/app/src/public/html/components.html index 6c1248d..a11b776 100644 --- a/crates/app/src/public/html/components.html +++ b/crates/app/src/public/html/components.html @@ -30,7 +30,7 @@ border_radius="var(--radius)") -%} title="{{ username }}'s banner" src="/api/v1/auth/user/{{ username }}/banner" alt="@{{ username }}'s banner" - class="banner shadow" + class="banner shadow w-full" loading="lazy" style="border-radius: {{ border_radius }};" /> @@ -294,7 +294,7 @@ show_community and post.community != config.town_square %} {{ icon "check" }} {{ text "notifs:action.mark_as_read" }} - {% endif %} + {% endif %}b + +
+ + Use an image of 1100x350px for the best results. @@ -654,6 +660,7 @@ ui.generate_settings_ui( profile_settings, [ + [[], "Privacy", "title"], [ [ "private_profile", @@ -675,6 +682,7 @@ "{{ profile.settings.private_last_seen }}", "checkbox", ], + [[], "Theme", "title"], [ ["theme_hue", "Theme hue (integer 0-255)"], "{{ profile.settings.theme_hue }}", diff --git a/crates/app/src/public/js/atto.js b/crates/app/src/public/js/atto.js index ea4866b..f166945 100644 --- a/crates/app/src/public/js/atto.js +++ b/crates/app/src/public/js/atto.js @@ -751,6 +751,11 @@ media_theme_pref(); }); self.define("render_settings_ui_field", (_, into_element, option) => { + if (option.input_element_type === "title") { + into_element.innerHTML += `
${option.value}`; + return; + } + if (option.input_element_type === "checkbox") { into_element.innerHTML += `