-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spruce up introduction steps with component
- Loading branch information
Showing
4 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import "../css/FancyStep.css"; | ||
import type { PropsWithChildren } from 'react'; | ||
import MDXContent from '@theme/MDXContent'; | ||
|
||
export type FancyStepProps = PropsWithChildren & { | ||
step: number; | ||
noline: boolean; | ||
}; | ||
|
||
export default function FancyStep({ step, noline, children }: FancyStepProps) { | ||
return ( | ||
<div className="fancystep-root"> | ||
<div className={noline ? "" : "fancystep-leftcol"}> | ||
<div className="fancystep-number">{step}</div> | ||
</div> | ||
<div className="fancystep-content"> | ||
<MDXContent>{children}</MDXContent> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.fancystep-root { | ||
flex-direction: row; | ||
flex-wrap: nowrap; | ||
display: flex; | ||
gap: 20px; | ||
margin-top: 20px; | ||
margin-left: 6px; | ||
} | ||
|
||
.fancystep-number { | ||
width: 40px; | ||
height: 40px; | ||
text-align: center; | ||
line-height: 38px; | ||
border-radius: 999px; | ||
background-color: var(--ifm-color-primary-light); | ||
position: relative; | ||
color: rgba(255, 255, 255, 0.9); | ||
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
font-size: var(--ifm-h3-font-size); | ||
font-weight: bold; | ||
} | ||
|
||
[data-theme='dark'] .fancystep-number { | ||
color: black; | ||
} | ||
|
||
.fancystep-leftcol { | ||
position: relative; | ||
} | ||
|
||
.fancystep-leftcol::after { | ||
content: ''; | ||
background-color: var(--ifm-color-primary-light); | ||
position: absolute; | ||
left: 20px; | ||
opacity: 0.5; | ||
top: 60px; | ||
right: 19px; | ||
bottom: 0px; | ||
} | ||
|
||
.fancystep-number::before { | ||
content: ''; | ||
position: absolute; | ||
left: -6px; | ||
right: -6px; | ||
top: -6px; | ||
bottom: -6px; | ||
opacity: 0.3; | ||
z-index: -1; | ||
border-radius: 999px; | ||
background-color: var(--ifm-color-primary-light); | ||
} | ||
|
||
.fancystep-content { | ||
flex: 1; | ||
padding-top: 6px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import MDXComponents from '@theme-original/MDXComponents'; | ||
import AppliesTo from '@site/src/components/AppliesTo'; | ||
import FancyStep from '@site/src/components/FancyStep'; | ||
|
||
export default { | ||
...MDXComponents, | ||
AppliesTo, | ||
FancyStep, | ||
}; |