-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Responsive home page and use cases ui (#2468)
![Kapture 2023-09-21 at 15 51 53](https://github.com/microsoft/typespec/assets/1031227/10f2b416-ec9b-43ac-b340-d10abeb9f798) <img width="2301" alt="image" src="https://github.com/microsoft/typespec/assets/1031227/57aac64c-1f7a-4c93-818e-40fc1998a475">
- Loading branch information
1 parent
abf11c3
commit 1b75306
Showing
20 changed files
with
623 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ trigger: none | |
pr: | ||
- main | ||
- release/* | ||
- feature/website-design | ||
|
||
jobs: | ||
- job: publish_playground | ||
|
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,5 @@ | ||
.card { | ||
background-color: var(--colorNeutralBackground1); | ||
border-radius: 22px; | ||
padding: 20px; | ||
} |
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,11 @@ | ||
import { mergeClasses } from "@fluentui/react-components"; | ||
import style from "./card.module.css"; | ||
|
||
export interface CardProps { | ||
children?: React.ReactNode; | ||
className?: string; | ||
} | ||
|
||
export const Card = ({ children, className }: CardProps) => { | ||
return <div className={mergeClasses(style["card"], className)}> {children}</div>; | ||
}; |
14 changes: 14 additions & 0 deletions
14
packages/website/src/components/description-text/secondary-text.tsx
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,14 @@ | ||
import { makeStyles, mergeClasses, tokens } from "@fluentui/react-components"; | ||
|
||
const useFluentStyles = makeStyles({ | ||
descriptionText: { color: tokens.colorNeutralForeground3 }, | ||
}); | ||
|
||
export interface DescriptionTextProps { | ||
children: React.ReactNode; | ||
className?: string; | ||
} | ||
export const DescriptionText = ({ children, className }: DescriptionTextProps) => { | ||
const fluentStyles = useFluentStyles(); | ||
return <div className={mergeClasses(fluentStyles.descriptionText, className)}> {children}</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
52 changes: 52 additions & 0 deletions
52
packages/website/src/components/homepage/feature/feature.module.css
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,52 @@ | ||
.feature-group { | ||
display: flex; | ||
align-items: stretch; | ||
align-self: center; | ||
flex-direction: column; | ||
gap: 40px; | ||
padding: 80px; | ||
} | ||
|
||
.feature-card { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 24px; | ||
} | ||
|
||
.feature { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 24px; | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 24px; | ||
} | ||
|
||
@media only screen and (min-width: 1200px) { | ||
.feature-group { | ||
flex-direction: row; | ||
width: 1200px; | ||
justify-content: space-between; | ||
padding: 0; | ||
} | ||
|
||
.feature-card { | ||
width: 350px; | ||
} | ||
} | ||
|
||
@media only screen and (min-width: 600px) and (max-width: 1200px) { | ||
.feature { | ||
flex-direction: row; | ||
} | ||
|
||
.content { | ||
align-items: baseline; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/website/src/components/homepage/feature/feature.tsx
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,27 @@ | ||
import { Subtitle1, Text } from "@fluentui/react-components"; | ||
import { Card } from "../../card/card"; | ||
import { FluentImageName, FluentImg } from "../../fluent-img"; | ||
import style from "./feature.module.css"; | ||
|
||
export interface FeatureProps { | ||
title: string; | ||
image: FluentImageName; | ||
children: React.ReactNode; | ||
} | ||
export const Feature = ({ title, image, children }: FeatureProps) => { | ||
return ( | ||
<Card className={style["feature-card"]}> | ||
<div className={style["feature"]}> | ||
<FluentImg name={image} /> | ||
<div className={style["content"]}> | ||
<Subtitle1>{title}</Subtitle1> | ||
<Text>{children}</Text> | ||
</div> | ||
</div> | ||
</Card> | ||
); | ||
}; | ||
|
||
export const FeatureGroup = ({ children }) => { | ||
return <div className={style["feature-group"]}>{children}</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
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
Oops, something went wrong.