A face at its own size, and every fact in a named cell
Browse files at this commit3019970cadc1696961cffacbc6ea930830a807f3Parent: ee25951- fix
- a face at its own size, and every fact in a named cell
6 changed files +373 -67
- crates/izlek-web/src/board.rs +1 -1
- crates/izlek-web/src/detail.rs +9 -5
- crates/izlek-web/src/i18n.rs +9 -0
- crates/izlek-web/src/people.rs +85 -43
- crates/izlek-web/tests/http.rs +86 -0
- style/main.scss +183 -18
crates/izlek-web/src/board.rsmodified+1 -1
| @@ -630,7 +630,7 @@ pub async fn board_page(cx: &Cx, user: &User) -> Result { | ||
| 630 | 630 | </form> |
| 631 | 631 | <form class="field-box field-box-sort" method="get" action="/"> |
| 632 | 632 | <span class="field-text">(t(lang, Key::Project))</span> |
| 633 | - <select class="status-select" name="tag" data-autosubmit=""> | |
| 633 | + <select class="status-select" name="tag" data-autosubmit="" data-search=""> | |
| 634 | 634 | <option value="" selected=(tag_filter.is_none())>(t(lang, Key::AllTags))</option> |
| 635 | 635 | for tag in &tags { |
| 636 | 636 | <option value=(tag.id.clone()) selected=(tag_filter.as_deref() == Some(tag.id.as_str()))>(tag.name.clone())</option> |
crates/izlek-web/src/detail.rsmodified+9 -5
| @@ -1365,8 +1365,10 @@ async fn assignee_chip( | ||
| 1365 | 1365 | view! { |
| 1366 | 1366 | cx => |
| 1367 | 1367 | <span class="assignee-chip"> |
| 1368 | - (crate::layout::avatar(cx, person, "avatar-sm").await?) | |
| 1369 | - <span class="assignee-name">(person.display_name.clone())</span> | |
| 1368 | + <a class="person-link" href=(format!("/people/{}", person.id))> | |
| 1369 | + (crate::layout::avatar(cx, person, "avatar-sm").await?) | |
| 1370 | + <span class="assignee-name">(person.display_name.clone())</span> | |
| 1371 | + </a> | |
| 1370 | 1372 | if may_write { |
| 1371 | 1373 | <form class="assignee-drop" method="post" action="/api/unassign"> |
| 1372 | 1374 | <input type="hidden" name="task_id" value=(task_id.to_string())> |
| @@ -1641,10 +1643,12 @@ async fn comment_row(cx: &Cx, comment: &Comment, zone: UtcOffset) -> Result { | ||
| 1641 | 1643 | view! { |
| 1642 | 1644 | cx => |
| 1643 | 1645 | <div class="comment"> |
| 1644 | - (crate::layout::avatar(cx, &comment.author, "avatar-lg").await?) | |
| 1646 | + <a class="person-link" href=(format!("/people/{}", comment.author.id))> | |
| 1647 | + (crate::layout::avatar(cx, &comment.author, "avatar-lg").await?) | |
| 1648 | + </a> | |
| 1645 | 1649 | <div class="comment-said"> |
| 1646 | 1650 | <div class="comment-head"> |
| 1647 | - <span class="comment-who">(comment.author.display_name.clone())</span> | |
| 1651 | + <a class="comment-who person-link" href=(format!("/people/{}", comment.author.id))>(comment.author.display_name.clone())</a> | |
| 1648 | 1652 | <span class="comment-when">(moment_label_in(comment.at, zone))</span> |
| 1649 | 1653 | </div> |
| 1650 | 1654 | <div class="comment-body">(comment.body.clone())</div> |
| @@ -1879,7 +1883,7 @@ pub async fn task_modal(cx: &Cx, task_id: &str, confirm_delete: bool, tab: Tab) | ||
| 1879 | 1883 | if may_write { |
| 1880 | 1884 | <form class="status-form" method="post" action="/api/set_task_tag"> |
| 1881 | 1885 | <input type="hidden" name="task_id" value=(detail.id.clone())> |
| 1882 | - <select class="status-select" name="tag_id" data-autosubmit=""> | |
| 1886 | + <select class="status-select" name="tag_id" data-autosubmit="" data-search=""> | |
| 1883 | 1887 | for tag in &tags { |
| 1884 | 1888 | <option value=(tag.id.clone()) selected=(Some(tag.id.as_str()) == detail.tag.as_ref().map(|t| t.id.as_str()))>(tag.name.clone())</option> |
| 1885 | 1889 | } |
crates/izlek-web/src/i18n.rsmodified+9 -0
| @@ -348,6 +348,9 @@ pub enum Key { | ||
| 348 | 348 | TasksCreatedLabel, |
| 349 | 349 | CommentsLabel, |
| 350 | 350 | RecentActivity, |
| 351 | + JoinedLabel, | |
| 352 | + LastSeenLabel, | |
| 353 | + InvitedByLabel, | |
| 351 | 354 | MailBatchLabel, |
| 352 | 355 | } |
| 353 | 356 | |
| @@ -989,6 +992,12 @@ pub fn t(lang: Lang, key: Key) -> &'static str { | ||
| 989 | 992 | (CommentsLabel, Tr) => "Yorumlar", |
| 990 | 993 | (RecentActivity, En) => "Recent activity", |
| 991 | 994 | (RecentActivity, Tr) => "Son etkinlik", |
| 995 | + (JoinedLabel, En) => "JOINED", | |
| 996 | + (JoinedLabel, Tr) => "KATILDI", | |
| 997 | + (LastSeenLabel, En) => "LAST SEEN", | |
| 998 | + (LastSeenLabel, Tr) => "SON GÖRÜLME", | |
| 999 | + (InvitedByLabel, En) => "INVITED BY", | |
| 1000 | + (InvitedByLabel, Tr) => "DAVET EDEN", | |
| 992 | 1001 | (MailBatchLabel, En) => "Mail delay (minutes)", |
| 993 | 1002 | (MailBatchLabel, Tr) => "Posta gecikmesi (dakika)", |
| 994 | 1003 | } |
crates/izlek-web/src/people.rsmodified+85 -43
| @@ -19,16 +19,14 @@ use crate::server::{accounts, require_user}; | ||
| 19 | 19 | |
| 20 | 20 | path_param!(user_id); |
| 21 | 21 | |
| 22 | -/// The account line the members table renders, read the same way here: a | |
| 23 | -/// named state (owner, invited) while there is nothing newer to say, and the | |
| 24 | -/// last-seen day once there is. | |
| 25 | -fn account_line(lang: Lang, is_owner: bool, has_signed_in: bool, last_day: Option<String>) -> String { | |
| 26 | - if is_owner { | |
| 27 | - t(lang, Key::OwnerStatus).to_string() | |
| 28 | - } else if !has_signed_in { | |
| 22 | +/// What the account itself is doing: the owner reads as the owner, somebody | |
| 23 | +/// who has never chosen a password reads as invited, and everybody else is | |
| 24 | +/// the day they were last here. | |
| 25 | +fn last_seen(lang: Lang, has_signed_in: bool, last_day: Option<String>) -> String { | |
| 26 | + if !has_signed_in { | |
| 29 | 27 | t(lang, Key::InvitedStatus).to_string() |
| 30 | 28 | } else if let Some(day) = last_day { |
| 31 | - crate::i18n::last_seen_label(lang, &day) | |
| 29 | + day | |
| 32 | 30 | } else { |
| 33 | 31 | t(lang, Key::ActiveStatus).to_string() |
| 34 | 32 | } |
| @@ -82,14 +80,20 @@ async fn people_page(cx: &Cx) -> Result { | ||
| 82 | 80 | .owner() |
| 83 | 81 | .await? |
| 84 | 82 | .is_some_and(|owner| owner.id == person.id); |
| 85 | - let account = account_line( | |
| 83 | + let joined = izlek_core::board::day_label(person.created_at.to_offset(zone).date()); | |
| 84 | + let seen = last_seen( | |
| 86 | 85 | lang, |
| 87 | - is_owner, | |
| 88 | 86 | person.has_signed_in(), |
| 89 | 87 | person |
| 90 | 88 | .last_signed_in_at |
| 91 | 89 | .map(|at| izlek_core::board::day_label(at.to_offset(zone).date())), |
| 92 | 90 | ); |
| 91 | + // Who let them in, as a name that leads to that person's own page. The | |
| 92 | + // first account was invited by nobody. | |
| 93 | + let inviter = match &person.invited_by { | |
| 94 | + Some(id) => store.user(id).await?, | |
| 95 | + None => None, | |
| 96 | + }; | |
| 93 | 97 | let role_key = match person.role { |
| 94 | 98 | izlek_core::Role::Admin => Key::RoleAdminOption, |
| 95 | 99 | izlek_core::Role::Member => Key::RoleMemberOption, |
| @@ -117,52 +121,90 @@ async fn people_page(cx: &Cx) -> Result { | ||
| 117 | 121 | </header> |
| 118 | 122 | |
| 119 | 123 | <main class="people-shell"> |
| 120 | - <section class="panel" id="profile"> | |
| 121 | - <div class="panel-head"> | |
| 122 | - (crate::layout::avatar(cx, &who, "avatar-lg").await?) | |
| 123 | - <h2 class="panel-title">(person.display_name.clone())</h2> | |
| 124 | - <span class="chip chip-role">(t(lang, role_key))</span> | |
| 124 | + <section class="panel person-card"> | |
| 125 | + <div class="person-head"> | |
| 126 | + (crate::layout::avatar(cx, &who, "avatar-xl").await?) | |
| 127 | + <div class="person-heading"> | |
| 128 | + <h2 class="person-name">(person.display_name.clone())</h2> | |
| 129 | + <div class="person-marks"> | |
| 130 | + <span class="chip chip-role">(t(lang, role_key))</span> | |
| 131 | + if is_owner { | |
| 132 | + <span class="chip chip-admin">(t(lang, Key::OwnerStatus))</span> | |
| 133 | + } | |
| 134 | + </div> | |
| 135 | + </div> | |
| 125 | 136 | if mine { |
| 126 | - <a class="quiet" href="/settings?section=profile">(t(lang, Key::EditLabel))</a> | |
| 137 | + <a class="quiet person-edit" href="/settings?section=profile">(t(lang, Key::EditLabel))</a> | |
| 127 | 138 | } |
| 128 | 139 | </div> |
| 129 | - <div class="panel-body"> | |
| 130 | - <p>(person.email.clone())</p> | |
| 131 | - <p>(account)</p> | |
| 132 | - </div> | |
| 140 | + <dl class="person-fields"> | |
| 141 | + <div class="person-field"> | |
| 142 | + <dt>(t(lang, Key::EmailLabel))</dt> | |
| 143 | + <dd class="person-address">(person.email.clone())</dd> | |
| 144 | + </div> | |
| 145 | + <div class="person-field"> | |
| 146 | + <dt>(t(lang, Key::JoinedLabel))</dt> | |
| 147 | + <dd>(joined)</dd> | |
| 148 | + </div> | |
| 149 | + <div class="person-field"> | |
| 150 | + <dt>(t(lang, Key::LastSeenLabel))</dt> | |
| 151 | + <dd>(seen)</dd> | |
| 152 | + </div> | |
| 153 | + if let Some(inviter) = inviter { | |
| 154 | + <div class="person-field"> | |
| 155 | + <dt>(t(lang, Key::InvitedByLabel))</dt> | |
| 156 | + <dd><a href=(format!("/people/{}", inviter.id))>(inviter.display_name.clone())</a></dd> | |
| 157 | + </div> | |
| 158 | + } | |
| 159 | + </dl> | |
| 133 | 160 | </section> |
| 134 | 161 | |
| 135 | 162 | <section class="panel"> |
| 136 | - <div class="panel-body"> | |
| 137 | - <dl class="people-stats"> | |
| 138 | - <div><dt>(t(lang, Key::TasksOpenLabel))</dt><dd>(stats.assigned_open)</dd></div> | |
| 139 | - <div><dt>(t(lang, Key::TasksDoneLabel))</dt><dd>(stats.assigned_done)</dd></div> | |
| 140 | - <div><dt>(t(lang, Key::TasksCreatedLabel))</dt><dd>(stats.created)</dd></div> | |
| 141 | - <div><dt>(t(lang, Key::CommentsLabel))</dt><dd>(stats.comments)</dd></div> | |
| 142 | - </dl> | |
| 143 | - </div> | |
| 163 | + <dl class="person-stats"> | |
| 164 | + <div class="person-stat"> | |
| 165 | + <dd>(stats.assigned_open)</dd> | |
| 166 | + <dt>(t(lang, Key::TasksOpenLabel))</dt> | |
| 167 | + </div> | |
| 168 | + <div class="person-stat"> | |
| 169 | + <dd>(stats.assigned_done)</dd> | |
| 170 | + <dt>(t(lang, Key::TasksDoneLabel))</dt> | |
| 171 | + </div> | |
| 172 | + <div class="person-stat"> | |
| 173 | + <dd>(stats.created)</dd> | |
| 174 | + <dt>(t(lang, Key::TasksCreatedLabel))</dt> | |
| 175 | + </div> | |
| 176 | + <div class="person-stat"> | |
| 177 | + <dd>(stats.comments)</dd> | |
| 178 | + <dt>(t(lang, Key::CommentsLabel))</dt> | |
| 179 | + </div> | |
| 180 | + </dl> | |
| 144 | 181 | </section> |
| 145 | 182 | |
| 146 | 183 | <section class="panel"> |
| 147 | 184 | <div class="panel-head"> |
| 148 | 185 | <h2 class="panel-title">(t(lang, Key::RecentActivity))</h2> |
| 149 | 186 | </div> |
| 150 | - <div class="panel-body"> | |
| 151 | - if feed.is_empty() { | |
| 152 | - <p>(t(lang, Key::NothingYet))</p> | |
| 187 | + if feed.is_empty() { | |
| 188 | + <div class="panel-body"><p class="muted">(t(lang, Key::NothingYet))</p></div> | |
| 189 | + } | |
| 190 | + <ul class="person-feed"> | |
| 191 | + for line in feed { | |
| 192 | + <li class="person-line"> | |
| 193 | + <span class="person-verb">(kind_word(lang, &line.kind))</span> | |
| 194 | + if let Some(task_id) = line.task_id.clone() { | |
| 195 | + <a class="person-task" href=(format!("/?task={task_id}"))> | |
| 196 | + if let Some(key) = line.task_key.clone() { | |
| 197 | + <span class="person-key">(key)</span> | |
| 198 | + } | |
| 199 | + <span class="person-title">(line.title.clone().unwrap_or_default())</span> | |
| 200 | + </a> | |
| 201 | + } else { | |
| 202 | + <span class="person-title">(line.title.clone().unwrap_or_default())</span> | |
| 203 | + } | |
| 204 | + <span class="person-day">(izlek_core::board::day_label(line.at.to_offset(zone).date()))</span> | |
| 205 | + </li> | |
| 153 | 206 | } |
| 154 | - <ul class="people-feed"> | |
| 155 | - for line in feed { | |
| 156 | - <li> | |
| 157 | - <span>(kind_word(lang, &line.kind))</span> | |
| 158 | - if let Some(title) = line.title { | |
| 159 | - <span>(title)</span> | |
| 160 | - } | |
| 161 | - <span class="people-feed-day">(izlek_core::board::day_label(line.at.to_offset(zone).date()))</span> | |
| 162 | - </li> | |
| 163 | - } | |
| 164 | - </ul> | |
| 165 | - </div> | |
| 207 | + </ul> | |
| 166 | 208 | </section> |
| 167 | 209 | </main> |
| 168 | 210 |
crates/izlek-web/tests/http.rsmodified+86 -0
| @@ -7647,6 +7647,92 @@ async fn a_member_may_read_another_members_profile_name_address_and_counts() { | ||
| 7647 | 7647 | } |
| 7648 | 7648 | } |
| 7649 | 7649 | |
| 7650 | +/// Every fact on a profile sits in a named cell, and the person who let this | |
| 7651 | +/// member in is a link to their own page rather than a name in prose. | |
| 7652 | +#[tokio::test] | |
| 7653 | +async fn a_profile_names_its_fields_and_links_the_person_who_invited_them() { | |
| 7654 | + let app = App::open().await; | |
| 7655 | + let admin_cookie = admin(&app).await; | |
| 7656 | + invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await; | |
| 7657 | + let mem_id = user_id(&app, "mem@izlek.sh").await; | |
| 7658 | + let admin_id = app | |
| 7659 | + .store | |
| 7660 | + .users(&app.workspace_id().await) | |
| 7661 | + .await | |
| 7662 | + .unwrap() | |
| 7663 | + .into_iter() | |
| 7664 | + .find(|user| user.role == Role::Admin) | |
| 7665 | + .unwrap() | |
| 7666 | + .id; | |
| 7667 | + | |
| 7668 | + let page = app.get(&format!("/people/{mem_id}"), Some(&admin_cookie)).await; | |
| 7669 | + let html = String::from_utf8(page.bytes).unwrap(); | |
| 7670 | + for label in ["EMAIL", "JOINED", "LAST SEEN", "INVITED BY"] { | |
| 7671 | + assert!(html.contains(label), "the {label} field is not on the page: {html}"); | |
| 7672 | + } | |
| 7673 | + assert!( | |
| 7674 | + html.contains(&format!(r#"href="/people/{admin_id}""#)), | |
| 7675 | + "the inviter is not a way to their own page: {html}" | |
| 7676 | + ); | |
| 7677 | + assert!( | |
| 7678 | + html.contains("avatar-xl"), | |
| 7679 | + "the profile picture is not the page's own size: {html}" | |
| 7680 | + ); | |
| 7681 | + | |
| 7682 | + // The first account was invited by nobody, so it carries no such cell. | |
| 7683 | + let owner = app.get(&format!("/people/{admin_id}"), Some(&admin_cookie)).await; | |
| 7684 | + let owner_html = String::from_utf8(owner.bytes).unwrap(); | |
| 7685 | + assert!( | |
| 7686 | + !owner_html.contains("INVITED BY"), | |
| 7687 | + "the owner was invited by somebody: {owner_html}" | |
| 7688 | + ); | |
| 7689 | +} | |
| 7690 | + | |
| 7691 | +/// A face or a name in the task modal leads to the person it names. | |
| 7692 | +#[tokio::test] | |
| 7693 | +async fn a_comment_author_and_an_assignee_lead_to_their_profiles() { | |
| 7694 | + let app = App::open().await; | |
| 7695 | + let admin_cookie = admin(&app).await; | |
| 7696 | + invited(&app, &admin_cookie, "mem@izlek.sh", "Mem Ber", Role::Member).await; | |
| 7697 | + let mem_id = user_id(&app, "mem@izlek.sh").await; | |
| 7698 | + let workspace_id = app.workspace_id().await; | |
| 7699 | + let board = app.store.board(&workspace_id).await.unwrap().unwrap(); | |
| 7700 | + let open = app.store.columns(&board.id).await.unwrap()[0].id.clone(); | |
| 7701 | + let task = a_task_by(&app, &board.id, &open, "Hold the door", &mem_id).await; | |
| 7702 | + app.store.assign_task(&task, &mem_id).await.unwrap(); | |
| 7703 | + app.store | |
| 7704 | + .add_comment(&task, &mem_id, "a note", time::OffsetDateTime::now_utc()) | |
| 7705 | + .await | |
| 7706 | + .unwrap(); | |
| 7707 | + | |
| 7708 | + let page = app | |
| 7709 | + .get(&format!("/?task={task}&tab=comments"), Some(&admin_cookie)) | |
| 7710 | + .await; | |
| 7711 | + let html = String::from_utf8(page.bytes).unwrap(); | |
| 7712 | + assert!( | |
| 7713 | + html.matches(&format!(r#"href="/people/{mem_id}""#)).count() >= 2, | |
| 7714 | + "the comment's author and the assignee do not both lead anywhere: {html}" | |
| 7715 | + ); | |
| 7716 | +} | |
| 7717 | + | |
| 7718 | +/// The board's project filter is typed into, like the pickers on the logs | |
| 7719 | +/// page: a workspace with many tags is not a list to scroll. | |
| 7720 | +#[tokio::test] | |
| 7721 | +async fn the_project_filter_is_written_into() { | |
| 7722 | + let app = App::open().await; | |
| 7723 | + let admin_cookie = admin(&app).await; | |
| 7724 | + let page = app.get("/", Some(&admin_cookie)).await; | |
| 7725 | + let html = String::from_utf8(page.bytes).unwrap(); | |
| 7726 | + let filter = html | |
| 7727 | + .split("<select") | |
| 7728 | + .find(|chunk| chunk.contains(r#"name="tag""#)) | |
| 7729 | + .unwrap_or_else(|| panic!("no project filter on the board: {html}")); | |
| 7730 | + assert!( | |
| 7731 | + filter.contains("data-search"), | |
| 7732 | + "the project filter cannot be typed into: {filter}" | |
| 7733 | + ); | |
| 7734 | +} | |
| 7735 | + | |
| 7650 | 7736 | #[tokio::test] |
| 7651 | 7737 | async fn a_profile_is_not_found_signed_out_or_outside_the_workspace() { |
| 7652 | 7738 | let app = App::open().await; |
style/main.scssmodified+183 -18
| @@ -941,14 +941,19 @@ a { | ||
| 941 | 941 | // The modal asks for two other sizes: 18px inside an assignee chip, 28px |
| 942 | 942 | // beside a comment. The border is the board's overlap trick and has no job |
| 943 | 943 | // on a lone avatar, so these drop it. |
| 944 | - &-sm { | |
| 944 | + // | |
| 945 | + // They are written as `.avatar.avatar-sm` on purpose: the Instrument skin | |
| 946 | + // sizes `.avatar` from a `[data-ui]` scope, which outweighs a lone class — | |
| 947 | + // a plain `.avatar-lg` lost to it, and every size modifier collapsed to | |
| 948 | + // 18px on that skin without anybody noticing. | |
| 949 | + &.avatar-sm { | |
| 945 | 950 | width: 18px; |
| 946 | 951 | height: 18px; |
| 947 | 952 | border: none; |
| 948 | 953 | font-size: 10px; |
| 949 | 954 | } |
| 950 | 955 | |
| 951 | - &-lg { | |
| 956 | + &.avatar-lg { | |
| 952 | 957 | width: 28px; |
| 953 | 958 | height: 28px; |
| 954 | 959 | border: none; |
| @@ -956,6 +961,17 @@ a { | ||
| 956 | 961 | flex: none; |
| 957 | 962 | } |
| 958 | 963 | |
| 964 | + // The profile page's own picture: the one place a face is the subject of | |
| 965 | + // the screen rather than a mark beside somebody's name. | |
| 966 | + &.avatar-xl { | |
| 967 | + width: 92px; | |
| 968 | + height: 92px; | |
| 969 | + border: none; | |
| 970 | + font-size: 30px; | |
| 971 | + font-weight: 500; | |
| 972 | + flex: none; | |
| 973 | + } | |
| 974 | + | |
| 959 | 975 | // A bare avatar carries `data-name`; hovering raises a house tooltip in |
| 960 | 976 | // place of the native `title`. |
| 961 | 977 | &[data-name]:hover::after { |
| @@ -3561,43 +3577,192 @@ input[type="radio"] { | ||
| 3561 | 3577 | > * { flex: none; } |
| 3562 | 3578 | } |
| 3563 | 3579 | |
| 3564 | -.people-stats { | |
| 3580 | +// A face or a name that leads to the person it names. The chrome stays the | |
| 3581 | +// chrome — the link exists to be clicked, not to look like one. | |
| 3582 | +.person-link { | |
| 3583 | + display: inline-flex; | |
| 3584 | + align-items: center; | |
| 3585 | + gap: inherit; | |
| 3586 | + color: inherit; | |
| 3587 | + text-decoration: none; | |
| 3588 | + min-width: 0; | |
| 3589 | + | |
| 3590 | + &:hover { text-decoration: underline; } | |
| 3591 | +} | |
| 3592 | + | |
| 3593 | +.person-card { | |
| 3594 | + overflow: hidden; | |
| 3595 | +} | |
| 3596 | + | |
| 3597 | +// The head is the identity: a picture big enough to be a picture, the name, | |
| 3598 | +// what the workspace calls this person, and — on your own page only — the way | |
| 3599 | +// to the one screen that can change any of it. | |
| 3600 | +.person-head { | |
| 3565 | 3601 | display: flex; |
| 3566 | - flex-wrap: wrap; | |
| 3567 | - gap: 28px; | |
| 3602 | + align-items: center; | |
| 3603 | + gap: 18px; | |
| 3604 | + padding: 22px 22px 20px; | |
| 3605 | +} | |
| 3606 | + | |
| 3607 | +.person-heading { | |
| 3608 | + display: flex; | |
| 3609 | + flex-direction: column; | |
| 3610 | + gap: 8px; | |
| 3611 | + min-width: 0; | |
| 3612 | +} | |
| 3613 | + | |
| 3614 | +.person-name { | |
| 3568 | 3615 | margin: 0; |
| 3616 | + font-family: var(--font-display); | |
| 3617 | + font-size: 22px; | |
| 3618 | + font-weight: 600; | |
| 3619 | + line-height: 1.1; | |
| 3620 | + overflow: hidden; | |
| 3621 | + text-overflow: ellipsis; | |
| 3622 | + white-space: nowrap; | |
| 3623 | +} | |
| 3624 | + | |
| 3625 | +.person-marks { | |
| 3626 | + display: flex; | |
| 3627 | + align-items: center; | |
| 3628 | + gap: 6px; | |
| 3629 | +} | |
| 3630 | + | |
| 3631 | +.person-edit { | |
| 3632 | + margin-left: auto; | |
| 3633 | + flex: none; | |
| 3634 | +} | |
| 3635 | + | |
| 3636 | +// Every fact sits in a named cell instead of floating as a line of text. The | |
| 3637 | +// cells share the panel's own hairlines, so the block reads as one table | |
| 3638 | +// rather than as paragraphs that happen to be near each other. | |
| 3639 | +.person-fields { | |
| 3640 | + display: grid; | |
| 3641 | + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); | |
| 3642 | + margin: 0; | |
| 3643 | + border-top: 1px solid var(--border); | |
| 3644 | +} | |
| 3645 | + | |
| 3646 | +.person-field { | |
| 3647 | + padding: 12px 22px 14px; | |
| 3648 | + min-width: 0; | |
| 3649 | + border-right: 1px solid var(--border); | |
| 3650 | + | |
| 3651 | + &:last-child { border-right: none; } | |
| 3569 | 3652 | |
| 3570 | 3653 | dt { |
| 3571 | - font-size: 11px; | |
| 3572 | - letter-spacing: 0.08em; | |
| 3573 | - text-transform: uppercase; | |
| 3654 | + font-size: 10px; | |
| 3655 | + letter-spacing: 0.09em; | |
| 3574 | 3656 | color: var(--muted); |
| 3575 | 3657 | } |
| 3576 | 3658 | |
| 3659 | + dd { | |
| 3660 | + margin: 4px 0 0; | |
| 3661 | + font-size: 13px; | |
| 3662 | + color: var(--ink); | |
| 3663 | + overflow: hidden; | |
| 3664 | + text-overflow: ellipsis; | |
| 3665 | + white-space: nowrap; | |
| 3666 | + } | |
| 3667 | +} | |
| 3668 | + | |
| 3669 | +.person-field dd.person-address { | |
| 3670 | + font-family: var(--font-mono); | |
| 3671 | + font-size: 12px; | |
| 3672 | +} | |
| 3673 | + | |
| 3674 | +// The hover tooltip names a face that is standing beside its own name. | |
| 3675 | +.person-head .avatar[data-name]:hover::after { content: none; } | |
| 3676 | + | |
| 3677 | +// Four counts, four boxes. The number leads and the label sits under it, so a | |
| 3678 | +// column reads as one thing rather than as a word with a digit beside it. | |
| 3679 | +.person-stats { | |
| 3680 | + display: grid; | |
| 3681 | + grid-template-columns: repeat(4, 1fr); | |
| 3682 | + margin: 0; | |
| 3683 | + | |
| 3684 | + @media (max-width: 620px) { | |
| 3685 | + grid-template-columns: repeat(2, 1fr); | |
| 3686 | + } | |
| 3687 | +} | |
| 3688 | + | |
| 3689 | +.person-stat { | |
| 3690 | + padding: 16px 22px 18px; | |
| 3691 | + border-right: 1px solid var(--border); | |
| 3692 | + | |
| 3693 | + &:last-child { border-right: none; } | |
| 3694 | + | |
| 3577 | 3695 | dd { |
| 3578 | 3696 | margin: 0; |
| 3579 | - font-size: 20px; | |
| 3580 | - font-weight: 600; | |
| 3697 | + font-family: var(--font-mono); | |
| 3698 | + font-size: 26px; | |
| 3699 | + font-weight: 500; | |
| 3700 | + line-height: 1.1; | |
| 3581 | 3701 | font-variant-numeric: tabular-nums; |
| 3582 | 3702 | } |
| 3703 | + | |
| 3704 | + dt { | |
| 3705 | + margin-top: 6px; | |
| 3706 | + font-size: 10px; | |
| 3707 | + letter-spacing: 0.09em; | |
| 3708 | + text-transform: uppercase; | |
| 3709 | + color: var(--muted); | |
| 3710 | + } | |
| 3583 | 3711 | } |
| 3584 | 3712 | |
| 3585 | -.people-feed { | |
| 3713 | +.person-feed { | |
| 3586 | 3714 | list-style: none; |
| 3587 | 3715 | margin: 0; |
| 3588 | 3716 | padding: 0; |
| 3717 | +} | |
| 3718 | + | |
| 3719 | +.person-line { | |
| 3589 | 3720 | display: flex; |
| 3590 | - flex-direction: column; | |
| 3721 | + align-items: baseline; | |
| 3722 | + gap: 12px; | |
| 3723 | + padding: 9px 18px; | |
| 3724 | + border-top: 1px solid var(--border); | |
| 3725 | + min-width: 0; | |
| 3726 | + | |
| 3727 | + &:first-child { border-top: none; } | |
| 3728 | + &:hover { background: var(--surface-muted); } | |
| 3729 | +} | |
| 3730 | + | |
| 3731 | +.person-verb { | |
| 3732 | + flex: none; | |
| 3733 | + width: 88px; | |
| 3734 | + font-size: 11px; | |
| 3735 | + letter-spacing: 0.06em; | |
| 3736 | + text-transform: uppercase; | |
| 3737 | + color: var(--muted); | |
| 3738 | +} | |
| 3739 | + | |
| 3740 | +.person-task { | |
| 3741 | + display: flex; | |
| 3742 | + align-items: baseline; | |
| 3591 | 3743 | gap: 8px; |
| 3744 | + min-width: 0; | |
| 3745 | + color: inherit; | |
| 3746 | + text-decoration: none; | |
| 3592 | 3747 | |
| 3593 | - li { | |
| 3594 | - display: flex; | |
| 3595 | - align-items: baseline; | |
| 3596 | - gap: 10px; | |
| 3597 | - } | |
| 3748 | + &:hover .person-title { text-decoration: underline; } | |
| 3749 | +} | |
| 3750 | + | |
| 3751 | +.person-key { | |
| 3752 | + flex: none; | |
| 3753 | + font-family: var(--font-mono); | |
| 3754 | + font-size: 11px; | |
| 3755 | + color: var(--muted); | |
| 3756 | +} | |
| 3757 | + | |
| 3758 | +.person-title { | |
| 3759 | + overflow: hidden; | |
| 3760 | + text-overflow: ellipsis; | |
| 3761 | + white-space: nowrap; | |
| 3762 | + font-size: 13px; | |
| 3598 | 3763 | } |
| 3599 | 3764 | |
| 3600 | -.people-feed-day { | |
| 3765 | +.person-day { | |
| 3601 | 3766 | margin-left: auto; |
| 3602 | 3767 | flex: none; |
| 3603 | 3768 | white-space: nowrap; |