Skip to content

Commit 87ababf

Browse files
committed
wip(about): add our partners tab
1 parent a374ad8 commit 87ababf

File tree

3 files changed

+57
-27
lines changed

3 files changed

+57
-27
lines changed

Diff for: client/src/about/custom-elements.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ export class TeamMember extends LitElement {
3434
if (this.renderRoot instanceof HTMLElement) {
3535
this.renderRoot.tabIndex = 0;
3636

37-
const h4 = this.renderRoot.querySelector("h4");
38-
if (h4) {
39-
this.renderRoot.id = `our_team_${h4.id}`;
37+
const hx = this.renderRoot.querySelector("h4, h5");
38+
const panel = hx?.closest(".tabpanel");
39+
if (hx && panel) {
40+
const id = panel.id.replace("-panel", "");
41+
this.renderRoot.id = `${id}_${hx.id}`;
4042
}
4143

4244
this.renderRoot.addEventListener("focus", ({ currentTarget }) => {

Diff for: client/src/about/index.scss

+49-23
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ main.about-container {
131131
h5,
132132
h6 {
133133
color: var(--about-heading-color);
134+
letter-spacing: 0;
134135
}
135136

136137
> header {
@@ -575,9 +576,13 @@ main.about-container {
575576
}
576577
}
577578

578-
#our_team-panel {
579+
#our_team-panel,
580+
#our_partners-panel > div {
581+
--team-grid-gap: 2.5rem;
582+
--team-card-padding: 1.5rem;
583+
579584
display: grid;
580-
gap: 2.5rem;
585+
gap: var(--team-grid-gap);
581586
grid-auto-flow: dense;
582587
grid-template-columns: [full-start] 1fr 1fr 1fr [full-end];
583588

@@ -586,17 +591,30 @@ main.about-container {
586591
grid-template-columns: [full-start] 1fr 1fr [full-end];
587592
}
588593

589-
> p {
594+
> h4,
595+
p {
590596
grid-column: full;
591597
margin: 0;
592598
}
593599

600+
h4,
601+
h5 {
602+
font-size: 1.75rem;
603+
font-weight: 600;
604+
margin: 0;
605+
text-transform: none;
606+
607+
@media (max-width: $screen-md) {
608+
font-size: 1rem;
609+
}
610+
}
611+
594612
team-member {
595613
background: var(--about-team-bg);
596614
box-shadow: var(--about-team-shadow);
597615
color: var(--about-team-color);
598616
cursor: pointer;
599-
padding: 1.5rem;
617+
padding: var(--team-card-padding);
600618
scroll-margin-top: calc(
601619
var(--sticky-header-without-actions-height) + 1.5rem
602620
);
@@ -605,15 +623,9 @@ main.about-container {
605623
grid-column: full;
606624
}
607625

608-
h4 {
609-
font-size: 1.75rem;
610-
font-weight: 600;
611-
margin: 0;
626+
h4,
627+
h5 {
612628
margin-bottom: 0.5rem;
613-
614-
@media (max-width: $screen-md) {
615-
font-size: 1rem;
616-
}
617629
}
618630

619631
li:first-of-type {
@@ -624,6 +636,7 @@ main.about-container {
624636
img {
625637
aspect-ratio: 1;
626638
margin: 0.5rem 0;
639+
width: 100%;
627640
}
628641

629642
a[href^="https://github.com"]
@@ -658,16 +671,21 @@ main.about-container {
658671
align-content: start;
659672
cursor: unset;
660673
display: grid;
661-
gap: 0 1.5rem;
674+
gap: 0 var(--team-card-padding);
662675
grid-column: span 2;
663676
grid-template-areas:
664-
"name name name"
665-
"title title title"
666-
"picture bio bio"
667-
". bio bio";
668-
grid-template-columns: 1fr 5rem 1fr;
669-
670-
h4 {
677+
"name name"
678+
"title title"
679+
"picture bio"
680+
". bio";
681+
grid-template-columns:
682+
calc(
683+
(100% - var(--team-grid-gap) - 2 * var(--team-card-padding)) / 2
684+
)
685+
1fr;
686+
687+
h4,
688+
h5 {
671689
grid-area: name;
672690
}
673691

@@ -682,7 +700,7 @@ main.about-container {
682700
grid-area: picture;
683701
}
684702

685-
li:nth-of-type(3) {
703+
li:nth-of-type(3):not(:last-of-type) {
686704
align-self: end;
687705
grid-area: picture;
688706
}
@@ -706,7 +724,7 @@ main.about-container {
706724
"bio bio";
707725
grid-template-columns: 1fr 1fr;
708726

709-
ul li:nth-of-type(3) {
727+
ul li:nth-of-type(3):not(:last-of-type) {
710728
align-self: start;
711729
grid-area: github;
712730

@@ -724,7 +742,7 @@ main.about-container {
724742
"bio";
725743
grid-template-columns: 1fr;
726744

727-
ul li:nth-of-type(3) {
745+
ul li:nth-of-type(3):not(:last-of-type) {
728746
align-self: end;
729747
grid-area: picture;
730748

@@ -737,6 +755,14 @@ main.about-container {
737755
}
738756
}
739757

758+
#our_partners-panel > div {
759+
margin-top: 2.5rem;
760+
761+
&:not(:last-of-type) {
762+
margin-bottom: 5rem;
763+
}
764+
}
765+
740766
&[aria-labelledby="global_impact"] {
741767
display: block;
742768
margin: var(--about-section-gap) auto;

Diff for: client/src/about/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ function Tabs({ section }: { section: AboutSection }) {
118118
useEffect(() => {
119119
const hash = document.location.hash.startsWith("#our_team")
120120
? "#our_team"
121-
: document.location.hash;
121+
: document.location.hash.startsWith("#our_partners")
122+
? "#our_partners"
123+
: document.location.hash;
122124
const tab = section.H3s?.findIndex(({ value }) => `#${value.id}` === hash);
123125
if (tab && tab > 0) {
124126
setActiveTab(tab);

0 commit comments

Comments
 (0)