Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo sync #13104

Merged
merged 4 commits into from
Dec 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 54 additions & 46 deletions components/guides/LearningTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,55 +50,63 @@ export const LearningTrack = ({ track }: Props) => {
</div>

{track && track.guides && (
<ActionList
{...{ as: 'ul' }}
items={track?.guides?.slice(0, numVisible).map((guide) => {
return {
renderItem: () => (
<ActionList.Item
as="li"
key={guide.href + track?.trackName}
sx={{
borderRadius: 0,
padding: 0,
':hover': {
<div style={{ counterReset: 'li' }}>
<ActionList
{...{ as: 'ol' }}
items={track?.guides?.slice(0, numVisible).map((guide) => {
return {
renderItem: () => (
<ActionList.Item
as="li"
key={guide.href + track?.trackName}
sx={{
position: 'relative',
borderRadius: 0,
},
':last-of-type': {
marginBottom: '-8px',
},
':first-of-type': {
marginTop: '-8px',
},
}}
>
<a
className="rounded-0 width-full d-block Box-row d-flex flex-items-center color-fg-default no-underline"
href={`${guide.href}?learn=${track?.trackName}&learnProduct=${track?.trackProduct}`}
padding: 0,
':hover': {
borderRadius: 0,
},
':last-of-type': {
marginBottom: '-8px',
},
':first-of-type': {
marginTop: '-8px',
},
':before': {
width: 'calc(1.5rem - 0px)',
height: 'calc(1.5rem - 0px)',
fontSize: 'calc(1rem - 1px)',
margin: '22px 0 0 1rem',
content: 'counter(li)',
counterIncrement: 'li',
position: 'absolute',
left: 0,
color: 'var(--color-canvas-default)',
fontWeight: 500,
textAlign: 'center',
borderRadius: '50%',
backgroundColor: 'var(--color-fg-default)',
},
}}
>
<div
className="color-bg-subtle d-inline-flex mr-4 circle flex-items-center flex-justify-center"
style={{ width: 32, height: 32 }}
<a
className="rounded-0 pl-7 py-4 width-full d-block Box-row d-flex flex-items-center color-fg-default no-underline"
href={`${guide.href}?learn=${track?.trackName}&learnProduct=${track?.trackProduct}`}
>
{track?.guides && (
<span className="m-2 f3 lh-condensed-ultra text-center text-bold step-circle-text">
{track.guides?.indexOf(guide) + 1}
</span>
)}
</div>
<h5
className="flex-auto pr-2"
dangerouslySetInnerHTML={{ __html: guide.title }}
/>
<div className="color-fg-muted h6 text-uppercase flex-shrink-0">
{t('guide_types')[guide.page?.type || '']}
</div>
</a>
</ActionList.Item>
),
}
})}
></ActionList>
<h5
className="flex-auto pr-2"
dangerouslySetInnerHTML={{ __html: guide.title }}
/>
<div className="color-fg-muted h6 text-uppercase flex-shrink-0">
{t('guide_types')[guide.page?.type || '']}
</div>
</a>
</ActionList.Item>
),
}
})}
></ActionList>
</div>
)}
{(track?.guides?.length || 0) > numVisible ? (
<button
Expand Down