Skip to content

Commit c7edf47

Browse files
committed
Fix glitching gutter and link target
1 parent 535d4b0 commit c7edf47

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/pcss/base.pcss

+6-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ a:not(.btn, .nav-link) {
8282
opacity: 0;
8383
pointer-events: none;
8484
> .inner-modal {
85-
@apply flex flex-col bg-white min-w-80 max-w-lg;
85+
@apply flex flex-col bg-white min-w-80 max-w-lg;
8686
max-height: 100%;
8787
transition: all 0.3s ease;
8888
transform: translateY(20px);
@@ -158,3 +158,8 @@ a:not(.btn, .nav-link) {
158158
}
159159
}
160160
}
161+
162+
/* Prevent modal dialogs from stuttering page */
163+
:root:has(#modal) {
164+
scrollbar-gutter: stable;
165+
}

src/pug/staff/index.pug

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ block main
3535
- let clickable = !!(person?.website || person?.bio)
3636
- let alt = (person?.name) ? (person.name.zh || '') + (person.name.zh === person.name.en ? '' : ' ' + person.name.en) : person_id
3737
.staff.flex.flex-col.items-center.justify-center(id=person_id, data-id=person_id)
38-
a.w-full.flex.items-center.justify-center.aspect-square.bg-slate-100.rounded-full(href=(clickable ? (person.bio ? `staff/#${person_id}` : person.website) : null), rel="external")
38+
a.w-full.flex.items-center.justify-center.aspect-square.bg-slate-100.rounded-full(href=((!person.website && !person.bio) ? null : (person.bio ? `staff/#${person_id}` : person.website)), rel="external", target=((person.website && !person.bio) ? "_blank" : null))
3939
if person && person.avatar
4040
img.w-full.rounded-full(src=person.avatar, alt=alt)
4141
else

0 commit comments

Comments
 (0)