You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SQHome.tsx 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import * as React from 'react';
  21. import { Link } from 'react-router';
  22. import Helmet from 'react-helmet';
  23. import LoginButtons from './components/LoginButtons';
  24. import Pricing from './components/Pricing';
  25. import SQPageContainer from './components/SQPageContainer';
  26. import StartUsing from './components/StartUsing';
  27. import { LANGUAGES } from './utils';
  28. import { isLoggedIn } from '../../../helpers/users';
  29. import { getBaseUrl } from '../../../helpers/urls';
  30. import './style.css';
  31. const NB_LANGUAGE_PER_ROW = 8;
  32. export default function SQHome() {
  33. return (
  34. <SQPageContainer>
  35. {({ currentUser }) => (
  36. <div className="page sc-page sc-sq-page">
  37. <Helmet title="Use SonarQube as a Service, sign up for SonarCloud | SonarCloud">
  38. <meta
  39. content="Enhance your workflow with continuous code quality, SonarCloud automatically analyzes and decorates pull requests on GitHub, Bitbucket and Azure DevOps on major languages."
  40. name="description"
  41. />
  42. </Helmet>
  43. <Jumbotron />
  44. <h2 className="sc-sq-header2">You use the service, we take care of the rest</h2>
  45. <Pricing />
  46. {!isLoggedIn(currentUser) && <StartUsing />}
  47. <Features />
  48. <Languages />
  49. <Integrations />
  50. <BottomNote />
  51. </div>
  52. )}
  53. </SQPageContainer>
  54. );
  55. }
  56. function Jumbotron() {
  57. return (
  58. <div className="sc-sq-jumbotron">
  59. <div className="sc-sq-jumbotron-left">
  60. <h1 className="sc-sq-jumbotron-title">
  61. Use SonarQube
  62. <br />
  63. <span className="sc-sq-jumbotron-title-orange">as a Service</span>
  64. </h1>
  65. <div className="sc-sq-jumbotron-login">
  66. {'—'}
  67. <br />
  68. Log in or sign up with
  69. </div>
  70. <LoginButtons />
  71. </div>
  72. <div className="sc-sq-jumbotron-right">
  73. <img
  74. alt="SonarCloud project dashboard"
  75. src={`${getBaseUrl()}/images/sonarcloud/sq-homepage.png`}
  76. srcSet={`${getBaseUrl()}/images/sonarcloud/sq-homepage.png 1x, ${getBaseUrl()}/images/sonarcloud/sq-homepage@2x.png 2x`}
  77. />
  78. </div>
  79. </div>
  80. );
  81. }
  82. function Features() {
  83. return (
  84. <>
  85. <h2 className="sc-sq-header2">The right solution for developers</h2>
  86. <ul className="sc-features-list">
  87. <li className="sc-feature">
  88. <img
  89. alt=""
  90. className="big-spacer-bottom"
  91. height="34"
  92. src={`${getBaseUrl()}/images/sonarcloud/as-a-service.svg`}
  93. />
  94. <h3 className="sc-feature-title">As a Service</h3>
  95. <p className="sc-feature-description">
  96. We provide a fully operated version of SonarQube which is hosted on Amazon AWS in Europe
  97. (Frankfurt, Germany).
  98. </p>
  99. <Link className="sc-arrow-link sc-feature-link" to="/about/sq/as-a-service">
  100. See more
  101. </Link>
  102. </li>
  103. <li className="sc-feature">
  104. <img
  105. alt=""
  106. className="big-spacer-bottom"
  107. height="34"
  108. src={`${getBaseUrl()}/images/sonarcloud/branch-analysis.svg`}
  109. />
  110. <h3 className="sc-feature-title">Branch &amp; pull request analysis</h3>
  111. <p className="sc-feature-description">
  112. SonarCloud comes with a built-in feature to automatically analyze project branches and
  113. pull requests as soon as they get created.
  114. </p>
  115. <Link
  116. className="sc-arrow-link sc-feature-link"
  117. to="/about/sq/branch-analysis-and-pr-decoration">
  118. See more
  119. </Link>
  120. </li>
  121. <li className="sc-feature">
  122. <img
  123. alt=""
  124. className="big-spacer-bottom"
  125. height="34"
  126. src={`${getBaseUrl()}/images/sonarcloud/sonarlint-integration.svg`}
  127. />
  128. <h3 className="sc-feature-title">SonarLint integration</h3>
  129. <p className="sc-feature-description">
  130. The full SonarCloud experience can be enhanced with SonarLint, that enables developers
  131. to receive real time information directly in their IDEs.
  132. </p>
  133. <Link className="sc-arrow-link sc-feature-link" to="/about/sq/sonarlint-integration">
  134. See more
  135. </Link>
  136. </li>
  137. </ul>
  138. </>
  139. );
  140. }
  141. function Languages() {
  142. const languagesPerRow = [];
  143. for (let i = 0; i < LANGUAGES.length / NB_LANGUAGE_PER_ROW; i++) {
  144. languagesPerRow[i] = LANGUAGES.slice(i * NB_LANGUAGE_PER_ROW, (i + 1) * NB_LANGUAGE_PER_ROW);
  145. }
  146. return (
  147. <div className="sc-languages">
  148. <h3 className="sc-feature-title">On {LANGUAGES.length} programming languages</h3>
  149. {languagesPerRow.map((languagesRow, idx) => (
  150. <ul className="sc-languages-list" key={idx}>
  151. {languagesRow.map(language => (
  152. <li key={language.name}>
  153. <img
  154. alt={language.name}
  155. src={`${getBaseUrl()}/images/languages/${language.file}`}
  156. width={language.width}
  157. />
  158. </li>
  159. ))}
  160. </ul>
  161. ))}
  162. </div>
  163. );
  164. }
  165. function Integrations() {
  166. return (
  167. <div className="sc-integrations">
  168. <h2 className="sc-sq-header2 sc-integrations-title">Fully integrated experience with</h2>
  169. <ul className="sc-integrations-list">
  170. <li>
  171. <h3 className="sc-feature-title">GitHub</h3>
  172. <img
  173. alt="GitHub"
  174. className="big-spacer-top"
  175. height="60"
  176. src={`${getBaseUrl()}/images/sonarcloud/github-big.svg`}
  177. />
  178. </li>
  179. <li>
  180. <h3 className="sc-feature-title">Azure DevOps</h3>
  181. <img
  182. alt="Azure DevOps"
  183. className="big-spacer-top"
  184. height="60"
  185. src={`${getBaseUrl()}/images/sonarcloud/azure.svg`}
  186. />
  187. <div className="big-spacer-top">
  188. <Link className="sc-arrow-link sc-feature-link" to="/about/sq/vsts">
  189. See more
  190. </Link>
  191. </div>
  192. </li>
  193. <li>
  194. <h3 className="sc-feature-title">Bitbucket</h3>
  195. <img
  196. alt="Bitbucket"
  197. className="big-spacer-top"
  198. height="60"
  199. src={`${getBaseUrl()}/images/sonarcloud/bitbucket-big.svg`}
  200. />
  201. </li>
  202. </ul>
  203. </div>
  204. );
  205. }
  206. function BottomNote() {
  207. return (
  208. <div className="sc-bottom-note">
  209. Includes all features of SonarSource{' '}
  210. <a
  211. className="sc-bottom-note-link link-base-color"
  212. href="https://www.sonarsource.com/plans-and-pricing/developer/"
  213. rel="noopener noreferrer"
  214. target="_blank">
  215. Developer Edition
  216. </a>
  217. </div>
  218. );
  219. }