25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

161 satır
4.7 KiB

  1. /**
  2. * Copyright (c) 2017-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. const React = require('react');
  8. const CompLibrary = require('../../core/CompLibrary.js');
  9. const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
  10. const Container = CompLibrary.Container;
  11. const GridBlock = CompLibrary.GridBlock;
  12. class HomeSplash extends React.Component {
  13. render() {
  14. const {siteConfig, language = ''} = this.props;
  15. const {baseUrl, docsUrl} = siteConfig;
  16. const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
  17. const langPart = `${language ? `${language}/` : ''}`;
  18. const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`;
  19. const SplashContainer = props => (
  20. <div className="homeContainer">
  21. <div className="homeSplashFade">
  22. <div className="wrapper homeWrapper">{props.children}</div>
  23. </div>
  24. </div>
  25. );
  26. const Logo = props => (
  27. <div className="projectLogo">
  28. <img src={props.img_src} alt="Project Logo" />
  29. </div>
  30. );
  31. const ProjectTitle = props => (
  32. <h2 className="projectTitle">
  33. {props.title}
  34. <small>{props.tagline}</small>
  35. </h2>
  36. );
  37. const PromoSection = props => (
  38. <div className="section promoSection">
  39. <div className="promoRow">
  40. <div className="pluginRowBlock">{props.children}</div>
  41. </div>
  42. </div>
  43. );
  44. const Button = props => (
  45. <div className="pluginWrapper buttonWrapper">
  46. <a className="button" href={props.href} target={props.target}>
  47. {props.children}
  48. </a>
  49. </div>
  50. );
  51. return (
  52. <SplashContainer>
  53. <Logo img_src={`${baseUrl}img/diagrams.png`} />
  54. <div className="inner">
  55. <ProjectTitle tagline={siteConfig.tagline} title={siteConfig.title} />
  56. <PromoSection>
  57. <Button href={docUrl('getting-started/installation')}>Try It Out</Button>
  58. <Button href={docUrl('getting-started/examples')}>Show Examples</Button>
  59. </PromoSection>
  60. </div>
  61. </SplashContainer>
  62. );
  63. }
  64. }
  65. class Index extends React.Component {
  66. render() {
  67. const {config: siteConfig, language = ''} = this.props;
  68. const {baseUrl} = siteConfig;
  69. const Block = props => (
  70. <Container
  71. padding={['bottom', 'top']}
  72. id={props.id}
  73. background={props.background}>
  74. <GridBlock
  75. align="center"
  76. contents={props.children}
  77. layout={props.layout}
  78. />
  79. </Container>
  80. );
  81. const About = () => (
  82. <div
  83. className="productShowcaseSection paddingBottom"
  84. style={{textAlign: 'center'}}>
  85. <h2>About Diagrams</h2>
  86. <MarkdownBlock>
  87. Diagrams lets you draw the cloud system architecture **in Python code**.
  88. </MarkdownBlock>
  89. <MarkdownBlock>
  90. It was born for **prototyping** a new system architecture without any design tools. You can also describe or visualize the existing system architecture as well.
  91. </MarkdownBlock>
  92. <MarkdownBlock>
  93. `Diagram as Code` allows you to **track** the architecture diagram changes in any **version control** system.
  94. </MarkdownBlock>
  95. <MarkdownBlock>
  96. Diagrams currently supports main major providers including: `AWS`, `Azure`, `GCP`, `Kubernetes`, `Alibaba Cloud`, `Oracle Cloud` etc... It also supports `On-Premise` nodes, `SaaS` and major `Programming` frameworks and languages.
  97. </MarkdownBlock>
  98. <MarkdownBlock>
  99. `NOTE: It does not control any actual cloud resources nor does it generate cloud formation or terraform code. It is just for drawing the cloud system architecture diagrams.`
  100. </MarkdownBlock>
  101. </div>
  102. );
  103. const Example = () => (
  104. <Block>
  105. {[
  106. {
  107. image: `${baseUrl}img/message_collecting_code.png`,
  108. imageAlign: 'left',
  109. },
  110. {
  111. image: `${baseUrl}img/message_collecting_diagram.png`,
  112. imageAlign: 'right',
  113. },
  114. ]}
  115. </Block>
  116. );
  117. const Example2 = () => (
  118. <Block>
  119. {[
  120. {
  121. image: `${baseUrl}img/event_processing_code.png`,
  122. imageAlign: 'left',
  123. },
  124. {
  125. image: `${baseUrl}img/event_processing_diagram.png`,
  126. imageAlign: 'right',
  127. },
  128. ]}
  129. </Block>
  130. );
  131. return (
  132. <div>
  133. <HomeSplash siteConfig={siteConfig} language={language} />
  134. <div className="mainContainer">
  135. <About />
  136. <Example />
  137. <Example2 />
  138. </div>
  139. </div>
  140. );
  141. }
  142. }
  143. module.exports = Index;