-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: add introduction cards * change the install copy on the intro page * docs: update example Co-authored-by: Tamas Szuromi <[email protected]>
- Loading branch information
Showing
12 changed files
with
138 additions
and
22 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,2 @@ | ||
label: "Sandpack-react" | ||
position: 4 |
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,30 @@ | ||
import React from "react"; | ||
|
||
type Props = Record<"title" | "description" | "href" | "actionText", string> & { | ||
external?: boolean; | ||
}; | ||
|
||
const IntroCard: React.FC<Props> = ({ | ||
title, | ||
description, | ||
href, | ||
actionText, | ||
external, | ||
}) => { | ||
return ( | ||
<a | ||
className="intro-card" | ||
href={href} | ||
rel="noreferrer" | ||
target={external ? "_blank" : "_self"} | ||
> | ||
<h3 className="intro-card_title">{title}</h3> | ||
<p className="intro-card_desc">{description}</p> | ||
<div className="intro-card_link"> | ||
{actionText} {external && "↗"} | ||
</div> | ||
</a> | ||
); | ||
}; | ||
|
||
export { IntroCard }; |
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 |
---|---|---|
@@ -1,20 +1,22 @@ | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
letter-spacing: -0.05em; | ||
} | ||
.markdown { | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
letter-spacing: -0.05em; | ||
} | ||
|
||
h1 { | ||
font-size: 64px !important; | ||
} | ||
h1 { | ||
font-size: 64px; | ||
} | ||
|
||
h2 { | ||
font-size: 48px !important; | ||
} | ||
h2 { | ||
font-size: 48px; | ||
} | ||
|
||
h3 { | ||
font-size: 36px !important; | ||
h3 { | ||
font-size: 36px; | ||
} | ||
} |
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,54 @@ | ||
.intro-section { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
margin-bottom: 2em; | ||
|
||
.intro-card { | ||
margin-bottom: 1em; | ||
|
||
@media (min-width: 961px) { | ||
width: calc(50% - 0.5em); | ||
} | ||
} | ||
} | ||
|
||
.intro-card { | ||
background: #151515; | ||
border-radius: 10px; | ||
padding: 20px; | ||
color: var(--sandpack-text-color); | ||
|
||
&:hover { | ||
color: var(--sandpack-text-color); | ||
text-decoration: none; | ||
|
||
.intro-card_link { | ||
color: var(--ifm-link-hover-color); | ||
} | ||
} | ||
|
||
.intro-card_title { | ||
font-weight: 500; | ||
font-size: 16px; | ||
margin: 5px 0px; | ||
} | ||
|
||
.intro-card_desc { | ||
font-size: 14px; | ||
line-height: 1.4; | ||
|
||
margin: 5px 0px; | ||
|
||
color: #ffffff; | ||
opacity: 0.5; | ||
} | ||
|
||
.intro-card_link { | ||
font-size: 14px; | ||
line-height: 15px; | ||
|
||
color: #ffffff; | ||
margin-top: 10px; | ||
} | ||
} |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.