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
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue