-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cdb0dc
commit 5d344c6
Showing
136 changed files
with
442 additions
and
645 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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM nginx:alpine | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
|
||
COPY ./website/config/conf.d /etc/nginx/conf.d | ||
|
||
COPY ./website/public /usr/share/nginx/html |
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,10 @@ | ||
server { | ||
listen 80; | ||
root /usr/share/nginx/html; | ||
|
||
error_page 404 /404; | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
} |
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,59 @@ | ||
import React, { Children, FC, ReactElement } from "react"; | ||
import { Warning } from "./warning"; | ||
|
||
const warningText = "Warning: "; | ||
|
||
export const BlockQuote: FC = ({ children }) => { | ||
const childArray = Children.toArray(children); | ||
|
||
const isWarning = | ||
childArray.length > 0 && | ||
React.isValidElement(childArray[0]) && | ||
((typeof childArray[0].props["children"] === "string" && | ||
childArray[0].props["children"].startsWith(warningText)) || | ||
(Array.isArray(childArray[0].props["children"]) && | ||
childArray[0].props["children"].length > 0 && | ||
typeof childArray[0].props["children"][0] === "string" && | ||
childArray[0].props["children"][0].startsWith(warningText))); | ||
|
||
if (isWarning) { | ||
const elements = childArray.filter((child) => | ||
React.isValidElement(child) | ||
) as ReactElement[]; | ||
const texts = elements.map((elem) => { | ||
const innerChildren = elem.props["children"]; | ||
|
||
if ( | ||
typeof innerChildren === "string" && | ||
innerChildren.startsWith(warningText) | ||
) { | ||
return innerChildren.substring(warningText.length); | ||
} | ||
|
||
if ( | ||
Array.isArray(innerChildren) && | ||
typeof innerChildren[0] === "string" | ||
) { | ||
return innerChildren.map((child) => { | ||
if (typeof child === "string" && child.startsWith(warningText)) { | ||
return child.substring(warningText.length); | ||
} | ||
|
||
return child; | ||
}); | ||
} | ||
|
||
return innerChildren; | ||
}); | ||
|
||
return ( | ||
<Warning> | ||
{texts.map((text, index) => ( | ||
<p key={index}>{text}</p> | ||
))} | ||
</Warning> | ||
); | ||
} | ||
|
||
return <blockquote>{children}</blockquote>; | ||
}; |
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,51 @@ | ||
import React, { FC } from "react"; | ||
import { CodeBlock } from "./code-block"; | ||
import { InlineCode } from "./inline-code"; | ||
import { InputChoiceTabs } from "./input-choice-tabs"; | ||
import { Warning } from "./warning"; | ||
|
||
type Props = { | ||
readonly packageName: string; | ||
readonly external?: boolean; | ||
}; | ||
|
||
export const PackageInstallation: FC<Props> = ({ packageName, external }) => { | ||
return ( | ||
<> | ||
<InputChoiceTabs> | ||
<InputChoiceTabs.CLI> | ||
<CodeBlock | ||
language="bash" | ||
children={`dotnet add package ${packageName}`} | ||
/> | ||
</InputChoiceTabs.CLI> | ||
|
||
<InputChoiceTabs.VisualStudio> | ||
<InputChoiceTabs.VisualStudio> | ||
<p> | ||
Add the <InlineCode>{packageName}</InlineCode> package using the | ||
NuGet Package Manager within Visual Studio. | ||
</p> | ||
|
||
<p> | ||
<a | ||
href="https://docs.microsoft.com/nuget/quickstart/install-and-use-a-package-in-visual-studio#nuget-package-manager" | ||
target="_blank" | ||
> | ||
Learn how you can use the NuGet Package Manager to install a | ||
package | ||
</a> | ||
</p> | ||
</InputChoiceTabs.VisualStudio> | ||
</InputChoiceTabs.VisualStudio> | ||
</InputChoiceTabs> | ||
|
||
{!external && ( | ||
<Warning> | ||
All <InlineCode>HotChocolate.*</InlineCode> packages need to have the | ||
same version. | ||
</Warning> | ||
)} | ||
</> | ||
); | ||
}; |
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,79 @@ | ||
import React, { FC, ReactNode } from "react"; | ||
import styled from "styled-components"; | ||
import { THEME_COLORS } from "../../shared-style"; | ||
|
||
type Props = { | ||
readonly children: ReactNode; | ||
}; | ||
|
||
export const Warning: FC<Props> = ({ children }) => { | ||
return ( | ||
<Container> | ||
<Heading> | ||
{warningIcon} <span>Warning</span> | ||
</Heading> | ||
|
||
{children} | ||
</Container> | ||
); | ||
}; | ||
|
||
const warningIcon = ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="16" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
> | ||
<path d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z" /> | ||
</svg> | ||
); | ||
|
||
const Heading = styled.div` | ||
fill: ${THEME_COLORS.textContrast}; | ||
display: flex; | ||
align-items: center; | ||
gap: 10px; | ||
> span { | ||
margin-bottom: 3px; | ||
font-weight: bold; | ||
line-height: normal; | ||
} | ||
> svg { | ||
margin-left: 4px; | ||
transform: scale(1.3); | ||
} | ||
`; | ||
|
||
const Container = styled.div` | ||
padding: 20px 20px; | ||
background-color: ${THEME_COLORS.warning}; | ||
color: ${THEME_COLORS.textContrast}; | ||
line-height: 1.4; | ||
@media only screen and (min-width: 860px) { | ||
padding: 20px 50px; | ||
} | ||
br { | ||
margin-bottom: 16px; | ||
} | ||
a { | ||
color: white !important; | ||
font-weight: bold; | ||
text-decoration: underline; | ||
} | ||
code { | ||
border-color: ${THEME_COLORS.textContrast}; | ||
color: ${THEME_COLORS.textContrast}; | ||
} | ||
> p:last-child { | ||
margin-bottom: 0; | ||
} | ||
`; |
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
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.