diff --git a/blocks/multiplatform/hero/hero.module.css b/blocks/multiplatform/hero/hero.module.css new file mode 100644 index 00000000000..eb6a6051622 --- /dev/null +++ b/blocks/multiplatform/hero/hero.module.css @@ -0,0 +1,146 @@ +@import "@jetbrains/kotlin-web-site-ui/out/components/breakpoints-v2/media.pcss"; + +.wrapper { + position: relative; + z-index: 0; + overflow: hidden; +} + +.wrapper::before { + content: ''; + display: block; + + background: radial-gradient(238.09% 60.02% at 49.98% 105.17%, rgba(177, 38, 235, 0.00) 0%, #260053 100%) center no-repeat; + filter: blur(200px); + + height: 696px; + width: 826px; + + position: absolute; + top: 36px; + left: 50%; + transform: translate(-50%, -50%); + z-index: -1; +} + +.hero { + display: flex; + flex-direction: column; + align-items: center; + + padding-block: 72px 96px; +} + +.hero::before { + display: block; + content: ''; + background: url('/images/multiplatform/hero/logo.svg') no-repeat center; + + height: 72px; + width: 72px; + + @media (--ktl-ts-more) { + height: 96px; + width: 96px; + } +} + +.title, .subtitle { + margin: 0; + padding: 0; + text-align: center; +} + +.title { + padding-block: 24px; + + @media (--ktl-ts-in) { + /* @mixin rs-hero-sm-*; */ + font-size: 42px; + line-height: 50px; + } +} + +.subtitle { + @media (--ktl-ts-in) { + /* @mixin rs-subtitle-1-sm-* */ + font-size: 23px; + line-height: 30px; + } +} + +.platforms { + display: flex; + flex-wrap: wrap; + justify-content: center; + + box-sizing: border-box; + gap: 18px 40px; + width: 100%; + + margin: 0; + padding: 48px 0; + list-style: none; + + --hero-item-src: ''; +} + +.platform { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 8px; + + line-height: 1.5; + + @media (--ktl-ts-more) { + flex-basis: 80px; + } + + @media (--ktl-ms-in) { + padding-inline: 14px; + } + + &.android { + --hero-item-src: url('/images/multiplatform/hero/android.svg'); + } + + &.ios { + --hero-item-src: url('/images/multiplatform/hero/ios.svg'); + } + + &.web { + --hero-item-src: url('/images/multiplatform/hero/web.svg'); + } + + &.desktop { + --hero-item-src: url('/images/multiplatform/hero/desktop.svg'); + } + + &.server { + --hero-item-src: url('/images/multiplatform/hero/server.svg'); + } +} + +.platform::before { + display: block; + content: ''; + + background: var(--hero-item-src) no-repeat center; + background-size: 32px; + height: 32px; + width: 32px; + + @media (--ktl-ts-more) { + background-size: 48px; + height: 48px; + width: 48px; + } +} + +.button { + @media (--ktl-ms-in) { + width: 100%; + } +} diff --git a/blocks/multiplatform/hero/index.tsx b/blocks/multiplatform/hero/index.tsx new file mode 100644 index 00000000000..91304f14be6 --- /dev/null +++ b/blocks/multiplatform/hero/index.tsx @@ -0,0 +1,40 @@ +import cn from 'classnames'; + +import { useTextStyles } from '@rescui/typography'; +import { Button } from '@rescui/button'; + +import { useML } from '@jetbrains/kotlin-web-site-ui/out/components/breakpoints-v2'; + +import styles from './hero.module.css'; + +const platforms = ['Android', 'iOS', 'Web', 'Desktop', 'Server'] as const; + +export function HeroBanner({ url }: { url: string }) { + const isML = useML(); + const textCn = useTextStyles(); + + return ( +
+
+

Kotlin Multiplatform

+

+ Go cross‑platform without compromising performance, UX, or code quality +

+ + +
+
+ ); +} diff --git a/components/landing-layout/landing-layout.tsx b/components/landing-layout/landing-layout.tsx index 63983c0a431..278e5f99ccc 100644 --- a/components/landing-layout/landing-layout.tsx +++ b/components/landing-layout/landing-layout.tsx @@ -2,6 +2,7 @@ import React, { FC, useCallback, useMemo } from 'react'; import Head from 'next/head'; +import '@jetbrains/kotlin-web-site-ui/out/components/layout-v2'; import GlobalHeader from '@jetbrains/kotlin-web-site-ui/out/components/header'; import GlobalFooter from '@jetbrains/kotlin-web-site-ui/out/components/footer'; import TopMenu from '@jetbrains/kotlin-web-site-ui/out/components/top-menu'; diff --git a/package.json b/package.json index 2a202d114a2..4f4adc0e231 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@babel/core": "^7.22.10", "@babel/register": "7.15.3", "@jetbrains/babel-preset-jetbrains": "^2.3.1", - "@jetbrains/kotlin-web-site-ui": "4.12.0", + "@jetbrains/kotlin-web-site-ui": "4.13.0-alpha.4", "@react-hook/resize-observer": "1.2.5", "@rescui/button": "0.18.0", "@rescui/card": "^0.8.1", diff --git a/pages/multiplatform/index.tsx b/pages/multiplatform/index.tsx index a87c06be9ec..d4b77f1ecf6 100644 --- a/pages/multiplatform/index.tsx +++ b/pages/multiplatform/index.tsx @@ -1,15 +1,26 @@ import { Button } from '@rescui/button'; -import { LandingLayout, LandingLayoutProps } from '../../components/landing-layout/landing-layout'; +import { ThemeProvider } from '@rescui/ui-contexts'; -import { - MULTIPLATFORM_MOBILE_TITLE, - MULTIPLATFORM_MOBILE_URL -} from '@jetbrains/kotlin-web-site-ui/out/components/header'; +import { LandingLayout, LandingLayoutProps } from '../../components/landing-layout/landing-layout'; -import styles from './multiplatform.module.css'; import { FaqBlock } from '../../blocks/multiplatform/faq-block/faq-block'; +import { HeroBanner } from '../../blocks/multiplatform/hero'; + +const MULTIPLATFORM_MOBILE_TITLE = 'Kotlin Multiplatform' as const; +const MULTIPLATFORM_MOBILE_URL = '/multiplatform/' as const; + +const TOP_MENU_ITEMS: LandingLayoutProps['topMenuItems'] = [ + { + title: 'Compose Multiplatform', + url: 'https://www.jetbrains.com/compose-multiplatform/' + }, + { + title: 'Docs', + url: 'https://kotlinlang.org/docs/multiplatform/get-started.html' + } +]; -const TOP_MENU_ITEMS: LandingLayoutProps['topMenuItems'] = []; +const GET_STARTED_URL = '/docs/multiplatform/get-started.html' as const; export default function MultiplatformLanding() { return ( @@ -23,11 +34,14 @@ export default function MultiplatformLanding() { topMenuTitle={MULTIPLATFORM_MOBILE_TITLE} topMenuHomeUrl={MULTIPLATFORM_MOBILE_URL} topMenuItems={TOP_MENU_ITEMS} - topMenuButton={} + topMenuButton={} canonical={'https://kotlinlang.org/multiplatform/'} > -
- +
+ + + +
); diff --git a/public/images/multiplatform/hero/android.svg b/public/images/multiplatform/hero/android.svg new file mode 100644 index 00000000000..bc288de4bf1 --- /dev/null +++ b/public/images/multiplatform/hero/android.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/multiplatform/hero/desktop.svg b/public/images/multiplatform/hero/desktop.svg new file mode 100644 index 00000000000..7ce66fb2094 --- /dev/null +++ b/public/images/multiplatform/hero/desktop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/multiplatform/hero/ios.svg b/public/images/multiplatform/hero/ios.svg new file mode 100644 index 00000000000..d821547422d --- /dev/null +++ b/public/images/multiplatform/hero/ios.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/multiplatform/hero/logo.svg b/public/images/multiplatform/hero/logo.svg new file mode 100644 index 00000000000..5c5d029e46c --- /dev/null +++ b/public/images/multiplatform/hero/logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/multiplatform/hero/server.svg b/public/images/multiplatform/hero/server.svg new file mode 100644 index 00000000000..0eafbe49798 --- /dev/null +++ b/public/images/multiplatform/hero/server.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/multiplatform/hero/web.svg b/public/images/multiplatform/hero/web.svg new file mode 100644 index 00000000000..c1380dabfae --- /dev/null +++ b/public/images/multiplatform/hero/web.svg @@ -0,0 +1,3 @@ + + + diff --git a/yarn.lock b/yarn.lock index e14cacb6daa..3942d0a9c38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1433,10 +1433,10 @@ "@babel/runtime" "^7.14.0" babel-plugin-angularjs-annotate "^0.10.0" -"@jetbrains/kotlin-web-site-ui@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@jetbrains/kotlin-web-site-ui/-/kotlin-web-site-ui-4.12.0.tgz#54ac736c11588e3caf427d1f6041081ecda72960" - integrity sha512-xjHSphIJPKGnd74jZThqbGqeKk4OH3/znCJ6jdVUP3x5REwcPzegcF0qhEzcYnzl3wZ6/LLk2wHudnwCIAfm+w== +"@jetbrains/kotlin-web-site-ui@4.13.0-alpha.4": + version "4.13.0-alpha.4" + resolved "https://registry.yarnpkg.com/@jetbrains/kotlin-web-site-ui/-/kotlin-web-site-ui-4.13.0-alpha.4.tgz#e8c8ee5a6ad203632b7f65ee37b55b9da9bafb8e" + integrity sha512-RYka7guyOoPdR4GQoTM+qIVDcwNuRRhsjjuTJflGe/XB+ipo3nR8UsPvZmnJtDcoLXGT2XgHyQiIyvQfy6uijg== "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" @@ -1790,9 +1790,9 @@ integrity sha512-SfFy7W8vlWuRsEpT9VYSVRXGso6PK2pP5BuPnt3d525aW8Rx99kiuKYaqNPdu9p2nh2/XIf+febOl4Q3x/fH1g== "@rescui/colors@^0.1.9": - version "0.1.9" - resolved "https://registry.npmjs.org/@rescui/colors/-/colors-0.1.9.tgz" - integrity sha512-ZgMmIuCJERqPsfCY+7I9UvOIWEypyiZ4VdDdHPb/HUy9lxPpfNzV7Fs/RalBJP4wtgsfwR24d4IlYNhpJcunTA== + version "0.1.11" + resolved "https://registry.yarnpkg.com/@rescui/colors/-/colors-0.1.11.tgz#438b5058cc308d28d4bda407236c25b67aff0179" + integrity sha512-zfZ7czMTQ5/DyZeMXCm1nTWEclIY5+Iuc8D3CZK2Zl64La//mjHz9Rjf+NlAE70bESzYtBNlItATN/lWgkowaQ== "@rescui/colors@^0.2.10": version "0.2.10" @@ -1941,7 +1941,7 @@ "@rescui/typography@^0.11.0": version "0.11.0" - resolved "https://registry.npmjs.org/@rescui/typography/-/typography-0.11.0.tgz" + resolved "https://registry.yarnpkg.com/@rescui/typography/-/typography-0.11.0.tgz#8a348121ea3bb18249f6af18628426b04a3ee6d7" integrity sha512-IT8pXLkFQs7RsJ0eWWsCVz11HuJn1dQ78Lti2mz8q6NLbvb8TS+dlh53UzN5hLVISC9kFTRtyK2IblMIDd0zpA== dependencies: "@babel/runtime-corejs3" "^7.14.0"