diff --git a/components/community/community-keep-in-touch-card/community-keep-in-touch-card.module.css b/blocks/community/keep-in-touch-card/keep-in-touch-card.module.css similarity index 51% rename from components/community/community-keep-in-touch-card/community-keep-in-touch-card.module.css rename to blocks/community/keep-in-touch-card/keep-in-touch-card.module.css index 1c350b28878..b3e98731d37 100644 --- a/components/community/community-keep-in-touch-card/community-keep-in-touch-card.module.css +++ b/blocks/community/keep-in-touch-card/keep-in-touch-card.module.css @@ -1,45 +1,25 @@ .card { - box-sizing: border-box; - display: flex; - flex-direction: column; - padding: 16px; - background: #fff; - text-decoration: none; - color: inherit; - border: 1px solid rgba(39, 40, 44, 0.2); - border-radius: 8px; min-height: 170px; } -.card:hover { - text-decoration: none; - color: inherit; - border: 1px solid #19191C; -} - -.icon { - +.wrapper { + box-sizing: border-box; + height: 100%; + display: flex; + flex-direction: column; } .bottom { margin-top: auto; } -.title { - -} - -.description { - -} - @media (max-width: 767px) { - .title .ktl-h3 { + .title { font-size: 13px; line-height: 24px; } - .description .ktl-text-1 { + .description { font-size: 13px; line-height: 24px; } diff --git a/blocks/community/keep-in-touch-card/keep-in-touch-card.tsx b/blocks/community/keep-in-touch-card/keep-in-touch-card.tsx new file mode 100644 index 00000000000..fe81c5232b8 --- /dev/null +++ b/blocks/community/keep-in-touch-card/keep-in-touch-card.tsx @@ -0,0 +1,36 @@ +import React, {FC} from 'react'; +import classNames from 'classnames'; +import {cardCn} from "@rescui/card"; +import styles from './keep-in-touch-card.module.css' + +export interface KeepInTouchCardProps { + icon: string; + title: string; + description: string; + link: string; +} + +export const KeepInTouchCard: FC = ({icon, title, description, link}) => { + + const cardClassName = classNames(cardCn({paddings: 16, isClickable: true}), styles.card); + + return ( + +
+
+ {title}/ +
+
+
+ {title} +
+
+
+ {description} +
+
+
+
+
+ ) +} diff --git a/blocks/community/community-keep-in-touch/community-keep-in-touch.module.css b/blocks/community/keep-in-touch/keep-in-touch.module.css similarity index 100% rename from blocks/community/community-keep-in-touch/community-keep-in-touch.module.css rename to blocks/community/keep-in-touch/keep-in-touch.module.css diff --git a/blocks/community/community-keep-in-touch/community-keep-in-touch.tsx b/blocks/community/keep-in-touch/keep-in-touch.tsx similarity index 65% rename from blocks/community/community-keep-in-touch/community-keep-in-touch.tsx rename to blocks/community/keep-in-touch/keep-in-touch.tsx index 8c8d89f2772..d498647be13 100644 --- a/blocks/community/community-keep-in-touch/community-keep-in-touch.tsx +++ b/blocks/community/keep-in-touch/keep-in-touch.tsx @@ -1,23 +1,24 @@ import React, {FC} from 'react'; -import {CommunityKeepInTouchCard} from "../../../components/community/community-keep-in-touch-card/community-keep-in-touch-card"; +import {KeepInTouchCard} from "../keep-in-touch-card/keep-in-touch-card"; import classNames from 'classnames'; -import styles from './community-keep-in-touch.module.css'; +import styles from './keep-in-touch.module.css'; -import {CommunityKeepInTouchCardProps} from '../../../components/community/community-keep-in-touch-card/community-keep-in-touch-card' +import {KeepInTouchCardProps} from '../keep-in-touch-card/keep-in-touch-card' -interface CommunityKeepInTouchProps { - links: CommunityKeepInTouchCardProps[] +interface KeepInTouchProps { + links: KeepInTouchCardProps[] } -export const CommunityKeepInTouch: FC = ({links}) => { +export const KeepInTouch: FC = ({links}) => { return (

Keep in Touch

{links.map(link => ( - = ({icon, title, description, link}) => { - - return ( - -
- {title}/ -
- -
-
-
- {title} -
-
-
-
- {description} -
-
-
-
- ) -} diff --git a/next.config.js b/next.config.js index 3bf30e84b74..376213a1a90 100644 --- a/next.config.js +++ b/next.config.js @@ -15,7 +15,7 @@ const withTranspile = nextTranspileModules(transpiledPackages); const nextConfig = { pageExtensions: ['ts', 'tsx', 'js', 'jsx'], - fileExtensions: ["jpg", "jpeg", "png", "gif"], + fileExtensions: ["jpg", "jpeg", "png", "gif", "svg"], inlineImageLimit: 0, images: { disableStaticImages: true, @@ -26,7 +26,7 @@ module.exports = withPlugins([ [withConfigCss], [withTranspile], [optimizedImages, { - handleImages: ['jpeg', 'png'], + handleImages: ['jpeg', 'png', "svg"], imagesFolder: 'images', optimizeImagesInDev: true }] diff --git a/package.json b/package.json index cb7843dfe4e..8f4dadd49d6 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@jetbrains/kotlin-web-site-ui": "4.0.0-alpha.3", "@react-hook/resize-observer": "1.2.5", "@rescui/button": "0.4.0", + "@rescui/card": "0.5.0", "@rescui/checkbox": "0.1.0", "@rescui/colors": "0.0.4", "@rescui/icons": "0.3.0", diff --git a/pages/community/index.tsx b/pages/community/index.tsx index 4f28e3a3d5f..65e01a54ffe 100644 --- a/pages/community/index.tsx +++ b/pages/community/index.tsx @@ -2,9 +2,9 @@ import React from "react"; import {CommunityBanner} from '../../blocks/community/community-banner/community-banner'; import {CommunityLayout} from "../../layouts/community-layout"; -import {CommunityKeepInTouch} from "../../blocks/community/community-keep-in-touch/community-keep-in-touch"; +import {KeepInTouch} from "../../blocks/community/keep-in-touch/keep-in-touch"; -import SlackIcon from '../../public/community/icons/keep-in-touch-slack-icon.svg'; +import SlackIcon from '../../public/community/icons/keep-in-touch-slack-icon.svg' import TwitterIcon from '../../public/community/icons/keep-in-touch-twitter-icon.svg'; import KotlinIcon from '../../public/community/icons/keep-in-touch-kotlin-icon.svg'; import RedditIcon from '../../public/community/icons/keep-in-touch-reddit-icon.svg'; @@ -25,7 +25,7 @@ function Index() { JetBrains is here to provide help and support. - diff --git a/yarn.lock b/yarn.lock index a2b0ceb7c85..43d4a7a9638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1332,6 +1332,15 @@ classnames "^2.2.6" core-js "^3.9.1" +"@rescui/card@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@rescui/card/-/card-0.5.0.tgz#25ac29fdeabf80029593f1b54516d2f982c5da0e" + integrity sha512-r6grVbMnI9Wg4ksBrWzZ2sFkagVn20LkKPQ22cWmpMwjyZeOhgGxzctz8hRpJpimJiqwiFTHneaMLUPnds3aaA== + dependencies: + "@babel/runtime-corejs3" "^7.14.0" + classnames "^2.2.6" + core-js "^3.9.1" + "@rescui/checkbox@0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@rescui/checkbox/-/checkbox-0.1.0.tgz#5d85eb4f0a93eafede7bf44dedb34dd4ea8ce043"