add: mirror other user's theme when viewing other user profiles
fix: community/profile name sizing
This commit is contained in:
parent
f49cc80886
commit
b78508ee15
13 changed files with 70 additions and 34 deletions
|
@ -38,7 +38,7 @@
|
|||
<div class="w-full flex gap-4 flex-collapse">
|
||||
<div
|
||||
class="lhs flex flex-col gap-2 sm:w-full"
|
||||
style="width: 20rem; min-width: 20rem"
|
||||
style="width: 22rem; min-width: 22rem"
|
||||
>
|
||||
<div class="card-nest w-full">
|
||||
<div class="card flex gap-2" id="community_avatar_and_name">
|
||||
|
|
|
@ -190,20 +190,26 @@
|
|||
</div>
|
||||
|
||||
<form
|
||||
class="card flex gap-2 flex-row flex-wrap items-center"
|
||||
class="card flex flex-col gap-2"
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
onsubmit="upload_banner(event)"
|
||||
>
|
||||
<input
|
||||
id="banner_file"
|
||||
name="file"
|
||||
type="file"
|
||||
accept="image/png,image/jpeg,image/avif,image/webp"
|
||||
class="w-content"
|
||||
/>
|
||||
<div class="flex gap-2 flex-row flex-wrap items-center">
|
||||
<input
|
||||
id="banner_file"
|
||||
name="file"
|
||||
type="file"
|
||||
accept="image/png,image/jpeg,image/avif,image/webp"
|
||||
class="w-content"
|
||||
/>
|
||||
|
||||
<button class="primary">{{ icon "check" }}</button>
|
||||
<button class="primary">{{ icon "check" }}</button>
|
||||
</div>
|
||||
|
||||
<span class="fade"
|
||||
>Use an image of 1100x350px for the best results.</span
|
||||
>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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" }}
|
||||
<span>{{ text "notifs:action.mark_as_read" }}</span>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}b
|
||||
|
||||
<button
|
||||
class="red tertiary"
|
||||
|
@ -464,4 +464,20 @@ user.settings.theme_hue %}
|
|||
--lit: {{ user.settings.theme_lit }} !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function match_user_theme() {
|
||||
const pref = "{{ profile.settings.theme_preference }}".toLowercase();
|
||||
|
||||
if (pref === "auto") {
|
||||
return;
|
||||
}
|
||||
|
||||
document.documentElement.className = pref;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
match_user_theme();
|
||||
}, 150);
|
||||
</script>
|
||||
{% endif %} {%- endmacro %}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="w-full flex gap-4 flex-collapse">
|
||||
<div
|
||||
class="lhs flex flex-col gap-2 sm:w-full"
|
||||
style="width: 20rem; min-width: 20rem"
|
||||
style="width: 22rem; min-width: 22rem"
|
||||
>
|
||||
<div class="card-nest w-full">
|
||||
<div class="card flex gap-2" id="user_avatar_and_name">
|
||||
|
|
|
@ -256,20 +256,26 @@
|
|||
</div>
|
||||
|
||||
<form
|
||||
class="card flex gap-2 flex-row flex-wrap items-center"
|
||||
class="card flex flex-col gap-2"
|
||||
method="post"
|
||||
enctype="multipart/form-data"
|
||||
onsubmit="upload_banner(event)"
|
||||
>
|
||||
<input
|
||||
id="banner_file"
|
||||
name="file"
|
||||
type="file"
|
||||
accept="image/png,image/jpeg,image/avif,image/webp"
|
||||
class="w-content"
|
||||
/>
|
||||
<div class="flex gap-2 flex-row flex-wrap items-center">
|
||||
<input
|
||||
id="banner_file"
|
||||
name="file"
|
||||
type="file"
|
||||
accept="image/png,image/jpeg,image/avif,image/webp"
|
||||
class="w-content"
|
||||
/>
|
||||
|
||||
<button class="primary">{{ icon "check" }}</button>
|
||||
<button class="primary">{{ icon "check" }}</button>
|
||||
</div>
|
||||
|
||||
<span class="fade"
|
||||
>Use an image of 1100x350px for the best results.</span
|
||||
>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 }}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue