Skip to content

Conversation

@zoobestik
Copy link
Collaborator

This pull request introduces a new, visually enhanced multiplatform hero banner for the Kotlin website landing page, replacing the previous static layout.

Hero banner implementation:

  • Added a new HeroBanner React component in blocks/multiplatform/hero/index.tsx that displays the Kotlin Multiplatform hero section, including a title, subtitle, platform icons, and a "Get Started" button. The component uses imported SVG icons and applies custom styles.

Landing page integration:

  • Updated pages/multiplatform/index.tsx to import and use the new HeroBanner component, wrapped in a dark theme provider, and replaced the previous static layout. Also updated constants for menu items and URLs.
  • Changed the landing page layout to display the new hero banner and FAQ block within the ThemeProvider and updated the "Get started" button to link directly to the multiplatform getting started documentation.

@zoobestik zoobestik marked this pull request as ready for review November 21, 2025 17:49
- Update `@jetbrains/kotlin-web-site-ui` to version 4.13.0-alpha.3
- Modify a Hero section to leverage new breakpoint hooks
- Adjust responsive styles for improved layout behavior
@zoobestik zoobestik force-pushed the ktl-3875-kmp-landing-page branch from bae21ac to 6bb6927 Compare November 24, 2025 12:28
… responsiveness

- Upgrade `@jetbrains/kotlin-web-site-ui` to `4.13.0-alpha.4`
- Update `@rescui/colors` dependency to `0.1.11`
- Refactor Hero section layout with updated breakpoints and styling adjustments
@zoobestik zoobestik force-pushed the ktl-3875-kmp-landing-page branch from 6bb6927 to bae21ac Compare November 24, 2025 14:47

padding-block: 72px 96px;

--hero-logo-image: '';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better when icons and other resources in the same folder with component, but i can't find a normal way for nextjs. Ask for help

Image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the images should be in public directory, this seems to be a kind of contract in Next.JS: https://nextjs.org/docs/app/api-reference/file-conventions/public-folder.

Regarding the inlining of the SVGs, I'd prefer to see them as paths to files instead of base64 (to reduce size of the page via caching). As I see, it's something related to webpack configuration: maybe it's downside of the optimizedImages task, maybe we just need to configure "asset/resource" configuration for SVG files. Not sure we can fix it right away, without breaking all SVG imports.

@krutilov, ,maybe you know what we can do?

padding-block: 24px;

@media (--ktl-ts-in) {
/* @mixin rs-hero-sm-*; */
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to add mixins.p.css from rescui, but I see there is no way to get sm value if you are higher than 640px. Ask for help.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to get font-size and line height, right?
Have you tried @mixin rs-typography-hero-sm?

@zoobestik zoobestik self-assigned this Nov 24, 2025
return (
<div className={styles.wrapper}>
<div className={cn(styles.hero, 'ktl-layout', 'ktl-layout--center')}
style={{ '--hero-logo-image': `url(${logo.src})` }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get why you prefer using a background image instead of the img tag. Not a major thing at all, just seems more complicated then a image tag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a ts error also, something like could fix it

declare module 'react' {
    interface CSSProperties {
        [key: `--${string}`]: string | number;
    }
}

Copy link
Collaborator Author

@zoobestik zoobestik Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikpachoo

I didn't get why you prefer using a background image instead of the img tag. Not a major thing at all, just seems more complicated then a image tag.

If your question is about the custom property - it's simply a technique to keep images colocated with the component.

If this is a broader question about images in HTML vs CSS, here's my reasoning:

Content vs Decorative graphics

This practice stems from accessibility techniques. The core idea is distinguishing between two types of images: content images and decorative graphics.

  1. Content images are those essential to the narrative - screenshots, photos, charts, and similar. They're crucial to storytelling and require attributes like alt for cases when the image fails to load or when users rely on screen readers. They should be visible when you copy an article to clipboard. Ideally, search engines should index only these images and display them in image search results.

  2. Decorative graphics are purely visual - backgrounds, parallax effects, animations. They're contextually disconnected from the article's content and serve as visual "noise." They don't need alt attributes, shouldn't be copied, crawled, or indexed. Plus, they unnecessarily inflate customer's context window for LLMs 🙃

    To make an <img> inaccessible for decorative elements, you'd need to add numerous attributes. It's far simpler to use backgrounds and pseudo-elements. This approach ensures your HTML remains clean and your page cache consistency is maintained as long as you don't modify the article content. This also doesn't bloat your HTML size anyway.

My own baseline rule: if an image must remain accessible without CSS - use the <img> tag. If not - any CSS technique works (including sprites, which you can't implement with <img> tags). Possibly, my understanding may be outdated. I'd welcome an alternative perspective if mine isn't convincing.

},
{
title: 'Docs',
url: 'https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)
Let's use the link without redirect: https://kotlinlang.org/docs/multiplatform/get-started.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

desktop and server seems to be replaced with each other according to the figma

Image


import styles from './hero.module.css';

const platforms = [
Copy link
Contributor

@berezinant berezinant Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIC: We have some platform types declared in the case studies module here. Probably it's worth extracting it to some common place (or maybe not)

Anyway, there is a difference in names for platforms on different pages (frontend + backend on case studies, web + server on this kmp landing) and there is still a discussion what options are better.
Not sure if there are any certain action points here, so just to share some context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants