Skip to content

Commit 77806a4

Browse files
authored
Merge pull request #13104 from github/repo-sync
repo sync
2 parents b3ec6a8 + ea512ef commit 77806a4

File tree

1 file changed

+54
-46
lines changed

1 file changed

+54
-46
lines changed

components/guides/LearningTrack.tsx

+54-46
Original file line numberDiff line numberDiff line change
@@ -50,55 +50,63 @@ export const LearningTrack = ({ track }: Props) => {
5050
</div>
5151

5252
{track && track.guides && (
53-
<ActionList
54-
{...{ as: 'ul' }}
55-
items={track?.guides?.slice(0, numVisible).map((guide) => {
56-
return {
57-
renderItem: () => (
58-
<ActionList.Item
59-
as="li"
60-
key={guide.href + track?.trackName}
61-
sx={{
62-
borderRadius: 0,
63-
padding: 0,
64-
':hover': {
53+
<div style={{ counterReset: 'li' }}>
54+
<ActionList
55+
{...{ as: 'ol' }}
56+
items={track?.guides?.slice(0, numVisible).map((guide) => {
57+
return {
58+
renderItem: () => (
59+
<ActionList.Item
60+
as="li"
61+
key={guide.href + track?.trackName}
62+
sx={{
63+
position: 'relative',
6564
borderRadius: 0,
66-
},
67-
':last-of-type': {
68-
marginBottom: '-8px',
69-
},
70-
':first-of-type': {
71-
marginTop: '-8px',
72-
},
73-
}}
74-
>
75-
<a
76-
className="rounded-0 width-full d-block Box-row d-flex flex-items-center color-fg-default no-underline"
77-
href={`${guide.href}?learn=${track?.trackName}&learnProduct=${track?.trackProduct}`}
65+
padding: 0,
66+
':hover': {
67+
borderRadius: 0,
68+
},
69+
':last-of-type': {
70+
marginBottom: '-8px',
71+
},
72+
':first-of-type': {
73+
marginTop: '-8px',
74+
},
75+
':before': {
76+
width: 'calc(1.5rem - 0px)',
77+
height: 'calc(1.5rem - 0px)',
78+
fontSize: 'calc(1rem - 1px)',
79+
margin: '22px 0 0 1rem',
80+
content: 'counter(li)',
81+
counterIncrement: 'li',
82+
position: 'absolute',
83+
left: 0,
84+
color: 'var(--color-canvas-default)',
85+
fontWeight: 500,
86+
textAlign: 'center',
87+
borderRadius: '50%',
88+
backgroundColor: 'var(--color-fg-default)',
89+
},
90+
}}
7891
>
79-
<div
80-
className="color-bg-subtle d-inline-flex mr-4 circle flex-items-center flex-justify-center"
81-
style={{ width: 32, height: 32 }}
92+
<a
93+
className="rounded-0 pl-7 py-4 width-full d-block Box-row d-flex flex-items-center color-fg-default no-underline"
94+
href={`${guide.href}?learn=${track?.trackName}&learnProduct=${track?.trackProduct}`}
8295
>
83-
{track?.guides && (
84-
<span className="m-2 f3 lh-condensed-ultra text-center text-bold step-circle-text">
85-
{track.guides?.indexOf(guide) + 1}
86-
</span>
87-
)}
88-
</div>
89-
<h5
90-
className="flex-auto pr-2"
91-
dangerouslySetInnerHTML={{ __html: guide.title }}
92-
/>
93-
<div className="color-fg-muted h6 text-uppercase flex-shrink-0">
94-
{t('guide_types')[guide.page?.type || '']}
95-
</div>
96-
</a>
97-
</ActionList.Item>
98-
),
99-
}
100-
})}
101-
></ActionList>
96+
<h5
97+
className="flex-auto pr-2"
98+
dangerouslySetInnerHTML={{ __html: guide.title }}
99+
/>
100+
<div className="color-fg-muted h6 text-uppercase flex-shrink-0">
101+
{t('guide_types')[guide.page?.type || '']}
102+
</div>
103+
</a>
104+
</ActionList.Item>
105+
),
106+
}
107+
})}
108+
></ActionList>
109+
</div>
102110
)}
103111
{(track?.guides?.length || 0) > numVisible ? (
104112
<button

0 commit comments

Comments
 (0)