1
0
Fork 0
forked from alemi/upub

fix(web): avatar css, centered devtools link

This commit is contained in:
əlemi 2024-05-23 15:07:59 +02:00
parent cd67863a47
commit a194aaaa35
Signed by: alemi
GPG key ID: A4895B84D311642C
5 changed files with 13 additions and 13 deletions

View file

@ -162,7 +162,7 @@
img { img {
max-width: 100%; max-width: 100%;
} }
img.avatar-circle { img.avatar {
display: inline; display: inline;
border-radius: 50%; border-radius: 50%;
} }
@ -170,14 +170,14 @@
background-color: var(--background); background-color: var(--background);
border: .3em solid var(--accent); border: .3em solid var(--accent);
} }
img.avatar-inline { img.inline {
display: inline;
height: .75em; height: .75em;
border-radius: 50%;
} }
img.inline-avatar { img.avatar-actor {
height: 2em; min-height: 2em;
width: 2em; max-height: 2em;
min-width: 2em;
max-width: 2em;
} }
.box { .box {
border: 3px solid var(--accent); border: 3px solid var(--accent);
@ -309,7 +309,7 @@
var(--background) 1em var(--background) 1em
); );
} }
.loader { .spinner {
animation: spin 1s linear infinite; animation: spin 1s linear infinite;
} }
span.dots { span.dots {

View file

@ -11,7 +11,7 @@ pub fn ActorStrip(object: crate::Object) -> impl IntoView {
let avatar = object.icon().get().map(|x| x.url().id().unwrap_or(DEFAULT_AVATAR_URL.into())).unwrap_or(DEFAULT_AVATAR_URL.into()); let avatar = object.icon().get().map(|x| x.url().id().unwrap_or(DEFAULT_AVATAR_URL.into())).unwrap_or(DEFAULT_AVATAR_URL.into());
view! { view! {
<a href={Uri::web(U::User, &actor_id)} class="clean hover"> <a href={Uri::web(U::User, &actor_id)} class="clean hover">
<img src={avatar} class="avatar-inline mr-s" /><b>{username}</b><small>@{domain}</small> <img src={avatar} class="avatar inline mr-s" /><b>{username}</b><small>@{domain}</small>
</a> </a>
} }
} }
@ -33,7 +33,7 @@ pub fn ActorBanner(object: crate::Object) -> impl IntoView {
<div> <div>
<table class="align" > <table class="align" >
<tr> <tr>
<td rowspan="2" ><a href={uri.clone()} ><img class="avatar-circle inline-avatar" src={avatar_url} /></a></td> <td rowspan="2" ><a href={uri.clone()} ><img class="avatar avatar-actor" src={avatar_url} /></a></td>
<td><b>{display_name}</b></td> <td><b>{display_name}</b></td>
</tr> </tr>
<tr> <tr>

View file

@ -91,7 +91,7 @@ pub fn ConfigPage(setter: WriteSignal<crate::Config>) -> impl IntoView {
<li><span title="objects without a related activity to display"><input type="checkbox" prop:checked=get_cfg!(filter orphans) on:input=set_cfg!(filter orphans) />" orphans"</span></li> <li><span title="objects without a related activity to display"><input type="checkbox" prop:checked=get_cfg!(filter orphans) on:input=set_cfg!(filter orphans) />" orphans"</span></li>
</ul> </ul>
<hr /> <hr />
<p><a href="/web/config/dev" title="access the devtools page">devtools</a></p> <p class="center"><a href="/web/config/dev" title="access the devtools page">devtools</a></p>
</div> </div>
} }
} }

View file

@ -56,7 +56,7 @@ pub fn DebugPage() -> impl IntoView {
</td> </td>
<td> <td>
<input type="checkbox" title="load from local cache" value="cached" <input type="checkbox" title="load from local cache" value="cached"
class:loader=loading class:spinner=loading
prop:checked=cached prop:checked=cached
on:input=move |ev| set_cached.set(event_target_checked(&ev)) on:input=move |ev| set_cached.set(event_target_checked(&ev))
/> />

View file

@ -104,7 +104,7 @@ pub fn UserPage(tl: Timeline) -> impl IntoView {
<table class="pl-2 pr-2 align w-100" style="table-layout: fixed"> <table class="pl-2 pr-2 align w-100" style="table-layout: fixed">
<tr> <tr>
<td rowspan=4 style="width: 8em"> <td rowspan=4 style="width: 8em">
<img class="avatar-circle avatar-border mr-s" src={avatar_url} style="height: 7em; width: 7em"/> <img class="avatar avatar-border mr-s" src={avatar_url} style="height: 7em; width: 7em"/>
</td> </td>
<td rowspan=2 class="bottom"> <td rowspan=2 class="bottom">
<b class="big">{display_name}</b>{actor_type_tag} <b class="big">{display_name}</b>{actor_type_tag}